Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2020-11-30 01:27:08 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2020-12-07 21:55:55 +0300
commit9ae59c847a315d8a6fe398e5c2c665e250d948d8 (patch)
treea1737af6b5802216429182cfde6361cf6c7d3a1b /tools
parent47345a1f84a418cf74c99ce071bd934dccc9b587 (diff)
tools: upgrade to @babel/eslint-parser 7.12.1
PR-URL: https://github.com/nodejs/node/pull/36321 Fixes: https://github.com/ensure Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/node_modules/@babel/core/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/README.md19
-rw-r--r--tools/node_modules/@babel/core/lib/config/caching.js327
-rw-r--r--tools/node_modules/@babel/core/lib/config/config-chain.js552
-rw-r--r--tools/node_modules/@babel/core/lib/config/config-descriptors.js211
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/configuration.js335
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/import.js10
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/index-browser.js68
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/index.js79
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/module-types.js96
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/package.js78
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/plugins.js169
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/types.js0
-rw-r--r--tools/node_modules/@babel/core/lib/config/files/utils.js48
-rw-r--r--tools/node_modules/@babel/core/lib/config/full.js329
-rw-r--r--tools/node_modules/@babel/core/lib/config/helpers/config-api.js85
-rw-r--r--tools/node_modules/@babel/core/lib/config/helpers/environment.js10
-rw-r--r--tools/node_modules/@babel/core/lib/config/index.js57
-rw-r--r--tools/node_modules/@babel/core/lib/config/item.js78
-rw-r--r--tools/node_modules/@babel/core/lib/config/partial.js187
-rw-r--r--tools/node_modules/@babel/core/lib/config/pattern-to-regex.js52
-rw-r--r--tools/node_modules/@babel/core/lib/config/plugin.js30
-rw-r--r--tools/node_modules/@babel/core/lib/config/printer.js127
-rw-r--r--tools/node_modules/@babel/core/lib/config/util.js35
-rw-r--r--tools/node_modules/@babel/core/lib/config/validation/option-assertions.js268
-rw-r--r--tools/node_modules/@babel/core/lib/config/validation/options.js201
-rw-r--r--tools/node_modules/@babel/core/lib/config/validation/plugins.js71
-rw-r--r--tools/node_modules/@babel/core/lib/config/validation/removed.js66
-rw-r--r--tools/node_modules/@babel/core/lib/gensync-utils/async.js89
-rw-r--r--tools/node_modules/@babel/core/lib/gensync-utils/fs.js53
-rw-r--r--tools/node_modules/@babel/core/lib/gensync-utils/resolve.js35
-rw-r--r--tools/node_modules/@babel/core/lib/index.js266
-rw-r--r--tools/node_modules/@babel/core/lib/parse.js50
-rw-r--r--tools/node_modules/@babel/core/lib/parser/index.js97
-rw-r--r--tools/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js307
-rw-r--r--tools/node_modules/@babel/core/lib/tools/build-external-helpers.js148
-rw-r--r--tools/node_modules/@babel/core/lib/transform-ast.js48
-rw-r--r--tools/node_modules/@babel/core/lib/transform-file-browser.js26
-rw-r--r--tools/node_modules/@babel/core/lib/transform-file.js45
-rw-r--r--tools/node_modules/@babel/core/lib/transform.js44
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js68
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/file/file.js255
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/file/generate.js89
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/file/merge-map.js247
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/index.js126
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/normalize-file.js179
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/normalize-opts.js65
-rw-r--r--tools/node_modules/@babel/core/lib/transformation/plugin-pass.js53
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/code-frame/README.md (renamed from tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js167
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/code-frame/package.json25
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js257
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js99
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js170
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js292
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js753
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js148
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/jsx.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js163
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js229
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js314
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/template-literals.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js263
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js781
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js94
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js107
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js253
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js201
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js513
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js73
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/generator/package.json29
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md (renamed from tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js178
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json21
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md (renamed from tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js26
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/lib/index.js386
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/package.json19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-builder.js139
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-injector.js271
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/index.js43
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/is-module.js18
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/package.json23
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/get-module-name.js42
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/index.js358
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js368
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js297
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js31
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/package.json28
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/lib/index.js30
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/package.json22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/lib/index.js255
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/package.json21
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/lib/index.js79
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/package.json20
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md (renamed from tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js62
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json18
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/identifier.js77
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/index.js57
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/keyword.js38
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/package.json21
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js75
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helpers/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js2078
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js295
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/helpers/package.json25
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/highlight/README.md (renamed from tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js107
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/highlight/package.json26
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/parser/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/parser/README.md19
-rwxr-xr-xtools/node_modules/@babel/core/node_modules/@babel/parser/bin/babel-parser.js15
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/parser/lib/index.js13493
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/parser/package.json41
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js71
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/index.js38
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js82
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/options.js82
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js179
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js127
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/lib/string.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/template/package.json22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js149
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js118
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js182
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js41
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js253
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js428
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js404
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js303
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js250
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js140
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js199
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js243
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js419
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js193
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js210
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js214
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js73
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js252
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js71
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js959
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js125
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js240
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/traverse/package.json31
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/LICENSE22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/README.md19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js19
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js1474
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js42
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js1243
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js23
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/clone.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js14
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js101
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js14
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComment.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritInnerComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritLeadingComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritTrailingComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritsComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js99
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js49
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js77
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js23
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js88
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js1488
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js200
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js461
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js97
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js165
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js33
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js33
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js428
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js315
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js610
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow2475
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js54
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js12
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js4669
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBlockScoped.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isLet.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNode.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js67
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isPlaceholderType.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js116
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js20
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isSpecifierDefault.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js22
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isVar.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isCompatTag.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js32
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/package.json35
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js121
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js257
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js44
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js57
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateConstants.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateConstants.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js381
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js10
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/lowerFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/lowerFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js (renamed from tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/ansi-styles/index.js (renamed from tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/ansi-styles/license (renamed from tools/node_modules/babel-eslint/node_modules/ansi-styles/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/ansi-styles/package.json56
-rw-r--r--tools/node_modules/@babel/core/node_modules/ansi-styles/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/index.js (renamed from tools/node_modules/babel-eslint/node_modules/chalk/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/index.js.flow (renamed from tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/license (renamed from tools/node_modules/babel-eslint/node_modules/chalk/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/package.json71
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/chalk/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/chalk/templates.js (renamed from tools/node_modules/babel-eslint/node_modules/chalk/templates.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/color-convert/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/README.md (renamed from tools/node_modules/babel-eslint/node_modules/color-convert/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/conversions.js (renamed from tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/index.js (renamed from tools/node_modules/babel-eslint/node_modules/color-convert/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/package.json46
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-convert/route.js (renamed from tools/node_modules/babel-eslint/node_modules/color-convert/route.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-name/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/color-name/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-name/README.md (renamed from tools/node_modules/babel-eslint/node_modules/color-name/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-name/index.js (renamed from tools/node_modules/babel-eslint/node_modules/color-name/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/color-name/package.json25
-rw-r--r--tools/node_modules/@babel/core/node_modules/convert-source-map/LICENSE23
-rw-r--r--tools/node_modules/@babel/core/node_modules/convert-source-map/README.md125
-rw-r--r--tools/node_modules/@babel/core/node_modules/convert-source-map/index.js136
-rw-r--r--tools/node_modules/@babel/core/node_modules/convert-source-map/package.json44
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/debug/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/README.md (renamed from tools/node_modules/babel-eslint/node_modules/debug/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/package.json59
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/src/browser.js269
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/src/common.js261
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/src/index.js (renamed from tools/node_modules/babel-eslint/node_modules/debug/src/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/debug/src/node.js263
-rw-r--r--tools/node_modules/@babel/core/node_modules/escape-string-regexp/index.js (renamed from tools/node_modules/babel-eslint/node_modules/escape-string-regexp/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/escape-string-regexp/license (renamed from tools/node_modules/babel-eslint/node_modules/escape-string-regexp/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/escape-string-regexp/package.json41
-rw-r--r--tools/node_modules/@babel/core/node_modules/escape-string-regexp/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/escape-string-regexp/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/.jscs.json176
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/LICENSE20
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/README.md48
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/implementation.js52
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/index.js5
-rw-r--r--tools/node_modules/@babel/core/node_modules/function-bind/package.json63
-rw-r--r--tools/node_modules/@babel/core/node_modules/gensync/LICENSE7
-rw-r--r--tools/node_modules/@babel/core/node_modules/gensync/README.md196
-rw-r--r--tools/node_modules/@babel/core/node_modules/gensync/index.js373
-rw-r--r--tools/node_modules/@babel/core/node_modules/gensync/index.js.flow32
-rw-r--r--tools/node_modules/@babel/core/node_modules/gensync/package.json37
-rw-r--r--tools/node_modules/@babel/core/node_modules/globals/globals.json (renamed from tools/node_modules/babel-eslint/node_modules/globals/globals.json)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/globals/index.js (renamed from tools/node_modules/babel-eslint/node_modules/globals/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/globals/license (renamed from tools/node_modules/babel-eslint/node_modules/globals/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/globals/package.json41
-rw-r--r--tools/node_modules/@babel/core/node_modules/globals/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/globals/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/has-flag/index.js (renamed from tools/node_modules/babel-eslint/node_modules/has-flag/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/has-flag/license (renamed from tools/node_modules/babel-eslint/node_modules/has-flag/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/has-flag/package.json44
-rw-r--r--tools/node_modules/@babel/core/node_modules/has-flag/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/has-flag/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT22
-rw-r--r--tools/node_modules/@babel/core/node_modules/has/README.md18
-rw-r--r--tools/node_modules/@babel/core/node_modules/has/package.json48
-rw-r--r--tools/node_modules/@babel/core/node_modules/has/src/index.js5
-rw-r--r--tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE20
-rw-r--r--tools/node_modules/@babel/core/node_modules/is-core-module/README.md37
-rw-r--r--tools/node_modules/@babel/core/node_modules/is-core-module/core.json83
-rw-r--r--tools/node_modules/@babel/core/node_modules/is-core-module/index.js69
-rw-r--r--tools/node_modules/@babel/core/node_modules/is-core-module/package.json66
-rw-r--r--tools/node_modules/@babel/core/node_modules/js-tokens/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/js-tokens/README.md (renamed from tools/node_modules/babel-eslint/node_modules/js-tokens/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/js-tokens/index.js (renamed from tools/node_modules/babel-eslint/node_modules/js-tokens/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/js-tokens/package.json30
-rw-r--r--tools/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt (renamed from tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/jsesc/README.md (renamed from tools/node_modules/babel-eslint/node_modules/jsesc/README.md)0
-rwxr-xr-xtools/node_modules/@babel/core/node_modules/jsesc/bin/jsesc (renamed from tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/jsesc/jsesc.js (renamed from tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1 (renamed from tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/jsesc/package.json54
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/LICENSE.md23
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/README.md234
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/dist/index.js1710
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js1
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/dist/index.min.mjs1
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/dist/index.mjs1399
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/cli.js112
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/index.js9
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/parse.js1087
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/register.js13
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/require.js4
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js261
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js4
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/lib/util.js35
-rw-r--r--tools/node_modules/@babel/core/node_modules/json5/package.json71
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/lodash/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/README.md39
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_DataView.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_DataView.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Hash.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Hash.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_LazyWrapper.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_LazyWrapper.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_ListCache.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_ListCache.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_LodashWrapper.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_LodashWrapper.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Map.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Map.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_MapCache.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_MapCache.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Promise.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Promise.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Set.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Set.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_SetCache.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_SetCache.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Stack.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Stack.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Symbol.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Symbol.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_Uint8Array.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_Uint8Array.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_WeakMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_WeakMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_apply.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_apply.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayAggregator.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayAggregator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayEach.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEach.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayEachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayEvery.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayEvery.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayFilter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayFilter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludes.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludes.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludesWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludesWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayLikeKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayLikeKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayPush.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayPush.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayReduce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayReduceRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduceRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arraySample.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arraySample.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arraySampleSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arraySampleSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arrayShuffle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arrayShuffle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_arraySome.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_arraySome.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_asciiSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_asciiSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_asciiToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_asciiToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_asciiWords.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_asciiWords.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_assignMergeValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_assignMergeValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_assignValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_assignValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_assocIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_assocIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseAggregator.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseAggregator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseAssign.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssign.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseAssignIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseAssignValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseClamp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseClamp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js166
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseConforms.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseConforms.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseConformsTo.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseConformsTo.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseCreate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseCreate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseDelay.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseDelay.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseDifference.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseDifference.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseEach.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseEach.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseEachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseEachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseEvery.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseEvery.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseExtremum.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseExtremum.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFill.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFill.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFilter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFilter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFindIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFindIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFindKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFindKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFlatten.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFlatten.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseForOwn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseForOwnRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwnRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseForRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseForRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseFunctions.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseFunctions.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseGetAllKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseGetAllKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseGetTag.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseGetTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseGt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseGt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseHasIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseHasIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseInRange.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseInRange.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOfWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOfWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIntersection.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIntersection.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseInverter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseInverter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseInvoke.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseInvoke.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsArguments.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArguments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsArrayBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArrayBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsDate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsDate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqual.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqual.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqualDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqualDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsMatch.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMatch.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsNaN.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNaN.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsNative.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNative.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIsTypedArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIsTypedArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseIteratee.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseIteratee.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseKeysIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseKeysIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseLodash.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseLodash.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseLt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseLt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMatches.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMatches.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMatchesProperty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMatchesProperty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMean.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMean.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMerge.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseMergeDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseNth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseNth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js49
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePick.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePick.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePickBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePickBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseProperty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseProperty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePropertyDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePropertyOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePullAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePullAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_basePullAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_basePullAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseRandom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseRandom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseRange.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseRange.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseReduce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseReduce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseRepeat.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseRepeat.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseRest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseRest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSample.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSample.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSampleSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSampleSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js51
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSetData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSetData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSetToString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSetToString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseShuffle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseShuffle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSlice.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSlice.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSome.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSome.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSortBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js67
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSortedUniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedUniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseSum.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseSum.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseTimes.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseTimes.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseToNumber.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseToNumber.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseToPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseToPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseToString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseToString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseUnary.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseUnary.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseUniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseUniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseUnset.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseUnset.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseUpdate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseUpdate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseValues.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseValues.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseWrapperValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseWrapperValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseXor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseXor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_baseZipObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_baseZipObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cacheHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cacheHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_castArrayLikeObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_castArrayLikeObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_castFunction.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_castFunction.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_castPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_castPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_castRest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_castRest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_castSlice.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_castSlice.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_charsEndIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_charsEndIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_charsStartIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_charsStartIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneArrayBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneArrayBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneDataView.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneDataView.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneSymbol.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneSymbol.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_cloneTypedArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_cloneTypedArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_compareAscending.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_compareAscending.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_compareMultiple.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_compareMultiple.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_composeArgs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_composeArgs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_composeArgsRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_composeArgsRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_copyArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_copyArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_copyObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_copyObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_copySymbols.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_copySymbols.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_copySymbolsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_copySymbolsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_coreJsData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_coreJsData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_countHolders.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_countHolders.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createAggregator.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createAggregator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createAssigner.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createAssigner.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createBaseEach.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createBaseEach.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createBaseFor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createBaseFor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createBind.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createBind.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createCaseFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createCaseFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createCompounder.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createCompounder.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createCtor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createCtor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createCurry.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createCurry.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createFind.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createFind.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createFlow.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createFlow.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createHybrid.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createHybrid.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createInverter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createInverter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createMathOperation.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createMathOperation.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createOver.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createOver.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createPadding.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createPadding.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createPartial.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createPartial.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createRange.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createRange.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createRecurry.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createRecurry.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createRelationalOperation.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createRelationalOperation.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createRound.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createRound.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createToPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createToPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_createWrap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_createWrap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsAssignIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsAssignIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsMerge.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsMerge.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_customOmitClone.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_customOmitClone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_deburrLetter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_deburrLetter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_defineProperty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_defineProperty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js84
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_equalByTag.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_equalByTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js90
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_escapeHtmlChar.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_escapeHtmlChar.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_escapeStringChar.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_escapeStringChar.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_flatRest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_flatRest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_freeGlobal.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_freeGlobal.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getAllKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getAllKeysIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeysIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getFuncName.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getFuncName.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getHolder.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getHolder.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getMapData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getMapData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getMatchData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getMatchData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getNative.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getNative.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getPrototype.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getPrototype.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getRawTag.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getRawTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getSymbols.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getSymbols.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getSymbolsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getSymbolsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getTag.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getView.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getView.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_getWrapDetails.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_getWrapDetails.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hasPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hasPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hasUnicode.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicode.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hasUnicodeWord.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hashClear.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hashClear.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hashDelete.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hashDelete.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hashGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hashGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hashHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hashHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_hashSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_hashSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_initCloneArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_initCloneByTag.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_initCloneObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_initCloneObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_insertWrapDetails.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_insertWrapDetails.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isFlattenable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isFlattenable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isIterateeCall.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isIterateeCall.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isKeyable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isKeyable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isLaziable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isLaziable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isMaskable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isMaskable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isMasked.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isMasked.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isPrototype.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isPrototype.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_isStrictComparable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_isStrictComparable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_iteratorToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_iteratorToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_lazyClone.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_lazyClone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_lazyReverse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_lazyReverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_lazyValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_lazyValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_listCacheClear.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheClear.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_listCacheDelete.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheDelete.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_listCacheGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_listCacheHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_listCacheSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_listCacheSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapCacheClear.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheClear.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapCacheDelete.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheDelete.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapCacheGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapCacheHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapCacheSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mapToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mapToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_matchesStrictComparable.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_matchesStrictComparable.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_memoizeCapped.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_memoizeCapped.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_mergeData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_mergeData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_metaMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_metaMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_nativeCreate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_nativeCreate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_nativeKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_nativeKeysIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeysIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_nodeUtil.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_objectToString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_objectToString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_overArg.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_overArg.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_overRest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_overRest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_parent.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_parent.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_reEscape.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_reEscape.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_reEvaluate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_reEvaluate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_reInterpolate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_reInterpolate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_realNames.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_realNames.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_reorder.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_reorder.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_replaceHolders.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_replaceHolders.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_root.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_root.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_safeGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setCacheAdd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setCacheAdd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setCacheHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setCacheHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setData.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setData.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setToPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setToPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setToString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setToString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_setWrapToString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_setWrapToString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_shortOut.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_shortOut.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_shuffleSelf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_shuffleSelf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stackClear.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stackClear.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stackDelete.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stackDelete.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stackGet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stackGet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stackHas.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stackHas.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stackSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stackSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_strictIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_strictIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_strictLastIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_strictLastIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stringSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stringSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stringToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stringToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_stringToPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_toKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_toKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_toSource.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_toSource.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_unescapeHtmlChar.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_unescapeHtmlChar.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_unicodeSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_unicodeToArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeToArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_unicodeWords.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_updateWrapDetails.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_updateWrapDetails.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/_wrapperClone.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/_wrapperClone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/add.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/add.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/after.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/after.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/array.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/array.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/ary.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/ary.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/assign.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/assign.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/assignIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/assignIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/assignInWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/assignInWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/assignWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/assignWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/at.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/at.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/attempt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/attempt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/before.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/before.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/bind.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/bind.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/bindAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/bindAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/bindKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/bindKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/camelCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/camelCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/capitalize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/capitalize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/castArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/castArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/ceil.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/ceil.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/chain.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/chain.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/chunk.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/chunk.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/clamp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/clamp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/clone.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/clone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/cloneDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/cloneDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/cloneDeepWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/cloneDeepWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/cloneWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/cloneWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/collection.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/collection.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/commit.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/commit.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/compact.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/compact.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/concat.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/concat.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/cond.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/cond.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/conforms.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/conforms.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/conformsTo.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/conformsTo.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/constant.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/constant.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/core.js3877
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/core.min.js30
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/countBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/countBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/create.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/create.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/curry.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/curry.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/curryRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/curryRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/date.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/date.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/debounce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/debounce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/deburr.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/deburr.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/defaultTo.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/defaultTo.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/defaults.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/defaults.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/defaultsDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/defaultsDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/defer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/defer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/delay.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/delay.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/difference.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/difference.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/differenceBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/differenceBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/differenceWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/differenceWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/divide.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/divide.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/drop.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/drop.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/dropRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/dropRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/dropRightWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/dropRightWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/dropWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/dropWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/each.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/each.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/eachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/eachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/endsWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/endsWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/entries.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/entries.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/entriesIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/entriesIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/eq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/eq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/escape.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/escape.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/escapeRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/escapeRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/every.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/every.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/extend.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/extend.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/extendWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/extendWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fill.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fill.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/filter.js52
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/find.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/find.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/findIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/findIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/findKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/findKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/findLast.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/findLast.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/findLastIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/findLastIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/findLastKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/findLastKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/first.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/first.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flatMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flatMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flatMapDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flatMapDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flatMapDepth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flatMapDepth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flatten.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flatten.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flattenDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flattenDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flattenDepth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flattenDepth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/floor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/floor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flow.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flow.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/flowRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/flowRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forEach.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forEach.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forEachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forEachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forInRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forInRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forOwn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forOwn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/forOwnRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/forOwnRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/F.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/F.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/T.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/T.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/__.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/__.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/_baseConvert.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/_convertBrowser.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/_convertBrowser.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/_falseOptions.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/_falseOptions.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/_mapping.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/_util.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/add.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/add.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/after.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/after.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/all.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/all.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/allPass.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/allPass.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/always.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/always.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/any.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/any.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/anyPass.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/anyPass.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/apply.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/apply.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/array.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/array.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/ary.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/ary.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assign.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assign.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignInWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assignWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assignWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assoc.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assoc.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/assocPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/assocPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/at.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/at.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/attempt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/attempt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/before.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/before.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/bind.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/bind.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/bindAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/bindAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/bindKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/bindKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/camelCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/camelCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/capitalize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/capitalize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/castArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/castArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/ceil.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/ceil.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/chain.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/chain.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/chunk.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/chunk.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/clamp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/clamp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/clone.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/clone.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeepWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeepWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/cloneWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/collection.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/collection.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/commit.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/commit.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/compact.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/compact.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/complement.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/complement.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/compose.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/compose.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/concat.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/concat.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/cond.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/cond.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/conforms.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/conforms.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/conformsTo.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/conformsTo.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/constant.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/constant.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/contains.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/contains.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/convert.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/convert.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/countBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/countBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/create.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/create.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/curry.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/curry.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/curryN.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryN.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/curryRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/curryRightN.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRightN.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/date.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/date.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/debounce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/debounce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/deburr.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/deburr.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defaultTo.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultTo.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defaults.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaults.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeepAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeepAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/defer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/defer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/delay.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/delay.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/difference.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/difference.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/differenceBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/differenceWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dissoc.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dissoc.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dissocPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dissocPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/divide.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/divide.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/drop.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/drop.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dropLast.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLast.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dropLastWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLastWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dropRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dropRightWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRightWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/dropWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/dropWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/each.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/each.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/eachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/eachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/endsWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/endsWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/entries.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/entries.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/entriesIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/entriesIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/eq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/eq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/equals.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/equals.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/escape.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/escape.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/escapeRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/escapeRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/every.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/every.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/extend.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/extend.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/extendAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/extendAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/extendWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/extendWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/fill.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/fill.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/filter.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/filter.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/find.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/find.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findIndexFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndexFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findLast.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLast.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findLastFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndexFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndexFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/findLastKey.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastKey.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/first.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/first.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flatMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDepth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDepth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flatten.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flatten.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDepth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDepth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/floor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/floor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flow.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flow.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/flowRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/flowRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forEach.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forEach.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forEachRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forEachRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forInRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forInRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forOwn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/forOwnRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwnRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/fromPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/fromPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/function.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/function.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/functions.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/functions.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/functionsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/functionsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/get.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/get.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/getOr.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/getOr.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/groupBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/groupBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/gt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/gt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/gte.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/gte.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/has.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/has.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/hasIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/hasIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/head.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/head.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/identical.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/identical.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/identity.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/identity.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/inRange.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/inRange.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/includes.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/includes.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/includesFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/includesFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/indexBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/indexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/indexOfFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOfFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/init.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/init.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/initial.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/initial.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/intersection.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersection.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invert.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invert.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invertBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invertBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invertObj.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invertObj.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invoke.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invoke.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgsMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgsMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/invokeMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isArguments.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArguments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLike.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLike.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLikeObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLikeObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isBoolean.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isBoolean.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isDate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isDate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isElement.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isElement.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isEmpty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEmpty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isEqual.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqual.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isEqualWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqualWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isError.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isError.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isFinite.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isFinite.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isFunction.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isFunction.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isLength.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isLength.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isMatch.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatch.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isMatchWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatchWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isNaN.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNaN.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isNative.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNative.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isNil.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNil.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isNull.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNull.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isNumber.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isNumber.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isObjectLike.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isObjectLike.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isPlainObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isPlainObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isSafeInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSafeInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isSymbol.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isSymbol.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isTypedArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isTypedArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isUndefined.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isUndefined.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/iteratee.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/iteratee.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/join.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/join.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/juxt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/juxt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/kebabCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/kebabCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/keyBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/keyBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/keys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/keys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/keysIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/keysIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lang.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lang.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/last.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/last.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOfFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOfFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lowerCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lowerFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/lte.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/lte.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/map.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/map.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mapKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mapKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mapValues.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mapValues.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/matches.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/matches.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/matchesProperty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/matchesProperty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/math.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/math.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/max.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/max.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/maxBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/maxBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mean.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mean.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/meanBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/meanBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/memoize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/memoize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/merge.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/merge.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mergeWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/method.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/method.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/methodOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/methodOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/min.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/min.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/minBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/minBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/mixin.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/mixin.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/multiply.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/multiply.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/nAry.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/nAry.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/negate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/negate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/next.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/next.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/noop.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/noop.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/now.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/now.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/nth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/nth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/nthArg.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/nthArg.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/number.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/number.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/object.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/object.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/omit.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/omit.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/omitAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/omitAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/omitBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/omitBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/once.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/once.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/orderBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/orderBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/over.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/over.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/overArgs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/overArgs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/overEvery.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/overEvery.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/overSome.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/overSome.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pad.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pad.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/padChars.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/padChars.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/padEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/padEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/padStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/padStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/parseInt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/parseInt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/partial.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/partial.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/partialRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/partialRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/partition.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/partition.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/path.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/path.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pathEq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pathEq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pathOr.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pathOr.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/paths.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/paths.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pick.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pick.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pickAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pickAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pickBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pickBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pipe.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pipe.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/placeholder.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/placeholder.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/plant.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/plant.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pluck.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pluck.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/prop.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/prop.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/propEq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/propEq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/propOr.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/propOr.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/property.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/property.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/propertyOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/propertyOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/props.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/props.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pull.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pull.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pullAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/pullAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/random.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/random.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/range.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/range.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/rangeRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStepRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStepRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/rearg.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/rearg.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/reduce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/reduce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/reduceRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/reduceRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/reject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/reject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/remove.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/remove.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/repeat.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/repeat.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/replace.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/replace.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/rest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/rest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/restFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/restFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/result.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/result.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/reverse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/reverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/round.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/round.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sample.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sample.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sampleSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sampleSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/seq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/seq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/set.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/set.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/setWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/setWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/shuffle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/shuffle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/size.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/size.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/slice.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/slice.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/snakeCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/snakeCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/some.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/some.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniqBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniqBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/split.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/split.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/spread.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/spread.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/spreadFrom.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/spreadFrom.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/startCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/startCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/startsWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/startsWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/string.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/string.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/stubArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/stubFalse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubFalse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/stubObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/stubString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/stubTrue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/stubTrue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/subtract.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/subtract.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sum.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sum.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/sumBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/sumBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifference.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifference.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/tail.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/tail.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/take.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/take.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/takeLast.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLast.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/takeLastWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLastWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/takeRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/takeRightWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRightWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/takeWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/takeWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/tap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/tap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/template.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/template.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/templateSettings.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/templateSettings.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/throttle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/throttle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/thru.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/thru.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/times.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/times.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toFinite.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toFinite.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toIterator.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toIterator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toJSON.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toJSON.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toLength.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toLength.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toLower.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toLower.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toNumber.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toNumber.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toPairsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toPlainObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toPlainObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toSafeInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toSafeInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/toUpper.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/toUpper.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/transform.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/transform.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trim.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trim.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trimChars.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimChars.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trimEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/trimStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/trimStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/truncate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/truncate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unapply.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unapply.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unary.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unary.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unescape.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unescape.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/union.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/union.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unionBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unionBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unionWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unionWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/uniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/uniqBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/uniqWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/uniqueId.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqueId.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unnest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unnest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unset.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unset.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unzip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unzip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/unzipWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/unzipWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/update.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/update.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/updateWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/updateWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/upperCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/upperCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/upperFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/upperFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/useWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/useWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/util.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/util.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/value.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/value.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/valueOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/valueOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/values.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/values.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/valuesIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/valuesIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/where.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/where.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/whereEq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/whereEq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/without.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/without.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/words.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/words.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperChain.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperChain.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperLodash.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperLodash.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperReverse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperReverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/xor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/xor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/xorBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/xorBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/xorWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/xorWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zipAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zipObj.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObj.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zipObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zipObjectDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObjectDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fp/zipWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fp/zipWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/fromPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/fromPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/function.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/function.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/functions.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/functions.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/functionsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/functionsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/get.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/get.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/groupBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/groupBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/gt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/gt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/gte.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/gte.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/has.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/has.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/hasIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/hasIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/head.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/head.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/identity.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/identity.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/inRange.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/inRange.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/includes.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/includes.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/index.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/indexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/indexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/initial.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/initial.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/intersection.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/intersection.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/intersectionBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/intersectionBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/intersectionWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/intersectionWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/invert.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/invert.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/invertBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/invoke.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/invoke.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/invokeMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/invokeMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isArguments.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isArguments.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isArrayBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isArrayBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isArrayLike.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isArrayLike.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isArrayLikeObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isArrayLikeObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isBoolean.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isBoolean.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isBuffer.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isBuffer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isDate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isDate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isElement.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isElement.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isEmpty.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isEmpty.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isEqual.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isEqual.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isEqualWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isEqualWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isError.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isError.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isFinite.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isFinite.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isFunction.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isFunction.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isLength.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isLength.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isMatch.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isMatch.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isMatchWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isMatchWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isNaN.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isNaN.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isNative.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isNative.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isNil.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isNil.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isNull.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isNull.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isNumber.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isNumber.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isObjectLike.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isObjectLike.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isPlainObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isPlainObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isRegExp.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isRegExp.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isSafeInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isSafeInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isSymbol.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isSymbol.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isTypedArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isTypedArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isUndefined.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isUndefined.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isWeakMap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isWeakMap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/isWeakSet.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/isWeakSet.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/iteratee.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/iteratee.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/join.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/join.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/kebabCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/kebabCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/keyBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/keyBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/keys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/keys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/keysIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/keysIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lang.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lang.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/last.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/last.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lastIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lastIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lodash.js17161
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js139
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lowerCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lowerCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lowerFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lowerFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/lte.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/lte.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/map.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/map.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/mapKeys.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/mapKeys.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/mapValues.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/mapValues.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/matches.js46
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js44
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/math.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/math.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/max.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/max.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/maxBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/maxBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/mean.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/mean.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/meanBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/meanBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/memoize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/memoize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/merge.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/merge.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/mergeWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/mergeWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/method.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/method.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/methodOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/methodOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/min.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/min.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/minBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/minBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/mixin.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/mixin.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/multiply.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/multiply.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/negate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/negate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/next.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/next.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/noop.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/noop.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/now.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/now.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/nth.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/nth.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/nthArg.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/nthArg.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/number.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/number.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/object.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/object.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/omit.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/omit.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/omitBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/omitBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/once.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/once.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/orderBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/orderBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/over.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/over.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/overArgs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/overArgs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/overEvery.js34
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/overSome.js37
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/package.json17
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pad.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pad.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/padEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/padEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/padStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/padStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/parseInt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/parseInt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/partial.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/partial.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/partialRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/partialRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/partition.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/partition.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pick.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pick.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pickBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pickBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/plant.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/plant.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/property.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/property.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/propertyOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/propertyOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pull.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pull.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pullAll.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pullAll.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pullAllBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pullAllBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pullAllWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pullAllWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/pullAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/pullAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/random.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/random.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/range.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/range.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/rangeRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/rangeRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/rearg.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/rearg.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/reduce.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/reduce.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/reduceRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/reduceRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/reject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/reject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/remove.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/remove.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/repeat.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/repeat.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/replace.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/replace.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/rest.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/rest.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/result.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/result.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/reverse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/reverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/round.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/round.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sample.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sample.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sampleSize.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sampleSize.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/seq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/seq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/set.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/set.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/setWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/setWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/shuffle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/shuffle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/size.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/size.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/slice.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/slice.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/snakeCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/snakeCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/some.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/some.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortBy.js48
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedIndexBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndex.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndex.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedUniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedUniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sortedUniqBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sortedUniqBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/split.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/split.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/spread.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/spread.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/startCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/startCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/startsWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/startsWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/string.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/string.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/stubArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/stubArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/stubFalse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/stubFalse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/stubObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/stubObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/stubString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/stubString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/stubTrue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/stubTrue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/subtract.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/subtract.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sum.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sum.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/sumBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/sumBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/tail.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/tail.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/take.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/take.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/takeRight.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/takeRight.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/takeRightWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/takeRightWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/takeWhile.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/takeWhile.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/tap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/tap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/template.js251
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/templateSettings.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/templateSettings.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/throttle.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/throttle.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/thru.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/thru.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/times.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/times.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toArray.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toArray.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toFinite.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toFinite.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toIterator.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toIterator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toJSON.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toJSON.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toLength.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toLength.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toLower.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toLower.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toNumber.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toNumber.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toPairs.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toPairs.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toPairsIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toPairsIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toPath.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toPath.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toPlainObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toPlainObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toSafeInteger.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toSafeInteger.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toString.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toString.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/toUpper.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/toUpper.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/transform.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/transform.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/trim.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/trim.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/trimEnd.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/trimEnd.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/trimStart.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/trimStart.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/truncate.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/truncate.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unary.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unary.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unescape.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unescape.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/union.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/union.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unionBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unionBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unionWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unionWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/uniq.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/uniq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/uniqBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/uniqBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/uniqWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/uniqWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/uniqueId.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/uniqueId.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unset.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unset.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unzip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unzip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/unzipWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/unzipWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/update.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/update.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/updateWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/updateWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/upperCase.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/upperCase.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/upperFirst.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/upperFirst.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/util.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/util.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/value.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/value.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/valueOf.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/valueOf.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/values.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/values.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/valuesIn.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/valuesIn.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/without.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/without.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/words.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/words.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrap.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrap.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrapperAt.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrapperAt.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrapperChain.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrapperChain.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrapperLodash.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrapperLodash.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrapperReverse.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrapperReverse.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/wrapperValue.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/wrapperValue.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/xor.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/xor.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/xorBy.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/xorBy.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/xorWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/xorWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/zip.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/zip.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/zipObject.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/zipObject.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/zipObjectDeep.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/zipObjectDeep.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/lodash/zipWith.js (renamed from tools/node_modules/babel-eslint/node_modules/lodash/zipWith.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/minimist/LICENSE18
-rw-r--r--tools/node_modules/@babel/core/node_modules/minimist/index.js245
-rw-r--r--tools/node_modules/@babel/core/node_modules/minimist/package.json45
-rw-r--r--tools/node_modules/@babel/core/node_modules/minimist/readme.markdown95
-rw-r--r--tools/node_modules/@babel/core/node_modules/ms/index.js (renamed from tools/node_modules/babel-eslint/node_modules/ms/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/ms/license.md (renamed from tools/node_modules/babel-eslint/node_modules/ms/license.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/ms/package.json37
-rw-r--r--tools/node_modules/@babel/core/node_modules/ms/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/ms/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/path-parse/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/path-parse/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/path-parse/README.md (renamed from tools/node_modules/babel-eslint/node_modules/path-parse/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/path-parse/index.js (renamed from tools/node_modules/babel-eslint/node_modules/path-parse/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/path-parse/package.json33
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/resolve/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/index.js6
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/async.js299
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/caller.js (renamed from tools/node_modules/babel-eslint/node_modules/resolve/lib/caller.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/core.js53
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/core.json80
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js5
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/node-modules-paths.js (renamed from tools/node_modules/babel-eslint/node_modules/resolve/lib/node-modules-paths.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/normalize-options.js (renamed from tools/node_modules/babel-eslint/node_modules/resolve/lib/normalize-options.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js192
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/package.json51
-rw-r--r--tools/node_modules/@babel/core/node_modules/resolve/readme.markdown250
-rw-r--r--tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE21
-rw-r--r--tools/node_modules/@babel/core/node_modules/safe-buffer/README.md584
-rw-r--r--tools/node_modules/@babel/core/node_modules/safe-buffer/index.js62
-rw-r--r--tools/node_modules/@babel/core/node_modules/safe-buffer/package.json37
-rw-r--r--tools/node_modules/@babel/core/node_modules/semver/LICENSE15
-rw-r--r--tools/node_modules/@babel/core/node_modules/semver/README.md412
-rwxr-xr-xtools/node_modules/@babel/core/node_modules/semver/bin/semver160
-rw-r--r--tools/node_modules/@babel/core/node_modules/semver/package.json28
-rw-r--r--tools/node_modules/@babel/core/node_modules/semver/range.bnf16
-rw-r--r--tools/node_modules/@babel/core/node_modules/semver/semver.js1483
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/source-map/LICENSE)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/README.md (renamed from tools/node_modules/babel-eslint/node_modules/source-map/README.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/array-set.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/base64.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/source-node.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/lib/util.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/package.json72
-rw-r--r--tools/node_modules/@babel/core/node_modules/source-map/source-map.js (renamed from tools/node_modules/babel-eslint/node_modules/source-map/source-map.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/supports-color/browser.js (renamed from tools/node_modules/babel-eslint/node_modules/supports-color/browser.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/supports-color/index.js (renamed from tools/node_modules/babel-eslint/node_modules/supports-color/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/supports-color/license (renamed from tools/node_modules/babel-eslint/node_modules/supports-color/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/supports-color/package.json53
-rw-r--r--tools/node_modules/@babel/core/node_modules/supports-color/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/supports-color/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/to-fast-properties/index.js (renamed from tools/node_modules/babel-eslint/node_modules/to-fast-properties/index.js)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/to-fast-properties/license (renamed from tools/node_modules/babel-eslint/node_modules/to-fast-properties/license)0
-rw-r--r--tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json35
-rw-r--r--tools/node_modules/@babel/core/node_modules/to-fast-properties/readme.md (renamed from tools/node_modules/babel-eslint/node_modules/to-fast-properties/readme.md)0
-rw-r--r--tools/node_modules/@babel/core/package.json66
-rw-r--r--tools/node_modules/@babel/core/src/config/files/index-browser.js96
-rw-r--r--tools/node_modules/@babel/core/src/config/files/index.js31
-rw-r--r--tools/node_modules/@babel/core/src/transform-file-browser.js29
-rw-r--r--tools/node_modules/@babel/core/src/transform-file.js40
-rw-r--r--tools/node_modules/@babel/eslint-parser/LICENSE22
-rw-r--r--tools/node_modules/@babel/eslint-parser/README.md124
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js356
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/configuration.js66
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js158
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js20
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js150
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/convert/index.js20
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/index.js68
-rw-r--r--tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js28
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE22
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md54
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js86
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js165
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js152
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js167
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js629
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js247
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js748
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js88
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json48
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/LICENSE (renamed from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE)0
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/README.md (renamed from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md)0
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/index.js (renamed from tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js)0
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json284
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json40
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md171
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js117
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD (renamed from tools/node_modules/babel-eslint/node_modules/esutils/LICENSE.BSD)0
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md153
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js801
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json40
-rwxr-xr-xtools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json52
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD19
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md153
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js782
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json40
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE15
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md443
-rwxr-xr-xtools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js174
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json28
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf16
-rw-r--r--tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js1596
-rw-r--r--tools/node_modules/@babel/eslint-parser/package.json43
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE22
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/README.md19
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js22
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE22
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md19
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js77
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json18
-rw-r--r--tools/node_modules/@babel/plugin-syntax-class-properties/package.json27
-rw-r--r--tools/node_modules/babel-eslint/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/README.md103
-rw-r--r--tools/node_modules/babel-eslint/lib/analyze-scope.js342
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js59
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js17
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js92
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js30
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js118
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js84
-rw-r--r--tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js10
-rw-r--r--tools/node_modules/babel-eslint/lib/index.js19
-rw-r--r--tools/node_modules/babel-eslint/lib/parse-with-scope.js12
-rw-r--r--tools/node_modules/babel-eslint/lib/parse.js93
-rw-r--r--tools/node_modules/babel-eslint/lib/require-from-eslint.js9
-rw-r--r--tools/node_modules/babel-eslint/lib/visitor-keys.js15
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js173
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json29
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md19
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/buffer.js257
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/base.js97
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js190
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/expressions.js292
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js639
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js137
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js167
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js214
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/statements.js319
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js198
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js715
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js92
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js117
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js253
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js192
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js501
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js81
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json36
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js198
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json21
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js32
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js68
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json20
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js129
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json30
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md19
-rwxr-xr-xtools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js11353
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json48
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/README.md19
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js63
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js36
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/literal.js82
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js82
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js193
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js133
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/template/package.json27
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md19
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js152
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js130
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/ancestry.js188
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js47
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js245
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js463
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/evaluation.js404
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js241
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js219
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js132
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js181
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js227
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js371
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js188
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js216
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/modification.js222
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/removal.js65
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js266
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/binding.js71
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js892
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js138
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/visitors.js254
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json36
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/README.md19
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/assertNode.js17
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js1364
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/builder.js50
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js22
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js1148
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js78
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js16
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js93
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js47
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js73
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js23
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/valueToNode.js104
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js725
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js401
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js205
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js386
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js101
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/jsx.js160
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js23
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/placeholders.js33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js412
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js249
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js579
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow1975
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js4317
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNodesEquivalent.js67
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isReferenced.js112
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js24
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js28
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js23
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/package.json29
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/docs.js117
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js153
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateAsserts.js43
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js43
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js200
-rw-r--r--tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js9
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json65
-rw-r--r--tools/node_modules/babel-eslint/node_modules/chalk/package.json80
-rw-r--r--tools/node_modules/babel-eslint/node_modules/color-convert/package.json58
-rw-r--r--tools/node_modules/babel-eslint/node_modules/color-name/package.json30
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js912
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/package.json79
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/browser.js264
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/common.js266
-rw-r--r--tools/node_modules/babel-eslint/node_modules/debug/src/node.js257
-rw-r--r--tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json58
-rw-r--r--tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json280
-rw-r--r--tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json48
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/README.md174
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js144
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js135
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js165
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js33
-rw-r--r--tools/node_modules/babel-eslint/node_modules/esutils/package.json49
-rw-r--r--tools/node_modules/babel-eslint/node_modules/globals/package.json50
-rw-r--r--tools/node_modules/babel-eslint/node_modules/has-flag/package.json53
-rw-r--r--tools/node_modules/babel-eslint/node_modules/js-tokens/package.json41
-rw-r--r--tools/node_modules/babel-eslint/node_modules/jsesc/package.json62
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/README.md39
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js165
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js34
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js47
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js64
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js83
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js89
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/core.js3854
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/core.min.js29
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/filter.js48
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/lodash.js17112
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js137
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/matches.js39
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js37
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js30
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/overSome.js30
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/package.json40
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js48
-rw-r--r--tools/node_modules/babel-eslint/node_modules/lodash/template.js253
-rw-r--r--tools/node_modules/babel-eslint/node_modules/ms/package.json46
-rw-r--r--tools/node_modules/babel-eslint/node_modules/path-parse/package.json38
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/index.js8
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js271
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js53
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json74
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js172
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/package.json49
-rw-r--r--tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown201
-rw-r--r--tools/node_modules/babel-eslint/node_modules/source-map/package.json188
-rw-r--r--tools/node_modules/babel-eslint/node_modules/supports-color/package.json62
-rw-r--r--tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json44
-rw-r--r--tools/node_modules/babel-eslint/node_modules/trim-right/index.js10
-rw-r--r--tools/node_modules/babel-eslint/node_modules/trim-right/license21
-rw-r--r--tools/node_modules/babel-eslint/node_modules/trim-right/package.json46
-rw-r--r--tools/node_modules/babel-eslint/node_modules/trim-right/readme.md30
-rw-r--r--tools/node_modules/babel-eslint/package.json67
-rwxr-xr-xtools/update-babel-eslint.sh14
1706 files changed, 95486 insertions, 64099 deletions
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE b/tools/node_modules/@babel/core/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/LICENSE
+++ b/tools/node_modules/@babel/core/LICENSE
diff --git a/tools/node_modules/@babel/core/README.md b/tools/node_modules/@babel/core/README.md
new file mode 100644
index 00000000000..9b3a9503360
--- /dev/null
+++ b/tools/node_modules/@babel/core/README.md
@@ -0,0 +1,19 @@
+# @babel/core
+
+> Babel compiler core.
+
+See our website [@babel/core](https://babeljs.io/docs/en/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/core
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/core --dev
+```
diff --git a/tools/node_modules/@babel/core/lib/config/caching.js b/tools/node_modules/@babel/core/lib/config/caching.js
new file mode 100644
index 00000000000..acd576b1cef
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/caching.js
@@ -0,0 +1,327 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.makeWeakCache = makeWeakCache;
+exports.makeWeakCacheSync = makeWeakCacheSync;
+exports.makeStrongCache = makeStrongCache;
+exports.makeStrongCacheSync = makeStrongCacheSync;
+exports.assertSimpleType = assertSimpleType;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _async = require("../gensync-utils/async");
+
+var _util = require("./util");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const synchronize = gen => {
+ return (0, _gensync().default)(gen).sync;
+};
+
+function* genTrue(data) {
+ return true;
+}
+
+function makeWeakCache(handler) {
+ return makeCachedFunction(WeakMap, handler);
+}
+
+function makeWeakCacheSync(handler) {
+ return synchronize(makeWeakCache(handler));
+}
+
+function makeStrongCache(handler) {
+ return makeCachedFunction(Map, handler);
+}
+
+function makeStrongCacheSync(handler) {
+ return synchronize(makeStrongCache(handler));
+}
+
+function makeCachedFunction(CallCache, handler) {
+ const callCacheSync = new CallCache();
+ const callCacheAsync = new CallCache();
+ const futureCache = new CallCache();
+ return function* cachedFunction(arg, data) {
+ const asyncContext = yield* (0, _async.isAsync)();
+ const callCache = asyncContext ? callCacheAsync : callCacheSync;
+ const cached = yield* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data);
+ if (cached.valid) return cached.value;
+ const cache = new CacheConfigurator(data);
+ const handlerResult = handler(arg, cache);
+ let finishLock;
+ let value;
+
+ if ((0, _util.isIterableIterator)(handlerResult)) {
+ const gen = handlerResult;
+ value = yield* (0, _async.onFirstPause)(gen, () => {
+ finishLock = setupAsyncLocks(cache, futureCache, arg);
+ });
+ } else {
+ value = handlerResult;
+ }
+
+ updateFunctionCache(callCache, cache, arg, value);
+
+ if (finishLock) {
+ futureCache.delete(arg);
+ finishLock.release(value);
+ }
+
+ return value;
+ };
+}
+
+function* getCachedValue(cache, arg, data) {
+ const cachedValue = cache.get(arg);
+
+ if (cachedValue) {
+ for (const {
+ value,
+ valid
+ } of cachedValue) {
+ if (yield* valid(data)) return {
+ valid: true,
+ value
+ };
+ }
+ }
+
+ return {
+ valid: false,
+ value: null
+ };
+}
+
+function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) {
+ const cached = yield* getCachedValue(callCache, arg, data);
+
+ if (cached.valid) {
+ return cached;
+ }
+
+ if (asyncContext) {
+ const cached = yield* getCachedValue(futureCache, arg, data);
+
+ if (cached.valid) {
+ const value = yield* (0, _async.waitFor)(cached.value.promise);
+ return {
+ valid: true,
+ value
+ };
+ }
+ }
+
+ return {
+ valid: false,
+ value: null
+ };
+}
+
+function setupAsyncLocks(config, futureCache, arg) {
+ const finishLock = new Lock();
+ updateFunctionCache(futureCache, config, arg, finishLock);
+ return finishLock;
+}
+
+function updateFunctionCache(cache, config, arg, value) {
+ if (!config.configured()) config.forever();
+ let cachedValue = cache.get(arg);
+ config.deactivate();
+
+ switch (config.mode()) {
+ case "forever":
+ cachedValue = [{
+ value,
+ valid: genTrue
+ }];
+ cache.set(arg, cachedValue);
+ break;
+
+ case "invalidate":
+ cachedValue = [{
+ value,
+ valid: config.validator()
+ }];
+ cache.set(arg, cachedValue);
+ break;
+
+ case "valid":
+ if (cachedValue) {
+ cachedValue.push({
+ value,
+ valid: config.validator()
+ });
+ } else {
+ cachedValue = [{
+ value,
+ valid: config.validator()
+ }];
+ cache.set(arg, cachedValue);
+ }
+
+ }
+}
+
+class CacheConfigurator {
+ constructor(data) {
+ this._active = true;
+ this._never = false;
+ this._forever = false;
+ this._invalidate = false;
+ this._configured = false;
+ this._pairs = [];
+ this._data = void 0;
+ this._data = data;
+ }
+
+ simple() {
+ return makeSimpleConfigurator(this);
+ }
+
+ mode() {
+ if (this._never) return "never";
+ if (this._forever) return "forever";
+ if (this._invalidate) return "invalidate";
+ return "valid";
+ }
+
+ forever() {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._never) {
+ throw new Error("Caching has already been configured with .never()");
+ }
+
+ this._forever = true;
+ this._configured = true;
+ }
+
+ never() {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._forever) {
+ throw new Error("Caching has already been configured with .forever()");
+ }
+
+ this._never = true;
+ this._configured = true;
+ }
+
+ using(handler) {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._never || this._forever) {
+ throw new Error("Caching has already been configured with .never or .forever()");
+ }
+
+ this._configured = true;
+ const key = handler(this._data);
+ const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`);
+
+ if ((0, _async.isThenable)(key)) {
+ return key.then(key => {
+ this._pairs.push([key, fn]);
+
+ return key;
+ });
+ }
+
+ this._pairs.push([key, fn]);
+
+ return key;
+ }
+
+ invalidate(handler) {
+ this._invalidate = true;
+ return this.using(handler);
+ }
+
+ validator() {
+ const pairs = this._pairs;
+ return function* (data) {
+ for (const [key, fn] of pairs) {
+ if (key !== (yield* fn(data))) return false;
+ }
+
+ return true;
+ };
+ }
+
+ deactivate() {
+ this._active = false;
+ }
+
+ configured() {
+ return this._configured;
+ }
+
+}
+
+function makeSimpleConfigurator(cache) {
+ function cacheFn(val) {
+ if (typeof val === "boolean") {
+ if (val) cache.forever();else cache.never();
+ return;
+ }
+
+ return cache.using(() => assertSimpleType(val()));
+ }
+
+ cacheFn.forever = () => cache.forever();
+
+ cacheFn.never = () => cache.never();
+
+ cacheFn.using = cb => cache.using(() => assertSimpleType(cb()));
+
+ cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb()));
+
+ return cacheFn;
+}
+
+function assertSimpleType(value) {
+ if ((0, _async.isThenable)(value)) {
+ throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`);
+ }
+
+ if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") {
+ throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
+ }
+
+ return value;
+}
+
+class Lock {
+ constructor() {
+ this.released = false;
+ this.promise = void 0;
+ this._resolve = void 0;
+ this.promise = new Promise(resolve => {
+ this._resolve = resolve;
+ });
+ }
+
+ release(value) {
+ this.released = true;
+
+ this._resolve(value);
+ }
+
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/config-chain.js b/tools/node_modules/@babel/core/lib/config/config-chain.js
new file mode 100644
index 00000000000..60116cb417e
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/config-chain.js
@@ -0,0 +1,552 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.buildPresetChain = buildPresetChain;
+exports.buildRootChain = buildRootChain;
+exports.buildPresetChainWalker = void 0;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _debug() {
+ const data = _interopRequireDefault(require("debug"));
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _options = require("./validation/options");
+
+var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex"));
+
+var _printer = require("./printer");
+
+var _files = require("./files");
+
+var _caching = require("./caching");
+
+var _configDescriptors = require("./config-descriptors");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const debug = (0, _debug().default)("babel:config:config-chain");
+
+function* buildPresetChain(arg, context) {
+ const chain = yield* buildPresetChainWalker(arg, context);
+ if (!chain) return null;
+ return {
+ plugins: dedupDescriptors(chain.plugins),
+ presets: dedupDescriptors(chain.presets),
+ options: chain.options.map(o => normalizeOptions(o)),
+ files: new Set()
+ };
+}
+
+const buildPresetChainWalker = makeChainWalker({
+ root: preset => loadPresetDescriptors(preset),
+ env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),
+ overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),
+ overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName),
+ createLogger: () => () => {}
+});
+exports.buildPresetChainWalker = buildPresetChainWalker;
+const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors));
+const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName)));
+const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index)));
+const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName))));
+
+function* buildRootChain(opts, context) {
+ let configReport, babelRcReport;
+ const programmaticLogger = new _printer.ConfigPrinter();
+ const programmaticChain = yield* loadProgrammaticChain({
+ options: opts,
+ dirname: context.cwd
+ }, context, undefined, programmaticLogger);
+ if (!programmaticChain) return null;
+ const programmaticReport = programmaticLogger.output();
+ let configFile;
+
+ if (typeof opts.configFile === "string") {
+ configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
+ } else if (opts.configFile !== false) {
+ configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller);
+ }
+
+ let {
+ babelrc,
+ babelrcRoots
+ } = opts;
+ let babelrcRootsDirectory = context.cwd;
+ const configFileChain = emptyChain();
+ const configFileLogger = new _printer.ConfigPrinter();
+
+ if (configFile) {
+ const validatedFile = validateConfigFile(configFile);
+ const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger);
+ if (!result) return null;
+ configReport = configFileLogger.output();
+
+ if (babelrc === undefined) {
+ babelrc = validatedFile.options.babelrc;
+ }
+
+ if (babelrcRoots === undefined) {
+ babelrcRootsDirectory = validatedFile.dirname;
+ babelrcRoots = validatedFile.options.babelrcRoots;
+ }
+
+ mergeChain(configFileChain, result);
+ }
+
+ const pkgData = typeof context.filename === "string" ? yield* (0, _files.findPackageData)(context.filename) : null;
+ let ignoreFile, babelrcFile;
+ let isIgnored = false;
+ const fileChain = emptyChain();
+
+ if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {
+ ({
+ ignore: ignoreFile,
+ config: babelrcFile
+ } = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller));
+
+ if (ignoreFile) {
+ fileChain.files.add(ignoreFile.filepath);
+ }
+
+ if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) {
+ isIgnored = true;
+ }
+
+ if (babelrcFile && !isIgnored) {
+ const validatedFile = validateBabelrcFile(babelrcFile);
+ const babelrcLogger = new _printer.ConfigPrinter();
+ const result = yield* loadFileChain(validatedFile, context, undefined, babelrcLogger);
+
+ if (!result) {
+ isIgnored = true;
+ } else {
+ babelRcReport = babelrcLogger.output();
+ mergeChain(fileChain, result);
+ }
+ }
+
+ if (babelrcFile && isIgnored) {
+ fileChain.files.add(babelrcFile.filepath);
+ }
+ }
+
+ if (context.showConfig) {
+ console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n"));
+ return null;
+ }
+
+ const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
+ return {
+ plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),
+ presets: isIgnored ? [] : dedupDescriptors(chain.presets),
+ options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),
+ fileHandling: isIgnored ? "ignored" : "transpile",
+ ignore: ignoreFile || undefined,
+ babelrc: babelrcFile || undefined,
+ config: configFile || undefined,
+ files: chain.files
+ };
+}
+
+function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
+ if (typeof babelrcRoots === "boolean") return babelrcRoots;
+ const absoluteRoot = context.root;
+
+ if (babelrcRoots === undefined) {
+ return pkgData.directories.indexOf(absoluteRoot) !== -1;
+ }
+
+ let babelrcPatterns = babelrcRoots;
+ if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns];
+ babelrcPatterns = babelrcPatterns.map(pat => {
+ return typeof pat === "string" ? _path().default.resolve(babelrcRootsDirectory, pat) : pat;
+ });
+
+ if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
+ return pkgData.directories.indexOf(absoluteRoot) !== -1;
+ }
+
+ return babelrcPatterns.some(pat => {
+ if (typeof pat === "string") {
+ pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory);
+ }
+
+ return pkgData.directories.some(directory => {
+ return matchPattern(pat, babelrcRootsDirectory, directory, context);
+ });
+ });
+}
+
+const validateConfigFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("configfile", file.options)
+}));
+const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("babelrcfile", file.options)
+}));
+const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("extendsfile", file.options)
+}));
+const loadProgrammaticChain = makeChainWalker({
+ root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors),
+ env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName),
+ overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index),
+ overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName),
+ createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger)
+});
+const loadFileChainWalker = makeChainWalker({
+ root: file => loadFileDescriptors(file),
+ env: (file, envName) => loadFileEnvDescriptors(file)(envName),
+ overrides: (file, index) => loadFileOverridesDescriptors(file)(index),
+ overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName),
+ createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger)
+});
+
+function* loadFileChain(input, context, files, baseLogger) {
+ const chain = yield* loadFileChainWalker(input, context, files, baseLogger);
+
+ if (chain) {
+ chain.files.add(input.filepath);
+ }
+
+ return chain;
+}
+
+const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors));
+const loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName)));
+const loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index)));
+const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName))));
+
+function buildFileLogger(filepath, context, baseLogger) {
+ if (!baseLogger) {
+ return () => {};
+ }
+
+ return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, {
+ filepath
+ });
+}
+
+function buildRootDescriptors({
+ dirname,
+ options
+}, alias, descriptors) {
+ return descriptors(dirname, options, alias);
+}
+
+function buildProgrammaticLogger(_, context, baseLogger) {
+ var _context$caller;
+
+ if (!baseLogger) {
+ return () => {};
+ }
+
+ return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, {
+ callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name
+ });
+}
+
+function buildEnvDescriptors({
+ dirname,
+ options
+}, alias, descriptors, envName) {
+ const opts = options.env && options.env[envName];
+ return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
+}
+
+function buildOverrideDescriptors({
+ dirname,
+ options
+}, alias, descriptors, index) {
+ const opts = options.overrides && options.overrides[index];
+ if (!opts) throw new Error("Assertion failure - missing override");
+ return descriptors(dirname, opts, `${alias}.overrides[${index}]`);
+}
+
+function buildOverrideEnvDescriptors({
+ dirname,
+ options
+}, alias, descriptors, index, envName) {
+ const override = options.overrides && options.overrides[index];
+ if (!override) throw new Error("Assertion failure - missing override");
+ const opts = override.env && override.env[envName];
+ return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
+}
+
+function makeChainWalker({
+ root,
+ env,
+ overrides,
+ overridesEnv,
+ createLogger
+}) {
+ return function* (input, context, files = new Set(), baseLogger) {
+ const {
+ dirname
+ } = input;
+ const flattenedConfigs = [];
+ const rootOpts = root(input);
+
+ if (configIsApplicable(rootOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: rootOpts,
+ envName: undefined,
+ index: undefined
+ });
+ const envOpts = env(input, context.envName);
+
+ if (envOpts && configIsApplicable(envOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: envOpts,
+ envName: context.envName,
+ index: undefined
+ });
+ }
+
+ (rootOpts.options.overrides || []).forEach((_, index) => {
+ const overrideOps = overrides(input, index);
+
+ if (configIsApplicable(overrideOps, dirname, context)) {
+ flattenedConfigs.push({
+ config: overrideOps,
+ index,
+ envName: undefined
+ });
+ const overrideEnvOpts = overridesEnv(input, index, context.envName);
+
+ if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: overrideEnvOpts,
+ index,
+ envName: context.envName
+ });
+ }
+ }
+ });
+ }
+
+ if (flattenedConfigs.some(({
+ config: {
+ options: {
+ ignore,
+ only
+ }
+ }
+ }) => shouldIgnore(context, ignore, only, dirname))) {
+ return null;
+ }
+
+ const chain = emptyChain();
+ const logger = createLogger(input, context, baseLogger);
+
+ for (const {
+ config,
+ index,
+ envName
+ } of flattenedConfigs) {
+ if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) {
+ return null;
+ }
+
+ logger(config, index, envName);
+ mergeChainOpts(chain, config);
+ }
+
+ return chain;
+ };
+}
+
+function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
+ if (opts.extends === undefined) return true;
+ const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller);
+
+ if (files.has(file)) {
+ throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n"));
+ }
+
+ files.add(file);
+ const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger);
+ files.delete(file);
+ if (!fileChain) return false;
+ mergeChain(chain, fileChain);
+ return true;
+}
+
+function mergeChain(target, source) {
+ target.options.push(...source.options);
+ target.plugins.push(...source.plugins);
+ target.presets.push(...source.presets);
+
+ for (const file of source.files) {
+ target.files.add(file);
+ }
+
+ return target;
+}
+
+function mergeChainOpts(target, {
+ options,
+ plugins,
+ presets
+}) {
+ target.options.push(options);
+ target.plugins.push(...plugins());
+ target.presets.push(...presets());
+ return target;
+}
+
+function emptyChain() {
+ return {
+ options: [],
+ presets: [],
+ plugins: [],
+ files: new Set()
+ };
+}
+
+function normalizeOptions(opts) {
+ const options = Object.assign({}, opts);
+ delete options.extends;
+ delete options.env;
+ delete options.overrides;
+ delete options.plugins;
+ delete options.presets;
+ delete options.passPerPreset;
+ delete options.ignore;
+ delete options.only;
+ delete options.test;
+ delete options.include;
+ delete options.exclude;
+
+ if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
+ options.sourceMaps = options.sourceMap;
+ delete options.sourceMap;
+ }
+
+ return options;
+}
+
+function dedupDescriptors(items) {
+ const map = new Map();
+ const descriptors = [];
+
+ for (const item of items) {
+ if (typeof item.value === "function") {
+ const fnKey = item.value;
+ let nameMap = map.get(fnKey);
+
+ if (!nameMap) {
+ nameMap = new Map();
+ map.set(fnKey, nameMap);
+ }
+
+ let desc = nameMap.get(item.name);
+
+ if (!desc) {
+ desc = {
+ value: item
+ };
+ descriptors.push(desc);
+ if (!item.ownPass) nameMap.set(item.name, desc);
+ } else {
+ desc.value = item;
+ }
+ } else {
+ descriptors.push({
+ value: item
+ });
+ }
+ }
+
+ return descriptors.reduce((acc, desc) => {
+ acc.push(desc.value);
+ return acc;
+ }, []);
+}
+
+function configIsApplicable({
+ options
+}, dirname, context) {
+ return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname));
+}
+
+function configFieldIsApplicable(context, test, dirname) {
+ const patterns = Array.isArray(test) ? test : [test];
+ return matchesPatterns(context, patterns, dirname);
+}
+
+function shouldIgnore(context, ignore, only, dirname) {
+ if (ignore && matchesPatterns(context, ignore, dirname)) {
+ var _context$filename;
+
+ const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore)}\` from "${dirname}"`;
+ debug(message);
+
+ if (context.showConfig) {
+ console.log(message);
+ }
+
+ return true;
+ }
+
+ if (only && !matchesPatterns(context, only, dirname)) {
+ var _context$filename2;
+
+ const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only)}\` from "${dirname}"`;
+ debug(message);
+
+ if (context.showConfig) {
+ console.log(message);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+function matchesPatterns(context, patterns, dirname) {
+ return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context));
+}
+
+function matchPattern(pattern, dirname, pathToTest, context) {
+ if (typeof pattern === "function") {
+ return !!pattern(pathToTest, {
+ dirname,
+ envName: context.envName,
+ caller: context.caller
+ });
+ }
+
+ if (typeof pathToTest !== "string") {
+ throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`);
+ }
+
+ if (typeof pattern === "string") {
+ pattern = (0, _patternToRegex.default)(pattern, dirname);
+ }
+
+ return pattern.test(pathToTest);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/config-descriptors.js b/tools/node_modules/@babel/core/lib/config/config-descriptors.js
new file mode 100644
index 00000000000..62efa71265d
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/config-descriptors.js
@@ -0,0 +1,211 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createCachedDescriptors = createCachedDescriptors;
+exports.createUncachedDescriptors = createUncachedDescriptors;
+exports.createDescriptor = createDescriptor;
+
+var _files = require("./files");
+
+var _item = require("./item");
+
+var _caching = require("./caching");
+
+function isEqualDescriptor(a, b) {
+ return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved);
+}
+
+function createCachedDescriptors(dirname, options, alias) {
+ const {
+ plugins,
+ presets,
+ passPerPreset
+ } = options;
+ return {
+ options,
+ plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => [],
+ presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => []
+ };
+}
+
+function createUncachedDescriptors(dirname, options, alias) {
+ let plugins;
+ let presets;
+ return {
+ options,
+ plugins: () => {
+ if (!plugins) {
+ plugins = createPluginDescriptors(options.plugins || [], dirname, alias);
+ }
+
+ return plugins;
+ },
+ presets: () => {
+ if (!presets) {
+ presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset);
+ }
+
+ return presets;
+ }
+ };
+}
+
+const PRESET_DESCRIPTOR_CACHE = new WeakMap();
+const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
+ const dirname = cache.using(dir => dir);
+ return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCacheSync)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc))));
+});
+const PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
+const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
+ const dirname = cache.using(dir => dir);
+ return (0, _caching.makeStrongCacheSync)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc)));
+});
+const DEFAULT_OPTIONS = {};
+
+function loadCachedDescriptor(cache, desc) {
+ const {
+ value,
+ options = DEFAULT_OPTIONS
+ } = desc;
+ if (options === false) return desc;
+ let cacheByOptions = cache.get(value);
+
+ if (!cacheByOptions) {
+ cacheByOptions = new WeakMap();
+ cache.set(value, cacheByOptions);
+ }
+
+ let possibilities = cacheByOptions.get(options);
+
+ if (!possibilities) {
+ possibilities = [];
+ cacheByOptions.set(options, possibilities);
+ }
+
+ if (possibilities.indexOf(desc) === -1) {
+ const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc));
+
+ if (matches.length > 0) {
+ return matches[0];
+ }
+
+ possibilities.push(desc);
+ }
+
+ return desc;
+}
+
+function createPresetDescriptors(items, dirname, alias, passPerPreset) {
+ return createDescriptors("preset", items, dirname, alias, passPerPreset);
+}
+
+function createPluginDescriptors(items, dirname, alias) {
+ return createDescriptors("plugin", items, dirname, alias);
+}
+
+function createDescriptors(type, items, dirname, alias, ownPass) {
+ const descriptors = items.map((item, index) => createDescriptor(item, dirname, {
+ type,
+ alias: `${alias}$${index}`,
+ ownPass: !!ownPass
+ }));
+ assertNoDuplicates(descriptors);
+ return descriptors;
+}
+
+function createDescriptor(pair, dirname, {
+ type,
+ alias,
+ ownPass
+}) {
+ const desc = (0, _item.getItemDescriptor)(pair);
+
+ if (desc) {
+ return desc;
+ }
+
+ let name;
+ let options;
+ let value = pair;
+
+ if (Array.isArray(value)) {
+ if (value.length === 3) {
+ [value, options, name] = value;
+ } else {
+ [value, options] = value;
+ }
+ }
+
+ let file = undefined;
+ let filepath = null;
+
+ if (typeof value === "string") {
+ if (typeof type !== "string") {
+ throw new Error("To resolve a string-based item, the type of item must be given");
+ }
+
+ const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset;
+ const request = value;
+ ({
+ filepath,
+ value
+ } = resolver(value, dirname));
+ file = {
+ request,
+ resolved: filepath
+ };
+ }
+
+ if (!value) {
+ throw new Error(`Unexpected falsy value: ${String(value)}`);
+ }
+
+ if (typeof value === "object" && value.__esModule) {
+ if (value.default) {
+ value = value.default;
+ } else {
+ throw new Error("Must export a default export when using ES6 modules.");
+ }
+ }
+
+ if (typeof value !== "object" && typeof value !== "function") {
+ throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`);
+ }
+
+ if (filepath !== null && typeof value === "object" && value) {
+ throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`);
+ }
+
+ return {
+ name,
+ alias: filepath || alias,
+ value,
+ options,
+ dirname,
+ ownPass,
+ file
+ };
+}
+
+function assertNoDuplicates(items) {
+ const map = new Map();
+
+ for (const item of items) {
+ if (typeof item.value !== "function") continue;
+ let nameMap = map.get(item.value);
+
+ if (!nameMap) {
+ nameMap = new Set();
+ map.set(item.value, nameMap);
+ }
+
+ if (nameMap.has(item.name)) {
+ const conflicts = items.filter(i => i.value === item.value);
+ throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n"));
+ }
+
+ nameMap.add(item.name);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/configuration.js b/tools/node_modules/@babel/core/lib/config/files/configuration.js
new file mode 100644
index 00000000000..999c3269cd2
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/configuration.js
@@ -0,0 +1,335 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findConfigUpwards = findConfigUpwards;
+exports.findRelativeConfig = findRelativeConfig;
+exports.findRootConfig = findRootConfig;
+exports.loadConfig = loadConfig;
+exports.resolveShowConfigPath = resolveShowConfigPath;
+exports.ROOT_CONFIG_FILENAMES = void 0;
+
+function _debug() {
+ const data = _interopRequireDefault(require("debug"));
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _json() {
+ const data = _interopRequireDefault(require("json5"));
+
+ _json = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _caching = require("../caching");
+
+var _configApi = _interopRequireDefault(require("../helpers/config-api"));
+
+var _utils = require("./utils");
+
+var _moduleTypes = _interopRequireDefault(require("./module-types"));
+
+var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex"));
+
+var fs = _interopRequireWildcard(require("../../gensync-utils/fs"));
+
+var _resolve = _interopRequireDefault(require("../../gensync-utils/resolve"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const debug = (0, _debug().default)("babel:config:loading:files:configuration");
+const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"];
+exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
+const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"];
+const BABELIGNORE_FILENAME = ".babelignore";
+
+function* findConfigUpwards(rootDir) {
+ let dirname = rootDir;
+
+ while (true) {
+ for (const filename of ROOT_CONFIG_FILENAMES) {
+ if (yield* fs.exists(_path().default.join(dirname, filename))) {
+ return dirname;
+ }
+ }
+
+ const nextDir = _path().default.dirname(dirname);
+
+ if (dirname === nextDir) break;
+ dirname = nextDir;
+ }
+
+ return null;
+}
+
+function* findRelativeConfig(packageData, envName, caller) {
+ let config = null;
+ let ignore = null;
+
+ const dirname = _path().default.dirname(packageData.filepath);
+
+ for (const loc of packageData.directories) {
+ if (!config) {
+ var _packageData$pkg;
+
+ config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null);
+ }
+
+ if (!ignore) {
+ const ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME);
+
+ ignore = yield* readIgnoreConfig(ignoreLoc);
+
+ if (ignore) {
+ debug("Found ignore %o from %o.", ignore.filepath, dirname);
+ }
+ }
+ }
+
+ return {
+ config,
+ ignore
+ };
+}
+
+function findRootConfig(dirname, envName, caller) {
+ return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);
+}
+
+function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) {
+ const configs = yield* _gensync().default.all(names.map(filename => readConfig(_path().default.join(dirname, filename), envName, caller)));
+ const config = configs.reduce((previousConfig, config) => {
+ if (config && previousConfig) {
+ throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`);
+ }
+
+ return config || previousConfig;
+ }, previousConfig);
+
+ if (config) {
+ debug("Found configuration %o from %o.", config.filepath, dirname);
+ }
+
+ return config;
+}
+
+function* loadConfig(name, dirname, envName, caller) {
+ const filepath = yield* (0, _resolve.default)(name, {
+ basedir: dirname
+ });
+ const conf = yield* readConfig(filepath, envName, caller);
+
+ if (!conf) {
+ throw new Error(`Config file ${filepath} contains no configuration data`);
+ }
+
+ debug("Loaded config %o from %o.", name, dirname);
+ return conf;
+}
+
+function readConfig(filepath, envName, caller) {
+ const ext = _path().default.extname(filepath);
+
+ return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, {
+ envName,
+ caller
+ }) : readConfigJSON5(filepath);
+}
+
+const LOADING_CONFIGS = new Set();
+const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) {
+ if (!fs.exists.sync(filepath)) {
+ cache.forever();
+ return null;
+ }
+
+ if (LOADING_CONFIGS.has(filepath)) {
+ cache.never();
+ debug("Auto-ignoring usage of config %o.", filepath);
+ return {
+ filepath,
+ dirname: _path().default.dirname(filepath),
+ options: {}
+ };
+ }
+
+ let options;
+
+ try {
+ LOADING_CONFIGS.add(filepath);
+ options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
+ } catch (err) {
+ err.message = `${filepath}: Error while loading config - ${err.message}`;
+ throw err;
+ } finally {
+ LOADING_CONFIGS.delete(filepath);
+ }
+
+ let assertCache = false;
+
+ if (typeof options === "function") {
+ yield* [];
+ options = options((0, _configApi.default)(cache));
+ assertCache = true;
+ }
+
+ if (!options || typeof options !== "object" || Array.isArray(options)) {
+ throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`);
+ }
+
+ if (typeof options.then === "function") {
+ throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`);
+ }
+
+ if (assertCache && !cache.configured()) throwConfigError();
+ return {
+ filepath,
+ dirname: _path().default.dirname(filepath),
+ options
+ };
+});
+const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
+ const babel = file.options["babel"];
+ if (typeof babel === "undefined") return null;
+
+ if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
+ throw new Error(`${file.filepath}: .babel property must be an object`);
+ }
+
+ return {
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: babel
+ };
+});
+const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ let options;
+
+ try {
+ options = _json().default.parse(content);
+ } catch (err) {
+ err.message = `${filepath}: Error while parsing config - ${err.message}`;
+ throw err;
+ }
+
+ if (!options) throw new Error(`${filepath}: No config detected`);
+
+ if (typeof options !== "object") {
+ throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
+ }
+
+ if (Array.isArray(options)) {
+ throw new Error(`${filepath}: Expected config object but found array`);
+ }
+
+ return {
+ filepath,
+ dirname: _path().default.dirname(filepath),
+ options
+ };
+});
+const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ const ignoreDir = _path().default.dirname(filepath);
+
+ const ignorePatterns = content.split("\n").map(line => line.replace(/#(.*?)$/, "").trim()).filter(line => !!line);
+
+ for (const pattern of ignorePatterns) {
+ if (pattern[0] === "!") {
+ throw new Error(`Negation of file paths is not supported.`);
+ }
+ }
+
+ return {
+ filepath,
+ dirname: _path().default.dirname(filepath),
+ ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir))
+ };
+});
+
+function* resolveShowConfigPath(dirname) {
+ const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
+
+ if (targetPath != null) {
+ const absolutePath = _path().default.resolve(dirname, targetPath);
+
+ const stats = yield* fs.stat(absolutePath);
+
+ if (!stats.isFile()) {
+ throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
+ }
+
+ return absolutePath;
+ }
+
+ return null;
+}
+
+function throwConfigError() {
+ throw new Error(`\
+Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
+for various types of caching, using the first param of their handler functions:
+
+module.exports = function(api) {
+ // The API exposes the following:
+
+ // Cache the returned value forever and don't call this function again.
+ api.cache(true);
+
+ // Don't cache at all. Not recommended because it will be very slow.
+ api.cache(false);
+
+ // Cached based on the value of some function. If this function returns a value different from
+ // a previously-encountered value, the plugins will re-evaluate.
+ var env = api.cache(() => process.env.NODE_ENV);
+
+ // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
+ // any possible NODE_ENV value that might come up during plugin execution.
+ var isProd = api.cache(() => process.env.NODE_ENV === "production");
+
+ // .cache(fn) will perform a linear search though instances to find the matching plugin based
+ // based on previous instantiated plugins. If you want to recreate the plugin and discard the
+ // previous instance whenever something changes, you may use:
+ var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");
+
+ // Note, we also expose the following more-verbose versions of the above examples:
+ api.cache.forever(); // api.cache(true)
+ api.cache.never(); // api.cache(false)
+ api.cache.using(fn); // api.cache(fn)
+
+ // Return the value that will be cached.
+ return { };
+};`);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/import.js b/tools/node_modules/@babel/core/lib/config/files/import.js
new file mode 100644
index 00000000000..c0acc2b666d
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/import.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = import_;
+
+function import_(filepath) {
+ return import(filepath);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/index-browser.js b/tools/node_modules/@babel/core/lib/config/files/index-browser.js
new file mode 100644
index 00000000000..abe5fbd1bf0
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/index-browser.js
@@ -0,0 +1,68 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findConfigUpwards = findConfigUpwards;
+exports.findPackageData = findPackageData;
+exports.findRelativeConfig = findRelativeConfig;
+exports.findRootConfig = findRootConfig;
+exports.loadConfig = loadConfig;
+exports.resolveShowConfigPath = resolveShowConfigPath;
+exports.resolvePlugin = resolvePlugin;
+exports.resolvePreset = resolvePreset;
+exports.loadPlugin = loadPlugin;
+exports.loadPreset = loadPreset;
+exports.ROOT_CONFIG_FILENAMES = void 0;
+
+function* findConfigUpwards(rootDir) {
+ return null;
+}
+
+function* findPackageData(filepath) {
+ return {
+ filepath,
+ directories: [],
+ pkg: null,
+ isPackage: false
+ };
+}
+
+function* findRelativeConfig(pkgData, envName, caller) {
+ return {
+ pkg: null,
+ config: null,
+ ignore: null
+ };
+}
+
+function* findRootConfig(dirname, envName, caller) {
+ return null;
+}
+
+function* loadConfig(name, dirname, envName, caller) {
+ throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
+}
+
+function* resolveShowConfigPath(dirname) {
+ return null;
+}
+
+const ROOT_CONFIG_FILENAMES = [];
+exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
+
+function resolvePlugin(name, dirname) {
+ return null;
+}
+
+function resolvePreset(name, dirname) {
+ return null;
+}
+
+function loadPlugin(name, dirname) {
+ throw new Error(`Cannot load plugin ${name} relative to ${dirname} in a browser`);
+}
+
+function loadPreset(name, dirname) {
+ throw new Error(`Cannot load preset ${name} relative to ${dirname} in a browser`);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/index.js b/tools/node_modules/@babel/core/lib/config/files/index.js
new file mode 100644
index 00000000000..f75ace5ae9a
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/index.js
@@ -0,0 +1,79 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "findPackageData", {
+ enumerable: true,
+ get: function () {
+ return _package.findPackageData;
+ }
+});
+Object.defineProperty(exports, "findConfigUpwards", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findConfigUpwards;
+ }
+});
+Object.defineProperty(exports, "findRelativeConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findRelativeConfig;
+ }
+});
+Object.defineProperty(exports, "findRootConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findRootConfig;
+ }
+});
+Object.defineProperty(exports, "loadConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.loadConfig;
+ }
+});
+Object.defineProperty(exports, "resolveShowConfigPath", {
+ enumerable: true,
+ get: function () {
+ return _configuration.resolveShowConfigPath;
+ }
+});
+Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", {
+ enumerable: true,
+ get: function () {
+ return _configuration.ROOT_CONFIG_FILENAMES;
+ }
+});
+Object.defineProperty(exports, "resolvePlugin", {
+ enumerable: true,
+ get: function () {
+ return _plugins.resolvePlugin;
+ }
+});
+Object.defineProperty(exports, "resolvePreset", {
+ enumerable: true,
+ get: function () {
+ return _plugins.resolvePreset;
+ }
+});
+Object.defineProperty(exports, "loadPlugin", {
+ enumerable: true,
+ get: function () {
+ return _plugins.loadPlugin;
+ }
+});
+Object.defineProperty(exports, "loadPreset", {
+ enumerable: true,
+ get: function () {
+ return _plugins.loadPreset;
+ }
+});
+
+var _package = require("./package");
+
+var _configuration = require("./configuration");
+
+var _plugins = require("./plugins");
+
+({}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/module-types.js b/tools/node_modules/@babel/core/lib/config/files/module-types.js
new file mode 100644
index 00000000000..6c17b8e374b
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/module-types.js
@@ -0,0 +1,96 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadCjsOrMjsDefault;
+
+var _async = require("../../gensync-utils/async");
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _url() {
+ const data = require("url");
+
+ _url = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+let import_;
+
+try {
+ import_ = require("./import").default;
+} catch (_unused) {}
+
+function* loadCjsOrMjsDefault(filepath, asyncError) {
+ switch (guessJSModuleType(filepath)) {
+ case "cjs":
+ return loadCjsDefault(filepath);
+
+ case "unknown":
+ try {
+ return loadCjsDefault(filepath);
+ } catch (e) {
+ if (e.code !== "ERR_REQUIRE_ESM") throw e;
+ }
+
+ case "mjs":
+ if (yield* (0, _async.isAsync)()) {
+ return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
+ }
+
+ throw new Error(asyncError);
+ }
+}
+
+function guessJSModuleType(filename) {
+ switch (_path().default.extname(filename)) {
+ case ".cjs":
+ return "cjs";
+
+ case ".mjs":
+ return "mjs";
+
+ default:
+ return "unknown";
+ }
+}
+
+function loadCjsDefault(filepath) {
+ const module = require(filepath);
+
+ return (module == null ? void 0 : module.__esModule) ? module.default || undefined : module;
+}
+
+function loadMjsDefault(_x) {
+ return _loadMjsDefault.apply(this, arguments);
+}
+
+function _loadMjsDefault() {
+ _loadMjsDefault = _asyncToGenerator(function* (filepath) {
+ if (!import_) {
+ throw new Error("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n");
+ }
+
+ const module = yield import_((0, _url().pathToFileURL)(filepath));
+ return module.default;
+ });
+ return _loadMjsDefault.apply(this, arguments);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/package.js b/tools/node_modules/@babel/core/lib/config/files/package.js
new file mode 100644
index 00000000000..095bc0e4a5f
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/package.js
@@ -0,0 +1,78 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findPackageData = findPackageData;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _utils = require("./utils");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const PACKAGE_FILENAME = "package.json";
+
+function* findPackageData(filepath) {
+ let pkg = null;
+ const directories = [];
+ let isPackage = true;
+
+ let dirname = _path().default.dirname(filepath);
+
+ while (!pkg && _path().default.basename(dirname) !== "node_modules") {
+ directories.push(dirname);
+ pkg = yield* readConfigPackage(_path().default.join(dirname, PACKAGE_FILENAME));
+
+ const nextLoc = _path().default.dirname(dirname);
+
+ if (dirname === nextLoc) {
+ isPackage = false;
+ break;
+ }
+
+ dirname = nextLoc;
+ }
+
+ return {
+ filepath,
+ directories,
+ pkg,
+ isPackage
+ };
+}
+
+const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ let options;
+
+ try {
+ options = JSON.parse(content);
+ } catch (err) {
+ err.message = `${filepath}: Error while parsing JSON - ${err.message}`;
+ throw err;
+ }
+
+ if (!options) throw new Error(`${filepath}: No config detected`);
+
+ if (typeof options !== "object") {
+ throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
+ }
+
+ if (Array.isArray(options)) {
+ throw new Error(`${filepath}: Expected config object but found array`);
+ }
+
+ return {
+ filepath,
+ dirname: _path().default.dirname(filepath),
+ options
+ };
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/plugins.js b/tools/node_modules/@babel/core/lib/config/files/plugins.js
new file mode 100644
index 00000000000..6b9cb715c88
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/plugins.js
@@ -0,0 +1,169 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.resolvePlugin = resolvePlugin;
+exports.resolvePreset = resolvePreset;
+exports.loadPlugin = loadPlugin;
+exports.loadPreset = loadPreset;
+
+function _debug() {
+ const data = _interopRequireDefault(require("debug"));
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _resolve() {
+ const data = _interopRequireDefault(require("resolve"));
+
+ _resolve = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const debug = (0, _debug().default)("babel:config:loading:files:plugins");
+const EXACT_RE = /^module:/;
+const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
+const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/;
+const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/;
+const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
+const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
+const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
+const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
+
+function resolvePlugin(name, dirname) {
+ return resolveStandardizedName("plugin", name, dirname);
+}
+
+function resolvePreset(name, dirname) {
+ return resolveStandardizedName("preset", name, dirname);
+}
+
+function loadPlugin(name, dirname) {
+ const filepath = resolvePlugin(name, dirname);
+
+ if (!filepath) {
+ throw new Error(`Plugin ${name} not found relative to ${dirname}`);
+ }
+
+ const value = requireModule("plugin", filepath);
+ debug("Loaded plugin %o from %o.", name, dirname);
+ return {
+ filepath,
+ value
+ };
+}
+
+function loadPreset(name, dirname) {
+ const filepath = resolvePreset(name, dirname);
+
+ if (!filepath) {
+ throw new Error(`Preset ${name} not found relative to ${dirname}`);
+ }
+
+ const value = requireModule("preset", filepath);
+ debug("Loaded preset %o from %o.", name, dirname);
+ return {
+ filepath,
+ value
+ };
+}
+
+function standardizeName(type, name) {
+ if (_path().default.isAbsolute(name)) return name;
+ const isPreset = type === "preset";
+ return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, "");
+}
+
+function resolveStandardizedName(type, name, dirname = process.cwd()) {
+ const standardizedName = standardizeName(type, name);
+
+ try {
+ return _resolve().default.sync(standardizedName, {
+ basedir: dirname
+ });
+ } catch (e) {
+ if (e.code !== "MODULE_NOT_FOUND") throw e;
+
+ if (standardizedName !== name) {
+ let resolvedOriginal = false;
+
+ try {
+ _resolve().default.sync(name, {
+ basedir: dirname
+ });
+
+ resolvedOriginal = true;
+ } catch (_unused) {}
+
+ if (resolvedOriginal) {
+ e.message += `\n- If you want to resolve "${name}", use "module:${name}"`;
+ }
+ }
+
+ let resolvedBabel = false;
+
+ try {
+ _resolve().default.sync(standardizeName(type, "@babel/" + name), {
+ basedir: dirname
+ });
+
+ resolvedBabel = true;
+ } catch (_unused2) {}
+
+ if (resolvedBabel) {
+ e.message += `\n- Did you mean "@babel/${name}"?`;
+ }
+
+ let resolvedOppositeType = false;
+ const oppositeType = type === "preset" ? "plugin" : "preset";
+
+ try {
+ _resolve().default.sync(standardizeName(oppositeType, name), {
+ basedir: dirname
+ });
+
+ resolvedOppositeType = true;
+ } catch (_unused3) {}
+
+ if (resolvedOppositeType) {
+ e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;
+ }
+
+ throw e;
+ }
+}
+
+const LOADING_MODULES = new Set();
+
+function requireModule(type, name) {
+ if (LOADING_MODULES.has(name)) {
+ throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.');
+ }
+
+ try {
+ LOADING_MODULES.add(name);
+ return require(name);
+ } finally {
+ LOADING_MODULES.delete(name);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/files/types.js b/tools/node_modules/@babel/core/lib/config/files/types.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/types.js
diff --git a/tools/node_modules/@babel/core/lib/config/files/utils.js b/tools/node_modules/@babel/core/lib/config/files/utils.js
new file mode 100644
index 00000000000..0b08798146f
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/files/utils.js
@@ -0,0 +1,48 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.makeStaticFileCache = makeStaticFileCache;
+
+var _caching = require("../caching");
+
+var fs = _interopRequireWildcard(require("../../gensync-utils/fs"));
+
+function _fs2() {
+ const data = _interopRequireDefault(require("fs"));
+
+ _fs2 = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function makeStaticFileCache(fn) {
+ return (0, _caching.makeStrongCache)(function* (filepath, cache) {
+ const cached = cache.invalidate(() => fileMtime(filepath));
+
+ if (cached === null) {
+ return null;
+ }
+
+ return fn(filepath, yield* fs.readFile(filepath, "utf8"));
+ });
+}
+
+function fileMtime(filepath) {
+ try {
+ return +_fs2().default.statSync(filepath).mtime;
+ } catch (e) {
+ if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e;
+ }
+
+ return null;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/full.js b/tools/node_modules/@babel/core/lib/config/full.js
new file mode 100644
index 00000000000..d817a158124
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/full.js
@@ -0,0 +1,329 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _async = require("../gensync-utils/async");
+
+var _util = require("./util");
+
+var context = _interopRequireWildcard(require("../index"));
+
+var _plugin = _interopRequireDefault(require("./plugin"));
+
+var _item = require("./item");
+
+var _configChain = require("./config-chain");
+
+function _traverse() {
+ const data = _interopRequireDefault(require("@babel/traverse"));
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _caching = require("./caching");
+
+var _options = require("./validation/options");
+
+var _plugins = require("./validation/plugins");
+
+var _configApi = _interopRequireDefault(require("./helpers/config-api"));
+
+var _partial = _interopRequireDefault(require("./partial"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var _default = (0, _gensync().default)(function* loadFullConfig(inputOpts) {
+ const result = yield* (0, _partial.default)(inputOpts);
+
+ if (!result) {
+ return null;
+ }
+
+ const {
+ options,
+ context,
+ fileHandling
+ } = result;
+
+ if (fileHandling === "ignored") {
+ return null;
+ }
+
+ const optionDefaults = {};
+ const {
+ plugins,
+ presets
+ } = options;
+
+ if (!plugins || !presets) {
+ throw new Error("Assertion failure - plugins and presets exist");
+ }
+
+ const toDescriptor = item => {
+ const desc = (0, _item.getItemDescriptor)(item);
+
+ if (!desc) {
+ throw new Error("Assertion failure - must be config item");
+ }
+
+ return desc;
+ };
+
+ const presetsDescriptors = presets.map(toDescriptor);
+ const initialPluginsDescriptors = plugins.map(toDescriptor);
+ const pluginDescriptorsByPass = [[]];
+ const passes = [];
+ const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) {
+ const presets = [];
+
+ for (let i = 0; i < rawPresets.length; i++) {
+ const descriptor = rawPresets[i];
+
+ if (descriptor.options !== false) {
+ try {
+ if (descriptor.ownPass) {
+ presets.push({
+ preset: yield* loadPresetDescriptor(descriptor, context),
+ pass: []
+ });
+ } else {
+ presets.unshift({
+ preset: yield* loadPresetDescriptor(descriptor, context),
+ pass: pluginDescriptorsPass
+ });
+ }
+ } catch (e) {
+ if (e.code === "BABEL_UNKNOWN_OPTION") {
+ (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e);
+ }
+
+ throw e;
+ }
+ }
+ }
+
+ if (presets.length > 0) {
+ pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass));
+
+ for (const {
+ preset,
+ pass
+ } of presets) {
+ if (!preset) return true;
+ pass.push(...preset.plugins);
+ const ignored = yield* recursePresetDescriptors(preset.presets, pass);
+ if (ignored) return true;
+ preset.options.forEach(opts => {
+ (0, _util.mergeOptions)(optionDefaults, opts);
+ });
+ }
+ }
+ })(presetsDescriptors, pluginDescriptorsByPass[0]);
+ if (ignored) return null;
+ const opts = optionDefaults;
+ (0, _util.mergeOptions)(opts, options);
+ yield* enhanceError(context, function* loadPluginDescriptors() {
+ pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);
+
+ for (const descs of pluginDescriptorsByPass) {
+ const pass = [];
+ passes.push(pass);
+
+ for (let i = 0; i < descs.length; i++) {
+ const descriptor = descs[i];
+
+ if (descriptor.options !== false) {
+ try {
+ pass.push(yield* loadPluginDescriptor(descriptor, context));
+ } catch (e) {
+ if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") {
+ (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e);
+ }
+
+ throw e;
+ }
+ }
+ }
+ }
+ })();
+ opts.plugins = passes[0];
+ opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({
+ plugins
+ }));
+ opts.passPerPreset = opts.presets.length > 0;
+ return {
+ options: opts,
+ passes: passes
+ };
+});
+
+exports.default = _default;
+
+function enhanceError(context, fn) {
+ return function* (arg1, arg2) {
+ try {
+ return yield* fn(arg1, arg2);
+ } catch (e) {
+ if (!/^\[BABEL\]/.test(e.message)) {
+ e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`;
+ }
+
+ throw e;
+ }
+ };
+}
+
+const loadDescriptor = (0, _caching.makeWeakCache)(function* ({
+ value,
+ options,
+ dirname,
+ alias
+}, cache) {
+ if (options === false) throw new Error("Assertion failure");
+ options = options || {};
+ let item = value;
+
+ if (typeof value === "function") {
+ const api = Object.assign({}, context, (0, _configApi.default)(cache));
+
+ try {
+ item = value(api, options, dirname);
+ } catch (e) {
+ if (alias) {
+ e.message += ` (While processing: ${JSON.stringify(alias)})`;
+ }
+
+ throw e;
+ }
+ }
+
+ if (!item || typeof item !== "object") {
+ throw new Error("Plugin/Preset did not return an object.");
+ }
+
+ if (typeof item.then === "function") {
+ yield* [];
+ throw new Error(`You appear to be using an async plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`);
+ }
+
+ return {
+ value: item,
+ options,
+ dirname,
+ alias
+ };
+});
+
+function* loadPluginDescriptor(descriptor, context) {
+ if (descriptor.value instanceof _plugin.default) {
+ if (descriptor.options) {
+ throw new Error("Passed options to an existing Plugin instance will not work.");
+ }
+
+ return descriptor.value;
+ }
+
+ return yield* instantiatePlugin(yield* loadDescriptor(descriptor, context), context);
+}
+
+const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
+ value,
+ options,
+ dirname,
+ alias
+}, cache) {
+ const pluginObj = (0, _plugins.validatePluginObject)(value);
+ const plugin = Object.assign({}, pluginObj);
+
+ if (plugin.visitor) {
+ plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor));
+ }
+
+ if (plugin.inherits) {
+ const inheritsDescriptor = {
+ name: undefined,
+ alias: `${alias}$inherits`,
+ value: plugin.inherits,
+ options,
+ dirname
+ };
+ const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, run => {
+ return cache.invalidate(data => run(inheritsDescriptor, data));
+ });
+ plugin.pre = chain(inherits.pre, plugin.pre);
+ plugin.post = chain(inherits.post, plugin.post);
+ plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions);
+ plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
+ }
+
+ return new _plugin.default(plugin, options, alias);
+});
+
+const validateIfOptionNeedsFilename = (options, descriptor) => {
+ if (options.test || options.include || options.exclude) {
+ const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */";
+ throw new Error([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transform(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
+ }
+};
+
+const validatePreset = (preset, context, descriptor) => {
+ if (!context.filename) {
+ const {
+ options
+ } = preset;
+ validateIfOptionNeedsFilename(options, descriptor);
+
+ if (options.overrides) {
+ options.overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor));
+ }
+ }
+};
+
+function* loadPresetDescriptor(descriptor, context) {
+ const preset = instantiatePreset(yield* loadDescriptor(descriptor, context));
+ validatePreset(preset, context, descriptor);
+ return yield* (0, _configChain.buildPresetChain)(preset, context);
+}
+
+const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
+ value,
+ dirname,
+ alias
+}) => {
+ return {
+ options: (0, _options.validate)("preset", value),
+ alias,
+ dirname
+ };
+});
+
+function chain(a, b) {
+ const fns = [a, b].filter(Boolean);
+ if (fns.length <= 1) return fns[0];
+ return function (...args) {
+ for (const fn of fns) {
+ fn.apply(this, args);
+ }
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/helpers/config-api.js b/tools/node_modules/@babel/core/lib/config/helpers/config-api.js
new file mode 100644
index 00000000000..b94c0548586
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/helpers/config-api.js
@@ -0,0 +1,85 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = makeAPI;
+
+function _semver() {
+ const data = _interopRequireDefault(require("semver"));
+
+ _semver = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _ = require("../../");
+
+var _caching = require("../caching");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function makeAPI(cache) {
+ const env = value => cache.using(data => {
+ if (typeof value === "undefined") return data.envName;
+
+ if (typeof value === "function") {
+ return (0, _caching.assertSimpleType)(value(data.envName));
+ }
+
+ if (!Array.isArray(value)) value = [value];
+ return value.some(entry => {
+ if (typeof entry !== "string") {
+ throw new Error("Unexpected non-string value");
+ }
+
+ return entry === data.envName;
+ });
+ });
+
+ const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller)));
+
+ return {
+ version: _.version,
+ cache: cache.simple(),
+ env,
+ async: () => false,
+ caller,
+ assertVersion
+ };
+}
+
+function assertVersion(range) {
+ if (typeof range === "number") {
+ if (!Number.isInteger(range)) {
+ throw new Error("Expected string or integer value.");
+ }
+
+ range = `^${range}.0.0-0`;
+ }
+
+ if (typeof range !== "string") {
+ throw new Error("Expected string or integer value.");
+ }
+
+ if (_semver().default.satisfies(_.version, range)) return;
+ const limit = Error.stackTraceLimit;
+
+ if (typeof limit === "number" && limit < 25) {
+ Error.stackTraceLimit = 25;
+ }
+
+ const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
+
+ if (typeof limit === "number") {
+ Error.stackTraceLimit = limit;
+ }
+
+ throw Object.assign(err, {
+ code: "BABEL_VERSION_UNSUPPORTED",
+ version: _.version,
+ range
+ });
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/helpers/environment.js b/tools/node_modules/@babel/core/lib/config/helpers/environment.js
new file mode 100644
index 00000000000..e4bfdbc7a72
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/helpers/environment.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getEnv = getEnv;
+
+function getEnv(defaultValue = "development") {
+ return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/index.js b/tools/node_modules/@babel/core/lib/config/index.js
new file mode 100644
index 00000000000..9208224e071
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/index.js
@@ -0,0 +1,57 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "default", {
+ enumerable: true,
+ get: function () {
+ return _full.default;
+ }
+});
+exports.loadOptionsAsync = exports.loadOptionsSync = exports.loadOptions = exports.loadPartialConfigAsync = exports.loadPartialConfigSync = exports.loadPartialConfig = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _full = _interopRequireDefault(require("./full"));
+
+var _partial = require("./partial");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const loadOptionsRunner = (0, _gensync().default)(function* (opts) {
+ var _config$options;
+
+ const config = yield* (0, _full.default)(opts);
+ return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
+});
+
+const maybeErrback = runner => (opts, callback) => {
+ if (callback === undefined && typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ return callback ? runner.errback(opts, callback) : runner.sync(opts);
+};
+
+const loadPartialConfig = maybeErrback(_partial.loadPartialConfig);
+exports.loadPartialConfig = loadPartialConfig;
+const loadPartialConfigSync = _partial.loadPartialConfig.sync;
+exports.loadPartialConfigSync = loadPartialConfigSync;
+const loadPartialConfigAsync = _partial.loadPartialConfig.async;
+exports.loadPartialConfigAsync = loadPartialConfigAsync;
+const loadOptions = maybeErrback(loadOptionsRunner);
+exports.loadOptions = loadOptions;
+const loadOptionsSync = loadOptionsRunner.sync;
+exports.loadOptionsSync = loadOptionsSync;
+const loadOptionsAsync = loadOptionsRunner.async;
+exports.loadOptionsAsync = loadOptionsAsync; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/item.js b/tools/node_modules/@babel/core/lib/config/item.js
new file mode 100644
index 00000000000..b4962a0d6ed
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/item.js
@@ -0,0 +1,78 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createItemFromDescriptor = createItemFromDescriptor;
+exports.createConfigItem = createConfigItem;
+exports.getItemDescriptor = getItemDescriptor;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _configDescriptors = require("./config-descriptors");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function createItemFromDescriptor(desc) {
+ return new ConfigItem(desc);
+}
+
+function createConfigItem(value, {
+ dirname = ".",
+ type
+} = {}) {
+ const descriptor = (0, _configDescriptors.createDescriptor)(value, _path().default.resolve(dirname), {
+ type,
+ alias: "programmatic item"
+ });
+ return createItemFromDescriptor(descriptor);
+}
+
+function getItemDescriptor(item) {
+ if (item == null ? void 0 : item[CONFIG_ITEM_BRAND]) {
+ return item._descriptor;
+ }
+
+ return undefined;
+}
+
+const CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem");
+
+class ConfigItem {
+ constructor(descriptor) {
+ this._descriptor = void 0;
+ this[CONFIG_ITEM_BRAND] = true;
+ this.value = void 0;
+ this.options = void 0;
+ this.dirname = void 0;
+ this.name = void 0;
+ this.file = void 0;
+ this._descriptor = descriptor;
+ Object.defineProperty(this, "_descriptor", {
+ enumerable: false
+ });
+ Object.defineProperty(this, CONFIG_ITEM_BRAND, {
+ enumerable: false
+ });
+ this.value = this._descriptor.value;
+ this.options = this._descriptor.options;
+ this.dirname = this._descriptor.dirname;
+ this.name = this._descriptor.name;
+ this.file = this._descriptor.file ? {
+ request: this._descriptor.file.request,
+ resolved: this._descriptor.file.resolved
+ } : undefined;
+ Object.freeze(this);
+ }
+
+}
+
+Object.freeze(ConfigItem.prototype); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/partial.js b/tools/node_modules/@babel/core/lib/config/partial.js
new file mode 100644
index 00000000000..229e06454e0
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/partial.js
@@ -0,0 +1,187 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadPrivatePartialConfig;
+exports.loadPartialConfig = void 0;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _plugin = _interopRequireDefault(require("./plugin"));
+
+var _util = require("./util");
+
+var _item = require("./item");
+
+var _configChain = require("./config-chain");
+
+var _environment = require("./helpers/environment");
+
+var _options = require("./validation/options");
+
+var _files = require("./files");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
+
+function* resolveRootMode(rootDir, rootMode) {
+ switch (rootMode) {
+ case "root":
+ return rootDir;
+
+ case "upward-optional":
+ {
+ const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir);
+ return upwardRootDir === null ? rootDir : upwardRootDir;
+ }
+
+ case "upward":
+ {
+ const upwardRootDir = yield* (0, _files.findConfigUpwards)(rootDir);
+ if (upwardRootDir !== null) return upwardRootDir;
+ throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
+ code: "BABEL_ROOT_NOT_FOUND",
+ dirname: rootDir
+ });
+ }
+
+ default:
+ throw new Error(`Assertion failure - unknown rootMode value.`);
+ }
+}
+
+function* loadPrivatePartialConfig(inputOpts) {
+ if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) {
+ throw new Error("Babel options must be an object, null, or undefined");
+ }
+
+ const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {};
+ const {
+ envName = (0, _environment.getEnv)(),
+ cwd = ".",
+ root: rootDir = ".",
+ rootMode = "root",
+ caller,
+ cloneInputAst = true
+ } = args;
+
+ const absoluteCwd = _path().default.resolve(cwd);
+
+ const absoluteRootDir = yield* resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode);
+ const filename = typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined;
+ const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd);
+ const context = {
+ filename,
+ cwd: absoluteCwd,
+ root: absoluteRootDir,
+ envName,
+ caller,
+ showConfig: showConfigPath === filename
+ };
+ const configChain = yield* (0, _configChain.buildRootChain)(args, context);
+ if (!configChain) return null;
+ const options = {};
+ configChain.options.forEach(opts => {
+ (0, _util.mergeOptions)(options, opts);
+ });
+ options.cloneInputAst = cloneInputAst;
+ options.babelrc = false;
+ options.configFile = false;
+ options.passPerPreset = false;
+ options.envName = context.envName;
+ options.cwd = context.cwd;
+ options.root = context.root;
+ options.filename = typeof context.filename === "string" ? context.filename : undefined;
+ options.plugins = configChain.plugins.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor));
+ options.presets = configChain.presets.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor));
+ return {
+ options,
+ context,
+ fileHandling: configChain.fileHandling,
+ ignore: configChain.ignore,
+ babelrc: configChain.babelrc,
+ config: configChain.config,
+ files: configChain.files
+ };
+}
+
+const loadPartialConfig = (0, _gensync().default)(function* (opts) {
+ let showIgnoredFiles = false;
+
+ if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
+ var _opts = opts;
+ ({
+ showIgnoredFiles
+ } = _opts);
+ opts = _objectWithoutPropertiesLoose(_opts, ["showIgnoredFiles"]);
+ _opts;
+ }
+
+ const result = yield* loadPrivatePartialConfig(opts);
+ if (!result) return null;
+ const {
+ options,
+ babelrc,
+ ignore,
+ config,
+ fileHandling,
+ files
+ } = result;
+
+ if (fileHandling === "ignored" && !showIgnoredFiles) {
+ return null;
+ }
+
+ (options.plugins || []).forEach(item => {
+ if (item.value instanceof _plugin.default) {
+ throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()");
+ }
+ });
+ return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files);
+});
+exports.loadPartialConfig = loadPartialConfig;
+
+class PartialConfig {
+ constructor(options, babelrc, ignore, config, fileHandling, files) {
+ this.options = void 0;
+ this.babelrc = void 0;
+ this.babelignore = void 0;
+ this.config = void 0;
+ this.fileHandling = void 0;
+ this.files = void 0;
+ this.options = options;
+ this.babelignore = ignore;
+ this.babelrc = babelrc;
+ this.config = config;
+ this.fileHandling = fileHandling;
+ this.files = files;
+ Object.freeze(this);
+ }
+
+ hasFilesystemConfig() {
+ return this.babelrc !== undefined || this.config !== undefined;
+ }
+
+}
+
+Object.freeze(PartialConfig.prototype); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/pattern-to-regex.js b/tools/node_modules/@babel/core/lib/config/pattern-to-regex.js
new file mode 100644
index 00000000000..b80f4b6752a
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/pattern-to-regex.js
@@ -0,0 +1,52 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = pathToPattern;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _escapeRegExp() {
+ const data = _interopRequireDefault(require("lodash/escapeRegExp"));
+
+ _escapeRegExp = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const sep = `\\${_path().default.sep}`;
+const endSep = `(?:${sep}|$)`;
+const substitution = `[^${sep}]+`;
+const starPat = `(?:${substitution}${sep})`;
+const starPatLast = `(?:${substitution}${endSep})`;
+const starStarPat = `${starPat}*?`;
+const starStarPatLast = `${starPat}*?${starPatLast}?`;
+
+function pathToPattern(pattern, dirname) {
+ const parts = _path().default.resolve(dirname, pattern).split(_path().default.sep);
+
+ return new RegExp(["^", ...parts.map((part, i) => {
+ const last = i === parts.length - 1;
+ if (part === "**") return last ? starStarPatLast : starStarPat;
+ if (part === "*") return last ? starPatLast : starPat;
+
+ if (part.indexOf("*.") === 0) {
+ return substitution + (0, _escapeRegExp().default)(part.slice(1)) + (last ? endSep : sep);
+ }
+
+ return (0, _escapeRegExp().default)(part) + (last ? endSep : sep);
+ })].join(""));
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/plugin.js b/tools/node_modules/@babel/core/lib/config/plugin.js
new file mode 100644
index 00000000000..9cb1656be3c
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/plugin.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class Plugin {
+ constructor(plugin, options, key) {
+ this.key = void 0;
+ this.manipulateOptions = void 0;
+ this.post = void 0;
+ this.pre = void 0;
+ this.visitor = void 0;
+ this.parserOverride = void 0;
+ this.generatorOverride = void 0;
+ this.options = void 0;
+ this.key = plugin.name || key;
+ this.manipulateOptions = plugin.manipulateOptions;
+ this.post = plugin.post;
+ this.pre = plugin.pre;
+ this.visitor = plugin.visitor || {};
+ this.parserOverride = plugin.parserOverride;
+ this.generatorOverride = plugin.generatorOverride;
+ this.options = options;
+ }
+
+}
+
+exports.default = Plugin; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/printer.js b/tools/node_modules/@babel/core/lib/config/printer.js
new file mode 100644
index 00000000000..b007aa4c968
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/printer.js
@@ -0,0 +1,127 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ConfigPrinter = exports.ChainFormatter = void 0;
+const ChainFormatter = {
+ Programmatic: 0,
+ Config: 1
+};
+exports.ChainFormatter = ChainFormatter;
+const Formatter = {
+ title(type, callerName, filepath) {
+ let title = "";
+
+ if (type === ChainFormatter.Programmatic) {
+ title = "programmatic options";
+
+ if (callerName) {
+ title += " from " + callerName;
+ }
+ } else {
+ title = "config " + filepath;
+ }
+
+ return title;
+ },
+
+ loc(index, envName) {
+ let loc = "";
+
+ if (index != null) {
+ loc += `.overrides[${index}]`;
+ }
+
+ if (envName != null) {
+ loc += `.env["${envName}"]`;
+ }
+
+ return loc;
+ },
+
+ optionsAndDescriptors(opt) {
+ const content = Object.assign({}, opt.options);
+ delete content.overrides;
+ delete content.env;
+ const pluginDescriptors = [...opt.plugins()];
+
+ if (pluginDescriptors.length) {
+ content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));
+ }
+
+ const presetDescriptors = [...opt.presets()];
+
+ if (presetDescriptors.length) {
+ content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));
+ }
+
+ return JSON.stringify(content, undefined, 2);
+ }
+
+};
+
+function descriptorToConfig(d) {
+ var _d$file;
+
+ let name = (_d$file = d.file) == null ? void 0 : _d$file.request;
+
+ if (name == null) {
+ if (typeof d.value === "object") {
+ name = d.value;
+ } else if (typeof d.value === "function") {
+ name = `[Function: ${d.value.toString().substr(0, 50)} ... ]`;
+ }
+ }
+
+ if (name == null) {
+ name = "[Unknown]";
+ }
+
+ if (d.options === undefined) {
+ return name;
+ } else if (d.name == null) {
+ return [name, d.options];
+ } else {
+ return [name, d.options, d.name];
+ }
+}
+
+class ConfigPrinter {
+ constructor() {
+ this._stack = [];
+ }
+
+ configure(enabled, type, {
+ callerName,
+ filepath
+ }) {
+ if (!enabled) return () => {};
+ return (content, index, envName) => {
+ this._stack.push({
+ type,
+ callerName,
+ filepath,
+ content,
+ index,
+ envName
+ });
+ };
+ }
+
+ static format(config) {
+ let title = Formatter.title(config.type, config.callerName, config.filepath);
+ const loc = Formatter.loc(config.index, config.envName);
+ if (loc) title += ` ${loc}`;
+ const content = Formatter.optionsAndDescriptors(config.content);
+ return `${title}\n${content}`;
+ }
+
+ output() {
+ if (this._stack.length === 0) return "";
+ return this._stack.map(s => ConfigPrinter.format(s)).join("\n\n");
+ }
+
+}
+
+exports.ConfigPrinter = ConfigPrinter; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/util.js b/tools/node_modules/@babel/core/lib/config/util.js
new file mode 100644
index 00000000000..5608fb9d20b
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/util.js
@@ -0,0 +1,35 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.mergeOptions = mergeOptions;
+exports.isIterableIterator = isIterableIterator;
+
+function mergeOptions(target, source) {
+ for (const k of Object.keys(source)) {
+ if (k === "parserOpts" && source.parserOpts) {
+ const parserOpts = source.parserOpts;
+ const targetObj = target.parserOpts = target.parserOpts || {};
+ mergeDefaultFields(targetObj, parserOpts);
+ } else if (k === "generatorOpts" && source.generatorOpts) {
+ const generatorOpts = source.generatorOpts;
+ const targetObj = target.generatorOpts = target.generatorOpts || {};
+ mergeDefaultFields(targetObj, generatorOpts);
+ } else {
+ const val = source[k];
+ if (val !== undefined) target[k] = val;
+ }
+ }
+}
+
+function mergeDefaultFields(target, source) {
+ for (const k of Object.keys(source)) {
+ const val = source[k];
+ if (val !== undefined) target[k] = val;
+ }
+}
+
+function isIterableIterator(value) {
+ return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/validation/option-assertions.js b/tools/node_modules/@babel/core/lib/config/validation/option-assertions.js
new file mode 100644
index 00000000000..d339aad0827
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/validation/option-assertions.js
@@ -0,0 +1,268 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.msg = msg;
+exports.access = access;
+exports.assertRootMode = assertRootMode;
+exports.assertSourceMaps = assertSourceMaps;
+exports.assertCompact = assertCompact;
+exports.assertSourceType = assertSourceType;
+exports.assertCallerMetadata = assertCallerMetadata;
+exports.assertInputSourceMap = assertInputSourceMap;
+exports.assertString = assertString;
+exports.assertFunction = assertFunction;
+exports.assertBoolean = assertBoolean;
+exports.assertObject = assertObject;
+exports.assertArray = assertArray;
+exports.assertIgnoreList = assertIgnoreList;
+exports.assertConfigApplicableTest = assertConfigApplicableTest;
+exports.assertConfigFileSearch = assertConfigFileSearch;
+exports.assertBabelrcSearch = assertBabelrcSearch;
+exports.assertPluginList = assertPluginList;
+
+function msg(loc) {
+ switch (loc.type) {
+ case "root":
+ return ``;
+
+ case "env":
+ return `${msg(loc.parent)}.env["${loc.name}"]`;
+
+ case "overrides":
+ return `${msg(loc.parent)}.overrides[${loc.index}]`;
+
+ case "option":
+ return `${msg(loc.parent)}.${loc.name}`;
+
+ case "access":
+ return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;
+
+ default:
+ throw new Error(`Assertion failure: Unknown type ${loc.type}`);
+ }
+}
+
+function access(loc, name) {
+ return {
+ type: "access",
+ name,
+ parent: loc
+ };
+}
+
+function assertRootMode(loc, value) {
+ if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
+ throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);
+ }
+
+ return value;
+}
+
+function assertSourceMaps(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
+ throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);
+ }
+
+ return value;
+}
+
+function assertCompact(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
+ throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);
+ }
+
+ return value;
+}
+
+function assertSourceType(loc, value) {
+ if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") {
+ throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`);
+ }
+
+ return value;
+}
+
+function assertCallerMetadata(loc, value) {
+ const obj = assertObject(loc, value);
+
+ if (obj) {
+ if (typeof obj["name"] !== "string") {
+ throw new Error(`${msg(loc)} set but does not contain "name" property string`);
+ }
+
+ for (const prop of Object.keys(obj)) {
+ const propLoc = access(loc, prop);
+ const value = obj[prop];
+
+ if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") {
+ throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`);
+ }
+ }
+ }
+
+ return value;
+}
+
+function assertInputSourceMap(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
+ throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);
+ }
+
+ return value;
+}
+
+function assertString(loc, value) {
+ if (value !== undefined && typeof value !== "string") {
+ throw new Error(`${msg(loc)} must be a string, or undefined`);
+ }
+
+ return value;
+}
+
+function assertFunction(loc, value) {
+ if (value !== undefined && typeof value !== "function") {
+ throw new Error(`${msg(loc)} must be a function, or undefined`);
+ }
+
+ return value;
+}
+
+function assertBoolean(loc, value) {
+ if (value !== undefined && typeof value !== "boolean") {
+ throw new Error(`${msg(loc)} must be a boolean, or undefined`);
+ }
+
+ return value;
+}
+
+function assertObject(loc, value) {
+ if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
+ throw new Error(`${msg(loc)} must be an object, or undefined`);
+ }
+
+ return value;
+}
+
+function assertArray(loc, value) {
+ if (value != null && !Array.isArray(value)) {
+ throw new Error(`${msg(loc)} must be an array, or undefined`);
+ }
+
+ return value;
+}
+
+function assertIgnoreList(loc, value) {
+ const arr = assertArray(loc, value);
+
+ if (arr) {
+ arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
+ }
+
+ return arr;
+}
+
+function assertIgnoreItem(loc, value) {
+ if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
+ throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);
+ }
+
+ return value;
+}
+
+function assertConfigApplicableTest(loc, value) {
+ if (value === undefined) return value;
+
+ if (Array.isArray(value)) {
+ value.forEach((item, i) => {
+ if (!checkValidTest(item)) {
+ throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
+ }
+ });
+ } else if (!checkValidTest(value)) {
+ throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);
+ }
+
+ return value;
+}
+
+function checkValidTest(value) {
+ return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
+}
+
+function assertConfigFileSearch(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
+ throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`);
+ }
+
+ return value;
+}
+
+function assertBabelrcSearch(loc, value) {
+ if (value === undefined || typeof value === "boolean") return value;
+
+ if (Array.isArray(value)) {
+ value.forEach((item, i) => {
+ if (!checkValidTest(item)) {
+ throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
+ }
+ });
+ } else if (!checkValidTest(value)) {
+ throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`);
+ }
+
+ return value;
+}
+
+function assertPluginList(loc, value) {
+ const arr = assertArray(loc, value);
+
+ if (arr) {
+ arr.forEach((item, i) => assertPluginItem(access(loc, i), item));
+ }
+
+ return arr;
+}
+
+function assertPluginItem(loc, value) {
+ if (Array.isArray(value)) {
+ if (value.length === 0) {
+ throw new Error(`${msg(loc)} must include an object`);
+ }
+
+ if (value.length > 3) {
+ throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);
+ }
+
+ assertPluginTarget(access(loc, 0), value[0]);
+
+ if (value.length > 1) {
+ const opts = value[1];
+
+ if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
+ throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`);
+ }
+ }
+
+ if (value.length === 3) {
+ const name = value[2];
+
+ if (name !== undefined && typeof name !== "string") {
+ throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`);
+ }
+ }
+ } else {
+ assertPluginTarget(loc, value);
+ }
+
+ return value;
+}
+
+function assertPluginTarget(loc, value) {
+ if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
+ throw new Error(`${msg(loc)} must be a string, object, function`);
+ }
+
+ return value;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/validation/options.js b/tools/node_modules/@babel/core/lib/config/validation/options.js
new file mode 100644
index 00000000000..04fb8bf5b6c
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/validation/options.js
@@ -0,0 +1,201 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
+
+var _plugin = _interopRequireDefault(require("../plugin"));
+
+var _removed = _interopRequireDefault(require("./removed"));
+
+var _optionAssertions = require("./option-assertions");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const ROOT_VALIDATORS = {
+ cwd: _optionAssertions.assertString,
+ root: _optionAssertions.assertString,
+ rootMode: _optionAssertions.assertRootMode,
+ configFile: _optionAssertions.assertConfigFileSearch,
+ caller: _optionAssertions.assertCallerMetadata,
+ filename: _optionAssertions.assertString,
+ filenameRelative: _optionAssertions.assertString,
+ code: _optionAssertions.assertBoolean,
+ ast: _optionAssertions.assertBoolean,
+ cloneInputAst: _optionAssertions.assertBoolean,
+ envName: _optionAssertions.assertString
+};
+const BABELRC_VALIDATORS = {
+ babelrc: _optionAssertions.assertBoolean,
+ babelrcRoots: _optionAssertions.assertBabelrcSearch
+};
+const NONPRESET_VALIDATORS = {
+ extends: _optionAssertions.assertString,
+ ignore: _optionAssertions.assertIgnoreList,
+ only: _optionAssertions.assertIgnoreList
+};
+const COMMON_VALIDATORS = {
+ inputSourceMap: _optionAssertions.assertInputSourceMap,
+ presets: _optionAssertions.assertPluginList,
+ plugins: _optionAssertions.assertPluginList,
+ passPerPreset: _optionAssertions.assertBoolean,
+ env: assertEnvSet,
+ overrides: assertOverridesList,
+ test: _optionAssertions.assertConfigApplicableTest,
+ include: _optionAssertions.assertConfigApplicableTest,
+ exclude: _optionAssertions.assertConfigApplicableTest,
+ retainLines: _optionAssertions.assertBoolean,
+ comments: _optionAssertions.assertBoolean,
+ shouldPrintComment: _optionAssertions.assertFunction,
+ compact: _optionAssertions.assertCompact,
+ minified: _optionAssertions.assertBoolean,
+ auxiliaryCommentBefore: _optionAssertions.assertString,
+ auxiliaryCommentAfter: _optionAssertions.assertString,
+ sourceType: _optionAssertions.assertSourceType,
+ wrapPluginVisitorMethod: _optionAssertions.assertFunction,
+ highlightCode: _optionAssertions.assertBoolean,
+ sourceMaps: _optionAssertions.assertSourceMaps,
+ sourceMap: _optionAssertions.assertSourceMaps,
+ sourceFileName: _optionAssertions.assertString,
+ sourceRoot: _optionAssertions.assertString,
+ getModuleId: _optionAssertions.assertFunction,
+ moduleRoot: _optionAssertions.assertString,
+ moduleIds: _optionAssertions.assertBoolean,
+ moduleId: _optionAssertions.assertString,
+ parserOpts: _optionAssertions.assertObject,
+ generatorOpts: _optionAssertions.assertObject
+};
+
+function getSource(loc) {
+ return loc.type === "root" ? loc.source : getSource(loc.parent);
+}
+
+function validate(type, opts) {
+ return validateNested({
+ type: "root",
+ source: type
+ }, opts);
+}
+
+function validateNested(loc, opts) {
+ const type = getSource(loc);
+ assertNoDuplicateSourcemap(opts);
+ Object.keys(opts).forEach(key => {
+ const optLoc = {
+ type: "option",
+ name: key,
+ parent: loc
+ };
+
+ if (type === "preset" && NONPRESET_VALIDATORS[key]) {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`);
+ }
+
+ if (type !== "arguments" && ROOT_VALIDATORS[key]) {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);
+ }
+
+ if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) {
+ if (type === "babelrcfile" || type === "extendsfile") {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`);
+ }
+
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`);
+ }
+
+ const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;
+ validator(optLoc, opts[key]);
+ });
+ return opts;
+}
+
+function throwUnknownError(loc) {
+ const key = loc.name;
+
+ if (_removed.default[key]) {
+ const {
+ message,
+ version = 5
+ } = _removed.default[key];
+ throw new Error(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`);
+ } else {
+ const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);
+ unknownOptErr.code = "BABEL_UNKNOWN_OPTION";
+ throw unknownOptErr;
+ }
+}
+
+function has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+function assertNoDuplicateSourcemap(opts) {
+ if (has(opts, "sourceMap") && has(opts, "sourceMaps")) {
+ throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
+ }
+}
+
+function assertEnvSet(loc, value) {
+ if (loc.parent.type === "env") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`);
+ }
+
+ const parent = loc.parent;
+ const obj = (0, _optionAssertions.assertObject)(loc, value);
+
+ if (obj) {
+ for (const envName of Object.keys(obj)) {
+ const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]);
+ if (!env) continue;
+ const envLoc = {
+ type: "env",
+ name: envName,
+ parent
+ };
+ validateNested(envLoc, env);
+ }
+ }
+
+ return obj;
+}
+
+function assertOverridesList(loc, value) {
+ if (loc.parent.type === "env") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`);
+ }
+
+ if (loc.parent.type === "overrides") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);
+ }
+
+ const parent = loc.parent;
+ const arr = (0, _optionAssertions.assertArray)(loc, value);
+
+ if (arr) {
+ for (const [index, item] of arr.entries()) {
+ const objLoc = (0, _optionAssertions.access)(loc, index);
+ const env = (0, _optionAssertions.assertObject)(objLoc, item);
+ if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`);
+ const overridesLoc = {
+ type: "overrides",
+ index,
+ parent
+ };
+ validateNested(overridesLoc, env);
+ }
+ }
+
+ return arr;
+}
+
+function checkNoUnwrappedItemOptionPairs(items, index, type, e) {
+ if (index === 0) return;
+ const lastItem = items[index - 1];
+ const thisItem = items[index];
+
+ if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") {
+ e.message += `\n- Maybe you meant to use\n` + `"${type}": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/validation/plugins.js b/tools/node_modules/@babel/core/lib/config/validation/plugins.js
new file mode 100644
index 00000000000..a70cc676fab
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/validation/plugins.js
@@ -0,0 +1,71 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validatePluginObject = validatePluginObject;
+
+var _optionAssertions = require("./option-assertions");
+
+const VALIDATORS = {
+ name: _optionAssertions.assertString,
+ manipulateOptions: _optionAssertions.assertFunction,
+ pre: _optionAssertions.assertFunction,
+ post: _optionAssertions.assertFunction,
+ inherits: _optionAssertions.assertFunction,
+ visitor: assertVisitorMap,
+ parserOverride: _optionAssertions.assertFunction,
+ generatorOverride: _optionAssertions.assertFunction
+};
+
+function assertVisitorMap(loc, value) {
+ const obj = (0, _optionAssertions.assertObject)(loc, value);
+
+ if (obj) {
+ Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop]));
+
+ if (obj.enter || obj.exit) {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`);
+ }
+ }
+
+ return obj;
+}
+
+function assertVisitorHandler(key, value) {
+ if (value && typeof value === "object") {
+ Object.keys(value).forEach(handler => {
+ if (handler !== "enter" && handler !== "exit") {
+ throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`);
+ }
+ });
+ } else if (typeof value !== "function") {
+ throw new Error(`.visitor["${key}"] must be a function`);
+ }
+
+ return value;
+}
+
+function validatePluginObject(obj) {
+ const rootPath = {
+ type: "root",
+ source: "plugin"
+ };
+ Object.keys(obj).forEach(key => {
+ const validator = VALIDATORS[key];
+
+ if (validator) {
+ const optLoc = {
+ type: "option",
+ name: key,
+ parent: rootPath
+ };
+ validator(optLoc, obj[key]);
+ } else {
+ const invalidPluginPropertyError = new Error(`.${key} is not a valid Plugin property`);
+ invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
+ throw invalidPluginPropertyError;
+ }
+ });
+ return obj;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/config/validation/removed.js b/tools/node_modules/@babel/core/lib/config/validation/removed.js
new file mode 100644
index 00000000000..f0fcd7de391
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/config/validation/removed.js
@@ -0,0 +1,66 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = {
+ auxiliaryComment: {
+ message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
+ },
+ blacklist: {
+ message: "Put the specific transforms you want in the `plugins` option"
+ },
+ breakConfig: {
+ message: "This is not a necessary option in Babel 6"
+ },
+ experimental: {
+ message: "Put the specific transforms you want in the `plugins` option"
+ },
+ externalHelpers: {
+ message: "Use the `external-helpers` plugin instead. " + "Check out http://babeljs.io/docs/plugins/external-helpers/"
+ },
+ extra: {
+ message: ""
+ },
+ jsxPragma: {
+ message: "use the `pragma` option in the `react-jsx` plugin. " + "Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
+ },
+ loose: {
+ message: "Specify the `loose` option for the relevant plugin you are using " + "or use a preset that sets the option."
+ },
+ metadataUsedHelpers: {
+ message: "Not required anymore as this is enabled by default"
+ },
+ modules: {
+ message: "Use the corresponding module transform plugin in the `plugins` option. " + "Check out http://babeljs.io/docs/plugins/#modules"
+ },
+ nonStandard: {
+ message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. " + "Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"
+ },
+ optional: {
+ message: "Put the specific transforms you want in the `plugins` option"
+ },
+ sourceMapName: {
+ message: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves."
+ },
+ stage: {
+ message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
+ },
+ whitelist: {
+ message: "Put the specific transforms you want in the `plugins` option"
+ },
+ resolveModuleSource: {
+ version: 6,
+ message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
+ },
+ metadata: {
+ version: 6,
+ message: "Generated plugin metadata is always included in the output result"
+ },
+ sourceMapTarget: {
+ version: 6,
+ message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves."
+ }
+};
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/gensync-utils/async.js b/tools/node_modules/@babel/core/lib/gensync-utils/async.js
new file mode 100644
index 00000000000..36b777d5271
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/gensync-utils/async.js
@@ -0,0 +1,89 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.maybeAsync = maybeAsync;
+exports.forwardAsync = forwardAsync;
+exports.isThenable = isThenable;
+exports.waitFor = exports.onFirstPause = exports.isAsync = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const id = x => x;
+
+const runGenerator = (0, _gensync().default)(function* (item) {
+ return yield* item;
+});
+const isAsync = (0, _gensync().default)({
+ sync: () => false,
+ errback: cb => cb(null, true)
+});
+exports.isAsync = isAsync;
+
+function maybeAsync(fn, message) {
+ return (0, _gensync().default)({
+ sync(...args) {
+ const result = fn.apply(this, args);
+ if (isThenable(result)) throw new Error(message);
+ return result;
+ },
+
+ async(...args) {
+ return Promise.resolve(fn.apply(this, args));
+ }
+
+ });
+}
+
+const withKind = (0, _gensync().default)({
+ sync: cb => cb("sync"),
+ async: cb => cb("async")
+});
+
+function forwardAsync(action, cb) {
+ const g = (0, _gensync().default)(action);
+ return withKind(kind => {
+ const adapted = g[kind];
+ return cb(adapted);
+ });
+}
+
+const onFirstPause = (0, _gensync().default)({
+ name: "onFirstPause",
+ arity: 2,
+ sync: function (item) {
+ return runGenerator.sync(item);
+ },
+ errback: function (item, firstPause, cb) {
+ let completed = false;
+ runGenerator.errback(item, (err, value) => {
+ completed = true;
+ cb(err, value);
+ });
+
+ if (!completed) {
+ firstPause();
+ }
+ }
+});
+exports.onFirstPause = onFirstPause;
+const waitFor = (0, _gensync().default)({
+ sync: id,
+ async: id
+});
+exports.waitFor = waitFor;
+
+function isThenable(val) {
+ return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/gensync-utils/fs.js b/tools/node_modules/@babel/core/lib/gensync-utils/fs.js
new file mode 100644
index 00000000000..02f445387f6
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/gensync-utils/fs.js
@@ -0,0 +1,53 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.stat = exports.exists = exports.readFile = void 0;
+
+function _fs() {
+ const data = _interopRequireDefault(require("fs"));
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const readFile = (0, _gensync().default)({
+ sync: _fs().default.readFileSync,
+ errback: _fs().default.readFile
+});
+exports.readFile = readFile;
+const exists = (0, _gensync().default)({
+ sync(path) {
+ try {
+ _fs().default.accessSync(path);
+
+ return true;
+ } catch (_unused) {
+ return false;
+ }
+ },
+
+ errback: (path, cb) => _fs().default.access(path, undefined, err => cb(null, !err))
+});
+exports.exists = exists;
+const stat = (0, _gensync().default)({
+ sync: _fs().default.statSync,
+ errback: _fs().default.stat
+});
+exports.stat = stat; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/gensync-utils/resolve.js b/tools/node_modules/@babel/core/lib/gensync-utils/resolve.js
new file mode 100644
index 00000000000..2ca39d7612d
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/gensync-utils/resolve.js
@@ -0,0 +1,35 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+function _resolve() {
+ const data = _interopRequireDefault(require("resolve"));
+
+ _resolve = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var _default = (0, _gensync().default)({
+ sync: _resolve().default.sync,
+ errback: _resolve().default
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/index.js b/tools/node_modules/@babel/core/lib/index.js
new file mode 100644
index 00000000000..ecd444e06d1
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/index.js
@@ -0,0 +1,266 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Plugin = Plugin;
+Object.defineProperty(exports, "File", {
+ enumerable: true,
+ get: function () {
+ return _file.default;
+ }
+});
+Object.defineProperty(exports, "buildExternalHelpers", {
+ enumerable: true,
+ get: function () {
+ return _buildExternalHelpers.default;
+ }
+});
+Object.defineProperty(exports, "resolvePlugin", {
+ enumerable: true,
+ get: function () {
+ return _files.resolvePlugin;
+ }
+});
+Object.defineProperty(exports, "resolvePreset", {
+ enumerable: true,
+ get: function () {
+ return _files.resolvePreset;
+ }
+});
+Object.defineProperty(exports, "version", {
+ enumerable: true,
+ get: function () {
+ return _package.version;
+ }
+});
+Object.defineProperty(exports, "getEnv", {
+ enumerable: true,
+ get: function () {
+ return _environment.getEnv;
+ }
+});
+Object.defineProperty(exports, "tokTypes", {
+ enumerable: true,
+ get: function () {
+ return _parser().tokTypes;
+ }
+});
+Object.defineProperty(exports, "traverse", {
+ enumerable: true,
+ get: function () {
+ return _traverse().default;
+ }
+});
+Object.defineProperty(exports, "template", {
+ enumerable: true,
+ get: function () {
+ return _template().default;
+ }
+});
+Object.defineProperty(exports, "createConfigItem", {
+ enumerable: true,
+ get: function () {
+ return _item.createConfigItem;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfig", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfig;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfigSync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfigSync;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfigAsync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfigAsync;
+ }
+});
+Object.defineProperty(exports, "loadOptions", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptions;
+ }
+});
+Object.defineProperty(exports, "loadOptionsSync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptionsSync;
+ }
+});
+Object.defineProperty(exports, "loadOptionsAsync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptionsAsync;
+ }
+});
+Object.defineProperty(exports, "transform", {
+ enumerable: true,
+ get: function () {
+ return _transform.transform;
+ }
+});
+Object.defineProperty(exports, "transformSync", {
+ enumerable: true,
+ get: function () {
+ return _transform.transformSync;
+ }
+});
+Object.defineProperty(exports, "transformAsync", {
+ enumerable: true,
+ get: function () {
+ return _transform.transformAsync;
+ }
+});
+Object.defineProperty(exports, "transformFile", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFile;
+ }
+});
+Object.defineProperty(exports, "transformFileSync", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFileSync;
+ }
+});
+Object.defineProperty(exports, "transformFileAsync", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFileAsync;
+ }
+});
+Object.defineProperty(exports, "transformFromAst", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAst;
+ }
+});
+Object.defineProperty(exports, "transformFromAstSync", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAstSync;
+ }
+});
+Object.defineProperty(exports, "transformFromAstAsync", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAstAsync;
+ }
+});
+Object.defineProperty(exports, "parse", {
+ enumerable: true,
+ get: function () {
+ return _parse.parse;
+ }
+});
+Object.defineProperty(exports, "parseSync", {
+ enumerable: true,
+ get: function () {
+ return _parse.parseSync;
+ }
+});
+Object.defineProperty(exports, "parseAsync", {
+ enumerable: true,
+ get: function () {
+ return _parse.parseAsync;
+ }
+});
+exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = void 0;
+
+var _file = _interopRequireDefault(require("./transformation/file/file"));
+
+var _buildExternalHelpers = _interopRequireDefault(require("./tools/build-external-helpers"));
+
+var _files = require("./config/files");
+
+var _package = require("../package.json");
+
+var _environment = require("./config/helpers/environment");
+
+function _types() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ _types = function () {
+ return data;
+ };
+
+ return data;
+}
+
+Object.defineProperty(exports, "types", {
+ enumerable: true,
+ get: function () {
+ return _types();
+ }
+});
+
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _traverse() {
+ const data = _interopRequireDefault(require("@babel/traverse"));
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _template() {
+ const data = _interopRequireDefault(require("@babel/template"));
+
+ _template = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _item = require("./config/item");
+
+var _config = require("./config");
+
+var _transform = require("./transform");
+
+var _transformFile = require("./transform-file");
+
+var _transformAst = require("./transform-ast");
+
+var _parse = require("./parse");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]);
+exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
+
+class OptionManager {
+ init(opts) {
+ return (0, _config.loadOptions)(opts);
+ }
+
+}
+
+exports.OptionManager = OptionManager;
+
+function Plugin(alias) {
+ throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/parse.js b/tools/node_modules/@babel/core/lib/parse.js
new file mode 100644
index 00000000000..e6c2d26620c
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/parse.js
@@ -0,0 +1,50 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.parseAsync = exports.parseSync = exports.parse = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = _interopRequireDefault(require("./config"));
+
+var _parser = _interopRequireDefault(require("./parser"));
+
+var _normalizeOpts = _interopRequireDefault(require("./transformation/normalize-opts"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const parseRunner = (0, _gensync().default)(function* parse(code, opts) {
+ const config = yield* (0, _config.default)(opts);
+
+ if (config === null) {
+ return null;
+ }
+
+ return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code);
+});
+
+const parse = function parse(code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) return parseRunner.sync(code, opts);
+ parseRunner.errback(code, opts, callback);
+};
+
+exports.parse = parse;
+const parseSync = parseRunner.sync;
+exports.parseSync = parseSync;
+const parseAsync = parseRunner.async;
+exports.parseAsync = parseAsync; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/parser/index.js b/tools/node_modules/@babel/core/lib/parser/index.js
new file mode 100644
index 00000000000..e8fcc7fe4ac
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/parser/index.js
@@ -0,0 +1,97 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parser;
+
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _codeFrame() {
+ const data = require("@babel/code-frame");
+
+ _codeFrame = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function* parser(pluginPasses, {
+ parserOpts,
+ highlightCode = true,
+ filename = "unknown"
+}, code) {
+ try {
+ const results = [];
+
+ for (const plugins of pluginPasses) {
+ for (const plugin of plugins) {
+ const {
+ parserOverride
+ } = plugin;
+
+ if (parserOverride) {
+ const ast = parserOverride(code, parserOpts, _parser().parse);
+ if (ast !== undefined) results.push(ast);
+ }
+ }
+ }
+
+ if (results.length === 0) {
+ return (0, _parser().parse)(code, parserOpts);
+ } else if (results.length === 1) {
+ yield* [];
+
+ if (typeof results[0].then === "function") {
+ throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+
+ return results[0];
+ }
+
+ throw new Error("More than one plugin attempted to override parsing.");
+ } catch (err) {
+ if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
+ err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file.";
+ }
+
+ const {
+ loc,
+ missingPlugin
+ } = err;
+
+ if (loc) {
+ const codeFrame = (0, _codeFrame().codeFrameColumns)(code, {
+ start: {
+ line: loc.line,
+ column: loc.column + 1
+ }
+ }, {
+ highlightCode
+ });
+
+ if (missingPlugin) {
+ err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame);
+ } else {
+ err.message = `${filename}: ${err.message}\n\n` + codeFrame;
+ }
+
+ err.code = "BABEL_PARSE_ERROR";
+ }
+
+ throw err;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js b/tools/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
new file mode 100644
index 00000000000..79897587a3b
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
@@ -0,0 +1,307 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = generateMissingPluginMessage;
+const pluginNameMap = {
+ classProperties: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-properties",
+ url: "https://git.io/vb4SL"
+ }
+ },
+ classPrivateProperties: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-properties",
+ url: "https://git.io/vb4SL"
+ }
+ },
+ classPrivateMethods: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-private-methods",
+ url: "https://git.io/JvpRG"
+ }
+ },
+ classStaticBlock: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-static-block",
+ url: "https://git.io/JTLB6"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-static-block",
+ url: "https://git.io/JTLBP"
+ }
+ },
+ decimal: {
+ syntax: {
+ name: "@babel/plugin-syntax-decimal",
+ url: "https://git.io/JfKOH"
+ }
+ },
+ decorators: {
+ syntax: {
+ name: "@babel/plugin-syntax-decorators",
+ url: "https://git.io/vb4y9"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-decorators",
+ url: "https://git.io/vb4ST"
+ }
+ },
+ doExpressions: {
+ syntax: {
+ name: "@babel/plugin-syntax-do-expressions",
+ url: "https://git.io/vb4yh"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-do-expressions",
+ url: "https://git.io/vb4S3"
+ }
+ },
+ dynamicImport: {
+ syntax: {
+ name: "@babel/plugin-syntax-dynamic-import",
+ url: "https://git.io/vb4Sv"
+ }
+ },
+ exportDefaultFrom: {
+ syntax: {
+ name: "@babel/plugin-syntax-export-default-from",
+ url: "https://git.io/vb4SO"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-export-default-from",
+ url: "https://git.io/vb4yH"
+ }
+ },
+ exportNamespaceFrom: {
+ syntax: {
+ name: "@babel/plugin-syntax-export-namespace-from",
+ url: "https://git.io/vb4Sf"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-export-namespace-from",
+ url: "https://git.io/vb4SG"
+ }
+ },
+ flow: {
+ syntax: {
+ name: "@babel/plugin-syntax-flow",
+ url: "https://git.io/vb4yb"
+ },
+ transform: {
+ name: "@babel/preset-flow",
+ url: "https://git.io/JfeDn"
+ }
+ },
+ functionBind: {
+ syntax: {
+ name: "@babel/plugin-syntax-function-bind",
+ url: "https://git.io/vb4y7"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-function-bind",
+ url: "https://git.io/vb4St"
+ }
+ },
+ functionSent: {
+ syntax: {
+ name: "@babel/plugin-syntax-function-sent",
+ url: "https://git.io/vb4yN"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-function-sent",
+ url: "https://git.io/vb4SZ"
+ }
+ },
+ importMeta: {
+ syntax: {
+ name: "@babel/plugin-syntax-import-meta",
+ url: "https://git.io/vbKK6"
+ }
+ },
+ jsx: {
+ syntax: {
+ name: "@babel/plugin-syntax-jsx",
+ url: "https://git.io/vb4yA"
+ },
+ transform: {
+ name: "@babel/preset-react",
+ url: "https://git.io/JfeDR"
+ }
+ },
+ importAssertions: {
+ syntax: {
+ name: "@babel/plugin-syntax-import-assertions",
+ url: "https://git.io/JUbkv"
+ }
+ },
+ moduleStringNames: {
+ syntax: {
+ name: "@babel/plugin-syntax-module-string-names",
+ url: "https://git.io/JTL8G"
+ }
+ },
+ numericSeparator: {
+ syntax: {
+ name: "@babel/plugin-syntax-numeric-separator",
+ url: "https://git.io/vb4Sq"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-numeric-separator",
+ url: "https://git.io/vb4yS"
+ }
+ },
+ optionalChaining: {
+ syntax: {
+ name: "@babel/plugin-syntax-optional-chaining",
+ url: "https://git.io/vb4Sc"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-optional-chaining",
+ url: "https://git.io/vb4Sk"
+ }
+ },
+ pipelineOperator: {
+ syntax: {
+ name: "@babel/plugin-syntax-pipeline-operator",
+ url: "https://git.io/vb4yj"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-pipeline-operator",
+ url: "https://git.io/vb4SU"
+ }
+ },
+ privateIn: {
+ syntax: {
+ name: "@babel/plugin-syntax-private-property-in-object",
+ url: "https://git.io/JfK3q"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-private-property-in-object",
+ url: "https://git.io/JfK3O"
+ }
+ },
+ recordAndTuple: {
+ syntax: {
+ name: "@babel/plugin-syntax-record-and-tuple",
+ url: "https://git.io/JvKp3"
+ }
+ },
+ throwExpressions: {
+ syntax: {
+ name: "@babel/plugin-syntax-throw-expressions",
+ url: "https://git.io/vb4SJ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-throw-expressions",
+ url: "https://git.io/vb4yF"
+ }
+ },
+ typescript: {
+ syntax: {
+ name: "@babel/plugin-syntax-typescript",
+ url: "https://git.io/vb4SC"
+ },
+ transform: {
+ name: "@babel/preset-typescript",
+ url: "https://git.io/JfeDz"
+ }
+ },
+ asyncGenerators: {
+ syntax: {
+ name: "@babel/plugin-syntax-async-generators",
+ url: "https://git.io/vb4SY"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-async-generator-functions",
+ url: "https://git.io/vb4yp"
+ }
+ },
+ logicalAssignment: {
+ syntax: {
+ name: "@babel/plugin-syntax-logical-assignment-operators",
+ url: "https://git.io/vAlBp"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-logical-assignment-operators",
+ url: "https://git.io/vAlRe"
+ }
+ },
+ nullishCoalescingOperator: {
+ syntax: {
+ name: "@babel/plugin-syntax-nullish-coalescing-operator",
+ url: "https://git.io/vb4yx"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-nullish-coalescing-operator",
+ url: "https://git.io/vb4Se"
+ }
+ },
+ objectRestSpread: {
+ syntax: {
+ name: "@babel/plugin-syntax-object-rest-spread",
+ url: "https://git.io/vb4y5"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-object-rest-spread",
+ url: "https://git.io/vb4Ss"
+ }
+ },
+ optionalCatchBinding: {
+ syntax: {
+ name: "@babel/plugin-syntax-optional-catch-binding",
+ url: "https://git.io/vb4Sn"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-optional-catch-binding",
+ url: "https://git.io/vb4SI"
+ }
+ }
+};
+pluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform;
+
+const getNameURLCombination = ({
+ name,
+ url
+}) => `${name} (${url})`;
+
+function generateMissingPluginMessage(missingPluginName, loc, codeFrame) {
+ let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame;
+ const pluginInfo = pluginNameMap[missingPluginName];
+
+ if (pluginInfo) {
+ const {
+ syntax: syntaxPlugin,
+ transform: transformPlugin
+ } = pluginInfo;
+
+ if (syntaxPlugin) {
+ const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
+
+ if (transformPlugin) {
+ const transformPluginInfo = getNameURLCombination(transformPlugin);
+ const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets";
+ helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.
+If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;
+ } else {
+ helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`;
+ }
+ }
+ }
+
+ return helpMessage;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/tools/build-external-helpers.js b/tools/node_modules/@babel/core/lib/tools/build-external-helpers.js
new file mode 100644
index 00000000000..f30372eaf04
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/tools/build-external-helpers.js
@@ -0,0 +1,148 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+function helpers() {
+ const data = _interopRequireWildcard(require("@babel/helpers"));
+
+ helpers = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _generator() {
+ const data = _interopRequireDefault(require("@babel/generator"));
+
+ _generator = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _template() {
+ const data = _interopRequireDefault(require("@babel/template"));
+
+ _template = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _file = _interopRequireDefault(require("../transformation/file/file"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const buildUmdWrapper = replacements => (0, _template().default)`
+ (function (root, factory) {
+ if (typeof define === "function" && define.amd) {
+ define(AMD_ARGUMENTS, factory);
+ } else if (typeof exports === "object") {
+ factory(COMMON_ARGUMENTS);
+ } else {
+ factory(BROWSER_ARGUMENTS);
+ }
+ })(UMD_ROOT, function (FACTORY_PARAMETERS) {
+ FACTORY_BODY
+ });
+ `(replacements);
+
+function buildGlobal(allowlist) {
+ const namespace = t().identifier("babelHelpers");
+ const body = [];
+ const container = t().functionExpression(null, [t().identifier("global")], t().blockStatement(body));
+ const tree = t().program([t().expressionStatement(t().callExpression(container, [t().conditionalExpression(t().binaryExpression("===", t().unaryExpression("typeof", t().identifier("global")), t().stringLiteral("undefined")), t().identifier("self"), t().identifier("global"))]))]);
+ body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().assignmentExpression("=", t().memberExpression(t().identifier("global"), namespace), t().objectExpression([])))]));
+ buildHelpers(body, namespace, allowlist);
+ return tree;
+}
+
+function buildModule(allowlist) {
+ const body = [];
+ const refs = buildHelpers(body, null, allowlist);
+ body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(name => {
+ return t().exportSpecifier(t().cloneNode(refs[name]), t().identifier(name));
+ })));
+ return t().program(body, [], "module");
+}
+
+function buildUmd(allowlist) {
+ const namespace = t().identifier("babelHelpers");
+ const body = [];
+ body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().identifier("global"))]));
+ buildHelpers(body, namespace, allowlist);
+ return t().program([buildUmdWrapper({
+ FACTORY_PARAMETERS: t().identifier("global"),
+ BROWSER_ARGUMENTS: t().assignmentExpression("=", t().memberExpression(t().identifier("root"), namespace), t().objectExpression([])),
+ COMMON_ARGUMENTS: t().identifier("exports"),
+ AMD_ARGUMENTS: t().arrayExpression([t().stringLiteral("exports")]),
+ FACTORY_BODY: body,
+ UMD_ROOT: t().identifier("this")
+ })]);
+}
+
+function buildVar(allowlist) {
+ const namespace = t().identifier("babelHelpers");
+ const body = [];
+ body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().objectExpression([]))]));
+ const tree = t().program(body);
+ buildHelpers(body, namespace, allowlist);
+ body.push(t().expressionStatement(namespace));
+ return tree;
+}
+
+function buildHelpers(body, namespace, allowlist) {
+ const getHelperReference = name => {
+ return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier(`_${name}`);
+ };
+
+ const refs = {};
+ helpers().list.forEach(function (name) {
+ if (allowlist && allowlist.indexOf(name) < 0) return;
+ const ref = refs[name] = getHelperReference(name);
+ helpers().ensure(name, _file.default);
+ const {
+ nodes
+ } = helpers().get(name, getHelperReference, ref);
+ body.push(...nodes);
+ });
+ return refs;
+}
+
+function _default(allowlist, outputType = "global") {
+ let tree;
+ const build = {
+ global: buildGlobal,
+ module: buildModule,
+ umd: buildUmd,
+ var: buildVar
+ }[outputType];
+
+ if (build) {
+ tree = build(allowlist);
+ } else {
+ throw new Error(`Unsupported output type ${outputType}`);
+ }
+
+ return (0, _generator().default)(tree).code;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transform-ast.js b/tools/node_modules/@babel/core/lib/transform-ast.js
new file mode 100644
index 00000000000..e43bf027874
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transform-ast.js
@@ -0,0 +1,48 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFromAstAsync = exports.transformFromAstSync = exports.transformFromAst = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = _interopRequireDefault(require("./config"));
+
+var _transformation = require("./transformation");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const transformFromAstRunner = (0, _gensync().default)(function* (ast, code, opts) {
+ const config = yield* (0, _config.default)(opts);
+ if (config === null) return null;
+ if (!ast) throw new Error("No AST given");
+ return yield* (0, _transformation.run)(config, code, ast);
+});
+
+const transformFromAst = function transformFromAst(ast, code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) {
+ return transformFromAstRunner.sync(ast, code, opts);
+ }
+
+ transformFromAstRunner.errback(ast, code, opts, callback);
+};
+
+exports.transformFromAst = transformFromAst;
+const transformFromAstSync = transformFromAstRunner.sync;
+exports.transformFromAstSync = transformFromAstSync;
+const transformFromAstAsync = transformFromAstRunner.async;
+exports.transformFromAstAsync = transformFromAstAsync; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transform-file-browser.js b/tools/node_modules/@babel/core/lib/transform-file-browser.js
new file mode 100644
index 00000000000..6442c9821ff
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transform-file-browser.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFileSync = transformFileSync;
+exports.transformFileAsync = transformFileAsync;
+exports.transformFile = void 0;
+
+const transformFile = function transformFile(filename, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ }
+
+ callback(new Error("Transforming files is not supported in browsers"), null);
+};
+
+exports.transformFile = transformFile;
+
+function transformFileSync() {
+ throw new Error("Transforming files is not supported in browsers");
+}
+
+function transformFileAsync() {
+ return Promise.reject(new Error("Transforming files is not supported in browsers"));
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transform-file.js b/tools/node_modules/@babel/core/lib/transform-file.js
new file mode 100644
index 00000000000..df376d78e35
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transform-file.js
@@ -0,0 +1,45 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFileAsync = exports.transformFileSync = exports.transformFile = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = _interopRequireDefault(require("./config"));
+
+var _transformation = require("./transformation");
+
+var fs = _interopRequireWildcard(require("./gensync-utils/fs"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+({});
+const transformFileRunner = (0, _gensync().default)(function* (filename, opts) {
+ const options = Object.assign({}, opts, {
+ filename
+ });
+ const config = yield* (0, _config.default)(options);
+ if (config === null) return null;
+ const code = yield* fs.readFile(filename, "utf8");
+ return yield* (0, _transformation.run)(config, code);
+});
+const transformFile = transformFileRunner.errback;
+exports.transformFile = transformFile;
+const transformFileSync = transformFileRunner.sync;
+exports.transformFileSync = transformFileSync;
+const transformFileAsync = transformFileRunner.async;
+exports.transformFileAsync = transformFileAsync; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transform.js b/tools/node_modules/@babel/core/lib/transform.js
new file mode 100644
index 00000000000..32d4de7830d
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transform.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformAsync = exports.transformSync = exports.transform = void 0;
+
+function _gensync() {
+ const data = _interopRequireDefault(require("gensync"));
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = _interopRequireDefault(require("./config"));
+
+var _transformation = require("./transformation");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const transformRunner = (0, _gensync().default)(function* transform(code, opts) {
+ const config = yield* (0, _config.default)(opts);
+ if (config === null) return null;
+ return yield* (0, _transformation.run)(config, code);
+});
+
+const transform = function transform(code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) return transformRunner.sync(code, opts);
+ transformRunner.errback(code, opts, callback);
+};
+
+exports.transform = transform;
+const transformSync = transformRunner.sync;
+exports.transformSync = transformSync;
+const transformAsync = transformRunner.async;
+exports.transformAsync = transformAsync; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/tools/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
new file mode 100644
index 00000000000..55eb06dfeb5
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
@@ -0,0 +1,68 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadBlockHoistPlugin;
+
+function _sortBy() {
+ const data = _interopRequireDefault(require("lodash/sortBy"));
+
+ _sortBy = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = _interopRequireDefault(require("../config"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+let LOADED_PLUGIN;
+
+function loadBlockHoistPlugin() {
+ if (!LOADED_PLUGIN) {
+ const config = _config.default.sync({
+ babelrc: false,
+ configFile: false,
+ plugins: [blockHoistPlugin]
+ });
+
+ LOADED_PLUGIN = config ? config.passes[0][0] : undefined;
+ if (!LOADED_PLUGIN) throw new Error("Assertion failure");
+ }
+
+ return LOADED_PLUGIN;
+}
+
+const blockHoistPlugin = {
+ name: "internal.blockHoist",
+ visitor: {
+ Block: {
+ exit({
+ node
+ }) {
+ let hasChange = false;
+
+ for (let i = 0; i < node.body.length; i++) {
+ const bodyNode = node.body[i];
+
+ if ((bodyNode == null ? void 0 : bodyNode._blockHoist) != null) {
+ hasChange = true;
+ break;
+ }
+ }
+
+ if (!hasChange) return;
+ node.body = (0, _sortBy().default)(node.body, function (bodyNode) {
+ let priority = bodyNode == null ? void 0 : bodyNode._blockHoist;
+ if (priority == null) priority = 1;
+ if (priority === true) priority = 2;
+ return -1 * priority;
+ });
+ }
+
+ }
+ }
+}; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/file/file.js b/tools/node_modules/@babel/core/lib/transformation/file/file.js
new file mode 100644
index 00000000000..83f636684d8
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/file/file.js
@@ -0,0 +1,255 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+function helpers() {
+ const data = _interopRequireWildcard(require("@babel/helpers"));
+
+ helpers = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _traverse() {
+ const data = _interopRequireWildcard(require("@babel/traverse"));
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _codeFrame() {
+ const data = require("@babel/code-frame");
+
+ _codeFrame = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _helperModuleTransforms() {
+ const data = require("@babel/helper-module-transforms");
+
+ _helperModuleTransforms = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _semver() {
+ const data = _interopRequireDefault(require("semver"));
+
+ _semver = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const errorVisitor = {
+ enter(path, state) {
+ const loc = path.node.loc;
+
+ if (loc) {
+ state.loc = loc;
+ path.stop();
+ }
+ }
+
+};
+
+class File {
+ constructor(options, {
+ code,
+ ast,
+ inputMap
+ }) {
+ this._map = new Map();
+ this.opts = void 0;
+ this.declarations = {};
+ this.path = null;
+ this.ast = {};
+ this.scope = void 0;
+ this.metadata = {};
+ this.code = "";
+ this.inputMap = null;
+ this.hub = {
+ file: this,
+ getCode: () => this.code,
+ getScope: () => this.scope,
+ addHelper: this.addHelper.bind(this),
+ buildError: this.buildCodeFrameError.bind(this)
+ };
+ this.opts = options;
+ this.code = code;
+ this.ast = ast;
+ this.inputMap = inputMap;
+ this.path = _traverse().NodePath.get({
+ hub: this.hub,
+ parentPath: null,
+ parent: this.ast,
+ container: this.ast,
+ key: "program"
+ }).setContext();
+ this.scope = this.path.scope;
+ }
+
+ get shebang() {
+ const {
+ interpreter
+ } = this.path.node;
+ return interpreter ? interpreter.value : "";
+ }
+
+ set shebang(value) {
+ if (value) {
+ this.path.get("interpreter").replaceWith(t().interpreterDirective(value));
+ } else {
+ this.path.get("interpreter").remove();
+ }
+ }
+
+ set(key, val) {
+ if (key === "helpersNamespace") {
+ throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'.");
+ }
+
+ this._map.set(key, val);
+ }
+
+ get(key) {
+ return this._map.get(key);
+ }
+
+ has(key) {
+ return this._map.has(key);
+ }
+
+ getModuleName() {
+ return (0, _helperModuleTransforms().getModuleName)(this.opts, this.opts);
+ }
+
+ addImport() {
+ throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'.");
+ }
+
+ availableHelper(name, versionRange) {
+ let minVersion;
+
+ try {
+ minVersion = helpers().minVersion(name);
+ } catch (err) {
+ if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
+ return false;
+ }
+
+ if (typeof versionRange !== "string") return true;
+ if (_semver().default.valid(versionRange)) versionRange = `^${versionRange}`;
+ return !_semver().default.intersects(`<${minVersion}`, versionRange) && !_semver().default.intersects(`>=8.0.0`, versionRange);
+ }
+
+ addHelper(name) {
+ const declar = this.declarations[name];
+ if (declar) return t().cloneNode(declar);
+ const generator = this.get("helperGenerator");
+
+ if (generator) {
+ const res = generator(name);
+ if (res) return res;
+ }
+
+ helpers().ensure(name, File);
+ const uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
+ const dependencies = {};
+
+ for (const dep of helpers().getDependencies(name)) {
+ dependencies[dep] = this.addHelper(dep);
+ }
+
+ const {
+ nodes,
+ globals
+ } = helpers().get(name, dep => dependencies[dep], uid, Object.keys(this.scope.getAllBindings()));
+ globals.forEach(name => {
+ if (this.path.scope.hasBinding(name, true)) {
+ this.path.scope.rename(name);
+ }
+ });
+ nodes.forEach(node => {
+ node._compact = true;
+ });
+ this.path.unshiftContainer("body", nodes);
+ this.path.get("body").forEach(path => {
+ if (nodes.indexOf(path.node) === -1) return;
+ if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);
+ });
+ return uid;
+ }
+
+ addTemplateObject() {
+ throw new Error("This function has been moved into the template literal transform itself.");
+ }
+
+ buildCodeFrameError(node, msg, Error = SyntaxError) {
+ let loc = node && (node.loc || node._loc);
+
+ if (!loc && node) {
+ const state = {
+ loc: null
+ };
+ (0, _traverse().default)(node, errorVisitor, this.scope, state);
+ loc = state.loc;
+ let txt = "This is an error on an internal node. Probably an internal error.";
+ if (loc) txt += " Location has been estimated.";
+ msg += ` (${txt})`;
+ }
+
+ if (loc) {
+ const {
+ highlightCode = true
+ } = this.opts;
+ msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, {
+ start: {
+ line: loc.start.line,
+ column: loc.start.column + 1
+ },
+ end: loc.end && loc.start.line === loc.end.line ? {
+ line: loc.end.line,
+ column: loc.end.column + 1
+ } : undefined
+ }, {
+ highlightCode
+ });
+ }
+
+ return new Error(msg);
+ }
+
+}
+
+exports.default = File; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/file/generate.js b/tools/node_modules/@babel/core/lib/transformation/file/generate.js
new file mode 100644
index 00000000000..3301b56d247
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/file/generate.js
@@ -0,0 +1,89 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = generateCode;
+
+function _convertSourceMap() {
+ const data = _interopRequireDefault(require("convert-source-map"));
+
+ _convertSourceMap = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _generator() {
+ const data = _interopRequireDefault(require("@babel/generator"));
+
+ _generator = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _mergeMap = _interopRequireDefault(require("./merge-map"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function generateCode(pluginPasses, file) {
+ const {
+ opts,
+ ast,
+ code,
+ inputMap
+ } = file;
+ const results = [];
+
+ for (const plugins of pluginPasses) {
+ for (const plugin of plugins) {
+ const {
+ generatorOverride
+ } = plugin;
+
+ if (generatorOverride) {
+ const result = generatorOverride(ast, opts.generatorOpts, code, _generator().default);
+ if (result !== undefined) results.push(result);
+ }
+ }
+ }
+
+ let result;
+
+ if (results.length === 0) {
+ result = (0, _generator().default)(ast, opts.generatorOpts, code);
+ } else if (results.length === 1) {
+ result = results[0];
+
+ if (typeof result.then === "function") {
+ throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`);
+ }
+ } else {
+ throw new Error("More than one plugin attempted to override codegen.");
+ }
+
+ let {
+ code: outputCode,
+ map: outputMap
+ } = result;
+
+ if (outputMap && inputMap) {
+ outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap);
+ }
+
+ if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
+ outputCode += "\n" + _convertSourceMap().default.fromObject(outputMap).toComment();
+ }
+
+ if (opts.sourceMaps === "inline") {
+ outputMap = null;
+ }
+
+ return {
+ outputCode,
+ outputMap
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/file/merge-map.js b/tools/node_modules/@babel/core/lib/transformation/file/merge-map.js
new file mode 100644
index 00000000000..d49c994a289
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/file/merge-map.js
@@ -0,0 +1,247 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = mergeSourceMap;
+
+function _sourceMap() {
+ const data = _interopRequireDefault(require("source-map"));
+
+ _sourceMap = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function mergeSourceMap(inputMap, map) {
+ const input = buildMappingData(inputMap);
+ const output = buildMappingData(map);
+ const mergedGenerator = new (_sourceMap().default.SourceMapGenerator)();
+
+ for (const {
+ source
+ } of input.sources) {
+ if (typeof source.content === "string") {
+ mergedGenerator.setSourceContent(source.path, source.content);
+ }
+ }
+
+ if (output.sources.length === 1) {
+ const defaultSource = output.sources[0];
+ const insertedMappings = new Map();
+ eachInputGeneratedRange(input, (generated, original, source) => {
+ eachOverlappingGeneratedOutputRange(defaultSource, generated, item => {
+ const key = makeMappingKey(item);
+ if (insertedMappings.has(key)) return;
+ insertedMappings.set(key, item);
+ mergedGenerator.addMapping({
+ source: source.path,
+ original: {
+ line: original.line,
+ column: original.columnStart
+ },
+ generated: {
+ line: item.line,
+ column: item.columnStart
+ },
+ name: original.name
+ });
+ });
+ });
+
+ for (const item of insertedMappings.values()) {
+ if (item.columnEnd === Infinity) {
+ continue;
+ }
+
+ const clearItem = {
+ line: item.line,
+ columnStart: item.columnEnd
+ };
+ const key = makeMappingKey(clearItem);
+
+ if (insertedMappings.has(key)) {
+ continue;
+ }
+
+ mergedGenerator.addMapping({
+ generated: {
+ line: clearItem.line,
+ column: clearItem.columnStart
+ }
+ });
+ }
+ }
+
+ const result = mergedGenerator.toJSON();
+
+ if (typeof input.sourceRoot === "string") {
+ result.sourceRoot = input.sourceRoot;
+ }
+
+ return result;
+}
+
+function makeMappingKey(item) {
+ return `${item.line}/${item.columnStart}`;
+}
+
+function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) {
+ const overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange);
+
+ for (const {
+ generated
+ } of overlappingOriginal) {
+ for (const item of generated) {
+ callback(item);
+ }
+ }
+}
+
+function filterApplicableOriginalRanges({
+ mappings
+}, {
+ line,
+ columnStart,
+ columnEnd
+}) {
+ return filterSortedArray(mappings, ({
+ original: outOriginal
+ }) => {
+ if (line > outOriginal.line) return -1;
+ if (line < outOriginal.line) return 1;
+ if (columnStart >= outOriginal.columnEnd) return -1;
+ if (columnEnd <= outOriginal.columnStart) return 1;
+ return 0;
+ });
+}
+
+function eachInputGeneratedRange(map, callback) {
+ for (const {
+ source,
+ mappings
+ } of map.sources) {
+ for (const {
+ original,
+ generated
+ } of mappings) {
+ for (const item of generated) {
+ callback(item, original, source);
+ }
+ }
+ }
+}
+
+function buildMappingData(map) {
+ const consumer = new (_sourceMap().default.SourceMapConsumer)(Object.assign({}, map, {
+ sourceRoot: null
+ }));
+ const sources = new Map();
+ const mappings = new Map();
+ let last = null;
+ consumer.computeColumnSpans();
+ consumer.eachMapping(m => {
+ if (m.originalLine === null) return;
+ let source = sources.get(m.source);
+
+ if (!source) {
+ source = {
+ path: m.source,
+ content: consumer.sourceContentFor(m.source, true)
+ };
+ sources.set(m.source, source);
+ }
+
+ let sourceData = mappings.get(source);
+
+ if (!sourceData) {
+ sourceData = {
+ source,
+ mappings: []
+ };
+ mappings.set(source, sourceData);
+ }
+
+ const obj = {
+ line: m.originalLine,
+ columnStart: m.originalColumn,
+ columnEnd: Infinity,
+ name: m.name
+ };
+
+ if (last && last.source === source && last.mapping.line === m.originalLine) {
+ last.mapping.columnEnd = m.originalColumn;
+ }
+
+ last = {
+ source,
+ mapping: obj
+ };
+ sourceData.mappings.push({
+ original: obj,
+ generated: consumer.allGeneratedPositionsFor({
+ source: m.source,
+ line: m.originalLine,
+ column: m.originalColumn
+ }).map(item => ({
+ line: item.line,
+ columnStart: item.column,
+ columnEnd: item.lastColumn + 1
+ }))
+ });
+ }, null, _sourceMap().default.SourceMapConsumer.ORIGINAL_ORDER);
+ return {
+ file: map.file,
+ sourceRoot: map.sourceRoot,
+ sources: Array.from(mappings.values())
+ };
+}
+
+function findInsertionLocation(array, callback) {
+ let left = 0;
+ let right = array.length;
+
+ while (left < right) {
+ const mid = Math.floor((left + right) / 2);
+ const item = array[mid];
+ const result = callback(item);
+
+ if (result === 0) {
+ left = mid;
+ break;
+ }
+
+ if (result >= 0) {
+ right = mid;
+ } else {
+ left = mid + 1;
+ }
+ }
+
+ let i = left;
+
+ if (i < array.length) {
+ while (i >= 0 && callback(array[i]) >= 0) {
+ i--;
+ }
+
+ return i + 1;
+ }
+
+ return i;
+}
+
+function filterSortedArray(array, callback) {
+ const start = findInsertionLocation(array, callback);
+ const results = [];
+
+ for (let i = start; i < array.length && callback(array[i]) === 0; i++) {
+ results.push(array[i]);
+ }
+
+ return results;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/index.js b/tools/node_modules/@babel/core/lib/transformation/index.js
new file mode 100644
index 00000000000..bb35bbe0f1c
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/index.js
@@ -0,0 +1,126 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.run = run;
+
+function _traverse() {
+ const data = _interopRequireDefault(require("@babel/traverse"));
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _pluginPass = _interopRequireDefault(require("./plugin-pass"));
+
+var _blockHoistPlugin = _interopRequireDefault(require("./block-hoist-plugin"));
+
+var _normalizeOpts = _interopRequireDefault(require("./normalize-opts"));
+
+var _normalizeFile = _interopRequireDefault(require("./normalize-file"));
+
+var _generate = _interopRequireDefault(require("./file/generate"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function* run(config, code, ast) {
+ const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast);
+ const opts = file.opts;
+
+ try {
+ yield* transformFile(file, config.passes);
+ } catch (e) {
+ var _opts$filename;
+
+ e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown"}: ${e.message}`;
+
+ if (!e.code) {
+ e.code = "BABEL_TRANSFORM_ERROR";
+ }
+
+ throw e;
+ }
+
+ let outputCode, outputMap;
+
+ try {
+ if (opts.code !== false) {
+ ({
+ outputCode,
+ outputMap
+ } = (0, _generate.default)(config.passes, file));
+ }
+ } catch (e) {
+ var _opts$filename2;
+
+ e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown"}: ${e.message}`;
+
+ if (!e.code) {
+ e.code = "BABEL_GENERATE_ERROR";
+ }
+
+ throw e;
+ }
+
+ return {
+ metadata: file.metadata,
+ options: opts,
+ ast: opts.ast === true ? file.ast : null,
+ code: outputCode === undefined ? null : outputCode,
+ map: outputMap === undefined ? null : outputMap,
+ sourceType: file.ast.program.sourceType
+ };
+}
+
+function* transformFile(file, pluginPasses) {
+ for (const pluginPairs of pluginPasses) {
+ const passPairs = [];
+ const passes = [];
+ const visitors = [];
+
+ for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) {
+ const pass = new _pluginPass.default(file, plugin.key, plugin.options);
+ passPairs.push([plugin, pass]);
+ passes.push(pass);
+ visitors.push(plugin.visitor);
+ }
+
+ for (const [plugin, pass] of passPairs) {
+ const fn = plugin.pre;
+
+ if (fn) {
+ const result = fn.call(pass, file);
+ yield* [];
+
+ if (isThenable(result)) {
+ throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+ }
+ }
+
+ const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
+
+ (0, _traverse().default)(file.ast, visitor, file.scope);
+
+ for (const [plugin, pass] of passPairs) {
+ const fn = plugin.post;
+
+ if (fn) {
+ const result = fn.call(pass, file);
+ yield* [];
+
+ if (isThenable(result)) {
+ throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+ }
+ }
+ }
+}
+
+function isThenable(val) {
+ return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/normalize-file.js b/tools/node_modules/@babel/core/lib/transformation/normalize-file.js
new file mode 100644
index 00000000000..b6006bca787
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/normalize-file.js
@@ -0,0 +1,179 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = normalizeFile;
+
+function _fs() {
+ const data = _interopRequireDefault(require("fs"));
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _debug() {
+ const data = _interopRequireDefault(require("debug"));
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _cloneDeep() {
+ const data = _interopRequireDefault(require("lodash/cloneDeep"));
+
+ _cloneDeep = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function t() {
+ const data = _interopRequireWildcard(require("@babel/types"));
+
+ t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _convertSourceMap() {
+ const data = _interopRequireDefault(require("convert-source-map"));
+
+ _convertSourceMap = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _file = _interopRequireDefault(require("./file/file"));
+
+var _parser = _interopRequireDefault(require("../parser"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const debug = (0, _debug().default)("babel:transform:file");
+const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000;
+
+function* normalizeFile(pluginPasses, options, code, ast) {
+ code = `${code || ""}`;
+
+ if (ast) {
+ if (ast.type === "Program") {
+ ast = t().file(ast, [], []);
+ } else if (ast.type !== "File") {
+ throw new Error("AST root must be a Program or File node");
+ }
+
+ const {
+ cloneInputAst
+ } = options;
+
+ if (cloneInputAst) {
+ ast = (0, _cloneDeep().default)(ast);
+ }
+ } else {
+ ast = yield* (0, _parser.default)(pluginPasses, options, code);
+ }
+
+ let inputMap = null;
+
+ if (options.inputSourceMap !== false) {
+ if (typeof options.inputSourceMap === "object") {
+ inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap);
+ }
+
+ if (!inputMap) {
+ const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
+
+ if (lastComment) {
+ try {
+ inputMap = _convertSourceMap().default.fromComment(lastComment);
+ } catch (err) {
+ debug("discarding unknown inline input sourcemap", err);
+ }
+ }
+ }
+
+ if (!inputMap) {
+ const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
+
+ if (typeof options.filename === "string" && lastComment) {
+ try {
+ const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
+
+ const inputMapContent = _fs().default.readFileSync(_path().default.resolve(_path().default.dirname(options.filename), match[1]));
+
+ if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {
+ debug("skip merging input map > 1 MB");
+ } else {
+ inputMap = _convertSourceMap().default.fromJSON(inputMapContent);
+ }
+ } catch (err) {
+ debug("discarding unknown file input sourcemap", err);
+ }
+ } else if (lastComment) {
+ debug("discarding un-loadable file input sourcemap");
+ }
+ }
+ }
+
+ return new _file.default(options, {
+ code,
+ ast,
+ inputMap
+ });
+}
+
+const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/;
+const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
+
+function extractCommentsFromList(regex, comments, lastComment) {
+ if (comments) {
+ comments = comments.filter(({
+ value
+ }) => {
+ if (regex.test(value)) {
+ lastComment = value;
+ return false;
+ }
+
+ return true;
+ });
+ }
+
+ return [comments, lastComment];
+}
+
+function extractComments(regex, ast) {
+ let lastComment = null;
+ t().traverseFast(ast, node => {
+ [node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment);
+ [node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment);
+ [node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment);
+ });
+ return lastComment;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/normalize-opts.js b/tools/node_modules/@babel/core/lib/transformation/normalize-opts.js
new file mode 100644
index 00000000000..1465ad698a5
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/normalize-opts.js
@@ -0,0 +1,65 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = normalizeOptions;
+
+function _path() {
+ const data = _interopRequireDefault(require("path"));
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function normalizeOptions(config) {
+ const {
+ filename,
+ cwd,
+ filenameRelative = typeof filename === "string" ? _path().default.relative(cwd, filename) : "unknown",
+ sourceType = "module",
+ inputSourceMap,
+ sourceMaps = !!inputSourceMap,
+ moduleRoot,
+ sourceRoot = moduleRoot,
+ sourceFileName = _path().default.basename(filenameRelative),
+ comments = true,
+ compact = "auto"
+ } = config.options;
+ const opts = config.options;
+ const options = Object.assign({}, opts, {
+ parserOpts: Object.assign({
+ sourceType: _path().default.extname(filenameRelative) === ".mjs" ? "module" : sourceType,
+ sourceFileName: filename,
+ plugins: []
+ }, opts.parserOpts),
+ generatorOpts: Object.assign({
+ filename,
+ auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
+ auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
+ retainLines: opts.retainLines,
+ comments,
+ shouldPrintComment: opts.shouldPrintComment,
+ compact,
+ minified: opts.minified,
+ sourceMaps,
+ sourceRoot,
+ sourceFileName
+ }, opts.generatorOpts)
+ });
+
+ for (const plugins of config.passes) {
+ for (const plugin of plugins) {
+ if (plugin.manipulateOptions) {
+ plugin.manipulateOptions(options, options.parserOpts);
+ }
+ }
+ }
+
+ return options;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/lib/transformation/plugin-pass.js b/tools/node_modules/@babel/core/lib/transformation/plugin-pass.js
new file mode 100644
index 00000000000..ea2efdfefcf
--- /dev/null
+++ b/tools/node_modules/@babel/core/lib/transformation/plugin-pass.js
@@ -0,0 +1,53 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class PluginPass {
+ constructor(file, key, options) {
+ this._map = new Map();
+ this.key = void 0;
+ this.file = void 0;
+ this.opts = void 0;
+ this.cwd = void 0;
+ this.filename = void 0;
+ this.key = key;
+ this.file = file;
+ this.opts = options || {};
+ this.cwd = file.opts.cwd;
+ this.filename = file.opts.filename;
+ }
+
+ set(key, val) {
+ this._map.set(key, val);
+ }
+
+ get(key) {
+ return this._map.get(key);
+ }
+
+ availableHelper(name, versionRange) {
+ return this.file.availableHelper(name, versionRange);
+ }
+
+ addHelper(name) {
+ return this.file.addHelper(name);
+ }
+
+ addImport() {
+ return this.file.addImport();
+ }
+
+ getModuleName() {
+ return this.file.getModuleName();
+ }
+
+ buildCodeFrameError(node, msg, Error) {
+ return this.file.buildCodeFrameError(node, msg, Error);
+ }
+
+}
+
+exports.default = PluginPass; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/README.md
index 185f93d2471..185f93d2471 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/README.md
+++ b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js
new file mode 100644
index 00000000000..28d86f7bc1c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/lib/index.js
@@ -0,0 +1,167 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.codeFrameColumns = codeFrameColumns;
+exports.default = _default;
+
+var _highlight = _interopRequireWildcard(require("@babel/highlight"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+let deprecationWarningShown = false;
+
+function getDefs(chalk) {
+ return {
+ gutter: chalk.grey,
+ marker: chalk.red.bold,
+ message: chalk.red.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+
+function getMarkerLines(loc, source, opts) {
+ const startLoc = Object.assign({
+ column: 0,
+ line: -1
+ }, loc.start);
+ const endLoc = Object.assign({}, startLoc, loc.end);
+ const {
+ linesAbove = 2,
+ linesBelow = 3
+ } = opts || {};
+ const startLine = startLoc.line;
+ const startColumn = startLoc.column;
+ const endLine = endLoc.line;
+ const endColumn = endLoc.column;
+ let start = Math.max(startLine - (linesAbove + 1), 0);
+ let end = Math.min(source.length, endLine + linesBelow);
+
+ if (startLine === -1) {
+ start = 0;
+ }
+
+ if (endLine === -1) {
+ end = source.length;
+ }
+
+ const lineDiff = endLine - startLine;
+ const markerLines = {};
+
+ if (lineDiff) {
+ for (let i = 0; i <= lineDiff; i++) {
+ const lineNumber = i + startLine;
+
+ if (!startColumn) {
+ markerLines[lineNumber] = true;
+ } else if (i === 0) {
+ const sourceLength = source[lineNumber - 1].length;
+ markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+ } else if (i === lineDiff) {
+ markerLines[lineNumber] = [0, endColumn];
+ } else {
+ const sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, sourceLength];
+ }
+ }
+ } else {
+ if (startColumn === endColumn) {
+ if (startColumn) {
+ markerLines[startLine] = [startColumn, 0];
+ } else {
+ markerLines[startLine] = true;
+ }
+ } else {
+ markerLines[startLine] = [startColumn, endColumn - startColumn];
+ }
+ }
+
+ return {
+ start,
+ end,
+ markerLines
+ };
+}
+
+function codeFrameColumns(rawLines, loc, opts = {}) {
+ const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
+ const chalk = (0, _highlight.getChalk)(opts);
+ const defs = getDefs(chalk);
+
+ const maybeHighlight = (chalkFn, string) => {
+ return highlighted ? chalkFn(string) : string;
+ };
+
+ const lines = rawLines.split(NEWLINE);
+ const {
+ start,
+ end,
+ markerLines
+ } = getMarkerLines(loc, lines, opts);
+ const hasColumns = loc.start && typeof loc.start.column === "number";
+ const numberMaxWidth = String(end).length;
+ const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
+ let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {
+ const number = start + 1 + index;
+ const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
+ const gutter = ` ${paddedNumber} | `;
+ const hasMarker = markerLines[number];
+ const lastMarkerLine = !markerLines[number + 1];
+
+ if (hasMarker) {
+ let markerLine = "";
+
+ if (Array.isArray(hasMarker)) {
+ const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+ const numberOfMarkers = hasMarker[1] || 1;
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+
+ if (lastMarkerLine && opts.message) {
+ markerLine += " " + maybeHighlight(defs.message, opts.message);
+ }
+ }
+
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
+ } else {
+ return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
+ }
+ }).join("\n");
+
+ if (opts.message && !hasColumns) {
+ frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
+ }
+
+ if (highlighted) {
+ return chalk.reset(frame);
+ } else {
+ return frame;
+ }
+}
+
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
+ if (!deprecationWarningShown) {
+ deprecationWarningShown = true;
+ const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
+
+ if (process.emitWarning) {
+ process.emitWarning(message, "DeprecationWarning");
+ } else {
+ const deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
+ }
+ }
+
+ colNumber = Math.max(colNumber, 0);
+ const location = {
+ start: {
+ column: colNumber,
+ line: lineNumber
+ }
+ };
+ return codeFrameColumns(rawLines, location, opts);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/code-frame/package.json b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/package.json
new file mode 100644
index 00000000000..d2e0ccffde9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/code-frame/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@babel/code-frame",
+ "version": "7.10.4",
+ "description": "Generate errors that contain a code frame that point to source locations.",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-code-frame"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/highlight": "^7.10.4"
+ },
+ "devDependencies": {
+ "chalk": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/generator/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/README.md b/tools/node_modules/@babel/core/node_modules/@babel/generator/README.md
new file mode 100644
index 00000000000..b760238ebc5
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/README.md
@@ -0,0 +1,19 @@
+# @babel/generator
+
+> Turns an AST into code.
+
+See our website [@babel/generator](https://babeljs.io/docs/en/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/generator
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/generator --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js
new file mode 100644
index 00000000000..333e08c9e69
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/buffer.js
@@ -0,0 +1,257 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+const SPACES_RE = /^[ \t]+$/;
+
+class Buffer {
+ constructor(map) {
+ this._map = null;
+ this._buf = [];
+ this._last = "";
+ this._queue = [];
+ this._position = {
+ line: 1,
+ column: 0
+ };
+ this._sourcePosition = {
+ identifierName: null,
+ line: null,
+ column: null,
+ filename: null
+ };
+ this._disallowedPop = null;
+ this._map = map;
+ }
+
+ get() {
+ this._flush();
+
+ const map = this._map;
+ const result = {
+ code: this._buf.join("").trimRight(),
+ map: null,
+ rawMappings: map == null ? void 0 : map.getRawMappings()
+ };
+
+ if (map) {
+ Object.defineProperty(result, "map", {
+ configurable: true,
+ enumerable: true,
+
+ get() {
+ return this.map = map.get();
+ },
+
+ set(value) {
+ Object.defineProperty(this, "map", {
+ value,
+ writable: true
+ });
+ }
+
+ });
+ }
+
+ return result;
+ }
+
+ append(str) {
+ this._flush();
+
+ const {
+ line,
+ column,
+ filename,
+ identifierName,
+ force
+ } = this._sourcePosition;
+
+ this._append(str, line, column, identifierName, filename, force);
+ }
+
+ queue(str) {
+ if (str === "\n") {
+ while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
+ this._queue.shift();
+ }
+ }
+
+ const {
+ line,
+ column,
+ filename,
+ identifierName,
+ force
+ } = this._sourcePosition;
+
+ this._queue.unshift([str, line, column, identifierName, filename, force]);
+ }
+
+ _flush() {
+ let item;
+
+ while (item = this._queue.pop()) this._append(...item);
+ }
+
+ _append(str, line, column, identifierName, filename, force) {
+ this._buf.push(str);
+
+ this._last = str[str.length - 1];
+ let i = str.indexOf("\n");
+ let last = 0;
+
+ if (i !== 0) {
+ this._mark(line, column, identifierName, filename, force);
+ }
+
+ while (i !== -1) {
+ this._position.line++;
+ this._position.column = 0;
+ last = i + 1;
+
+ if (last < str.length) {
+ this._mark(++line, 0, identifierName, filename, force);
+ }
+
+ i = str.indexOf("\n", last);
+ }
+
+ this._position.column += str.length - last;
+ }
+
+ _mark(line, column, identifierName, filename, force) {
+ var _this$_map;
+
+ (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
+ }
+
+ removeTrailingNewline() {
+ if (this._queue.length > 0 && this._queue[0][0] === "\n") {
+ this._queue.shift();
+ }
+ }
+
+ removeLastSemicolon() {
+ if (this._queue.length > 0 && this._queue[0][0] === ";") {
+ this._queue.shift();
+ }
+ }
+
+ endsWith(suffix) {
+ if (suffix.length === 1) {
+ let last;
+
+ if (this._queue.length > 0) {
+ const str = this._queue[0][0];
+ last = str[str.length - 1];
+ } else {
+ last = this._last;
+ }
+
+ return last === suffix;
+ }
+
+ const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
+
+ if (suffix.length <= end.length) {
+ return end.slice(-suffix.length) === suffix;
+ }
+
+ return false;
+ }
+
+ hasContent() {
+ return this._queue.length > 0 || !!this._last;
+ }
+
+ exactSource(loc, cb) {
+ this.source("start", loc, true);
+ cb();
+ this.source("end", loc);
+
+ this._disallowPop("start", loc);
+ }
+
+ source(prop, loc, force) {
+ if (prop && !loc) return;
+
+ this._normalizePosition(prop, loc, this._sourcePosition, force);
+ }
+
+ withSource(prop, loc, cb) {
+ if (!this._map) return cb();
+ const originalLine = this._sourcePosition.line;
+ const originalColumn = this._sourcePosition.column;
+ const originalFilename = this._sourcePosition.filename;
+ const originalIdentifierName = this._sourcePosition.identifierName;
+ this.source(prop, loc);
+ cb();
+
+ if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
+ this._sourcePosition.line = originalLine;
+ this._sourcePosition.column = originalColumn;
+ this._sourcePosition.filename = originalFilename;
+ this._sourcePosition.identifierName = originalIdentifierName;
+ this._sourcePosition.force = false;
+ this._disallowedPop = null;
+ }
+ }
+
+ _disallowPop(prop, loc) {
+ if (prop && !loc) return;
+ this._disallowedPop = this._normalizePosition(prop, loc);
+ }
+
+ _normalizePosition(prop, loc, targetObj, force) {
+ const pos = loc ? loc[prop] : null;
+
+ if (targetObj === undefined) {
+ targetObj = {
+ identifierName: null,
+ line: null,
+ column: null,
+ filename: null,
+ force: false
+ };
+ }
+
+ const origLine = targetObj.line;
+ const origColumn = targetObj.column;
+ const origFilename = targetObj.filename;
+ targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
+ targetObj.line = pos == null ? void 0 : pos.line;
+ targetObj.column = pos == null ? void 0 : pos.column;
+ targetObj.filename = loc == null ? void 0 : loc.filename;
+
+ if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
+ targetObj.force = force;
+ }
+
+ return targetObj;
+ }
+
+ getCurrentColumn() {
+ const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
+
+ const lastIndex = extra.lastIndexOf("\n");
+ return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
+ }
+
+ getCurrentLine() {
+ const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
+
+ let count = 0;
+
+ for (let i = 0; i < extra.length; i++) {
+ if (extra[i] === "\n") count++;
+ }
+
+ return this._position.line + count;
+ }
+
+}
+
+exports.default = Buffer; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js
new file mode 100644
index 00000000000..713827a9c81
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/base.js
@@ -0,0 +1,99 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.File = File;
+exports.Program = Program;
+exports.BlockStatement = BlockStatement;
+exports.Noop = Noop;
+exports.Directive = Directive;
+exports.DirectiveLiteral = DirectiveLiteral;
+exports.InterpreterDirective = InterpreterDirective;
+exports.Placeholder = Placeholder;
+
+function File(node) {
+ if (node.program) {
+ this.print(node.program.interpreter, node);
+ }
+
+ this.print(node.program, node);
+}
+
+function Program(node) {
+ this.printInnerComments(node, false);
+ this.printSequence(node.directives, node);
+ if (node.directives && node.directives.length) this.newline();
+ this.printSequence(node.body, node);
+}
+
+function BlockStatement(node) {
+ var _node$directives;
+
+ this.token("{");
+ this.printInnerComments(node);
+ const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
+
+ if (node.body.length || hasDirectives) {
+ this.newline();
+ this.printSequence(node.directives, node, {
+ indent: true
+ });
+ if (hasDirectives) this.newline();
+ this.printSequence(node.body, node, {
+ indent: true
+ });
+ this.removeTrailingNewline();
+ this.source("end", node.loc);
+ if (!this.endsWith("\n")) this.newline();
+ this.rightBrace();
+ } else {
+ this.source("end", node.loc);
+ this.token("}");
+ }
+}
+
+function Noop() {}
+
+function Directive(node) {
+ this.print(node.value, node);
+ this.semicolon();
+}
+
+const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
+const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
+
+function DirectiveLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ const {
+ value
+ } = node;
+
+ if (!unescapedDoubleQuoteRE.test(value)) {
+ this.token(`"${value}"`);
+ } else if (!unescapedSingleQuoteRE.test(value)) {
+ this.token(`'${value}'`);
+ } else {
+ throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
+ }
+}
+
+function InterpreterDirective(node) {
+ this.token(`#!${node.value}\n`);
+}
+
+function Placeholder(node) {
+ this.token("%%");
+ this.print(node.name);
+ this.token("%%");
+
+ if (node.expectedNode === "Statement") {
+ this.semicolon();
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js
new file mode 100644
index 00000000000..aa1e622da9c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/classes.js
@@ -0,0 +1,170 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
+exports.ClassBody = ClassBody;
+exports.ClassProperty = ClassProperty;
+exports.ClassPrivateProperty = ClassPrivateProperty;
+exports.ClassMethod = ClassMethod;
+exports.ClassPrivateMethod = ClassPrivateMethod;
+exports._classMethodHead = _classMethodHead;
+exports.StaticBlock = StaticBlock;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function ClassDeclaration(node, parent) {
+ if (!this.format.decoratorsBeforeExport || !t.isExportDefaultDeclaration(parent) && !t.isExportNamedDeclaration(parent)) {
+ this.printJoin(node.decorators, node);
+ }
+
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (node.abstract) {
+ this.word("abstract");
+ this.space();
+ }
+
+ this.word("class");
+
+ if (node.id) {
+ this.space();
+ this.print(node.id, node);
+ }
+
+ this.print(node.typeParameters, node);
+
+ if (node.superClass) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.superClass, node);
+ this.print(node.superTypeParameters, node);
+ }
+
+ if (node.implements) {
+ this.space();
+ this.word("implements");
+ this.space();
+ this.printList(node.implements, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ClassBody(node) {
+ this.token("{");
+ this.printInnerComments(node);
+
+ if (node.body.length === 0) {
+ this.token("}");
+ } else {
+ this.newline();
+ this.indent();
+ this.printSequence(node.body, node);
+ this.dedent();
+ if (!this.endsWith("\n")) this.newline();
+ this.rightBrace();
+ }
+}
+
+function ClassProperty(node) {
+ this.printJoin(node.decorators, node);
+ this.tsPrintClassMemberModifiers(node, true);
+
+ if (node.computed) {
+ this.token("[");
+ this.print(node.key, node);
+ this.token("]");
+ } else {
+ this._variance(node);
+
+ this.print(node.key, node);
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+
+ if (node.definite) {
+ this.token("!");
+ }
+
+ this.print(node.typeAnnotation, node);
+
+ if (node.value) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.value, node);
+ }
+
+ this.semicolon();
+}
+
+function ClassPrivateProperty(node) {
+ this.printJoin(node.decorators, node);
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.print(node.key, node);
+ this.print(node.typeAnnotation, node);
+
+ if (node.value) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.value, node);
+ }
+
+ this.semicolon();
+}
+
+function ClassMethod(node) {
+ this._classMethodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ClassPrivateMethod(node) {
+ this._classMethodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function _classMethodHead(node) {
+ this.printJoin(node.decorators, node);
+ this.tsPrintClassMemberModifiers(node, false);
+
+ this._methodHead(node);
+}
+
+function StaticBlock(node) {
+ this.word("static");
+ this.space();
+ this.token("{");
+
+ if (node.body.length === 0) {
+ this.token("}");
+ } else {
+ this.newline();
+ this.printSequence(node.body, node, {
+ indent: true
+ });
+ this.rightBrace();
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js
new file mode 100644
index 00000000000..4e63a699408
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/expressions.js
@@ -0,0 +1,292 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.UnaryExpression = UnaryExpression;
+exports.DoExpression = DoExpression;
+exports.ParenthesizedExpression = ParenthesizedExpression;
+exports.UpdateExpression = UpdateExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.NewExpression = NewExpression;
+exports.SequenceExpression = SequenceExpression;
+exports.ThisExpression = ThisExpression;
+exports.Super = Super;
+exports.Decorator = Decorator;
+exports.OptionalMemberExpression = OptionalMemberExpression;
+exports.OptionalCallExpression = OptionalCallExpression;
+exports.CallExpression = CallExpression;
+exports.Import = Import;
+exports.EmptyStatement = EmptyStatement;
+exports.ExpressionStatement = ExpressionStatement;
+exports.AssignmentPattern = AssignmentPattern;
+exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
+exports.BindExpression = BindExpression;
+exports.MemberExpression = MemberExpression;
+exports.MetaProperty = MetaProperty;
+exports.PrivateName = PrivateName;
+exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
+exports.AwaitExpression = exports.YieldExpression = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var n = _interopRequireWildcard(require("../node"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function UnaryExpression(node) {
+ if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
+ this.word(node.operator);
+ this.space();
+ } else {
+ this.token(node.operator);
+ }
+
+ this.print(node.argument, node);
+}
+
+function DoExpression(node) {
+ this.word("do");
+ this.space();
+ this.print(node.body, node);
+}
+
+function ParenthesizedExpression(node) {
+ this.token("(");
+ this.print(node.expression, node);
+ this.token(")");
+}
+
+function UpdateExpression(node) {
+ if (node.prefix) {
+ this.token(node.operator);
+ this.print(node.argument, node);
+ } else {
+ this.startTerminatorless(true);
+ this.print(node.argument, node);
+ this.endTerminatorless();
+ this.token(node.operator);
+ }
+}
+
+function ConditionalExpression(node) {
+ this.print(node.test, node);
+ this.space();
+ this.token("?");
+ this.space();
+ this.print(node.consequent, node);
+ this.space();
+ this.token(":");
+ this.space();
+ this.print(node.alternate, node);
+}
+
+function NewExpression(node, parent) {
+ this.word("new");
+ this.space();
+ this.print(node.callee, node);
+
+ if (this.format.minified && node.arguments.length === 0 && !node.optional && !t.isCallExpression(parent, {
+ callee: node
+ }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) {
+ return;
+ }
+
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function SequenceExpression(node) {
+ this.printList(node.expressions, node);
+}
+
+function ThisExpression() {
+ this.word("this");
+}
+
+function Super() {
+ this.word("super");
+}
+
+function Decorator(node) {
+ this.token("@");
+ this.print(node.expression, node);
+ this.newline();
+}
+
+function OptionalMemberExpression(node) {
+ this.print(node.object, node);
+
+ if (!node.computed && t.isMemberExpression(node.property)) {
+ throw new TypeError("Got a MemberExpression for MemberExpression property");
+ }
+
+ let computed = node.computed;
+
+ if (t.isLiteral(node.property) && typeof node.property.value === "number") {
+ computed = true;
+ }
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ if (computed) {
+ this.token("[");
+ this.print(node.property, node);
+ this.token("]");
+ } else {
+ if (!node.optional) {
+ this.token(".");
+ }
+
+ this.print(node.property, node);
+ }
+}
+
+function OptionalCallExpression(node) {
+ this.print(node.callee, node);
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function CallExpression(node) {
+ this.print(node.callee, node);
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function Import() {
+ this.word("import");
+}
+
+function buildYieldAwait(keyword) {
+ return function (node) {
+ this.word(keyword);
+
+ if (node.delegate) {
+ this.token("*");
+ }
+
+ if (node.argument) {
+ this.space();
+ const terminatorState = this.startTerminatorless();
+ this.print(node.argument, node);
+ this.endTerminatorless(terminatorState);
+ }
+ };
+}
+
+const YieldExpression = buildYieldAwait("yield");
+exports.YieldExpression = YieldExpression;
+const AwaitExpression = buildYieldAwait("await");
+exports.AwaitExpression = AwaitExpression;
+
+function EmptyStatement() {
+ this.semicolon(true);
+}
+
+function ExpressionStatement(node) {
+ this.print(node.expression, node);
+ this.semicolon();
+}
+
+function AssignmentPattern(node) {
+ this.print(node.left, node);
+ if (node.left.optional) this.token("?");
+ this.print(node.left.typeAnnotation, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.right, node);
+}
+
+function AssignmentExpression(node, parent) {
+ const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
+
+ if (parens) {
+ this.token("(");
+ }
+
+ this.print(node.left, node);
+ this.space();
+
+ if (node.operator === "in" || node.operator === "instanceof") {
+ this.word(node.operator);
+ } else {
+ this.token(node.operator);
+ }
+
+ this.space();
+ this.print(node.right, node);
+
+ if (parens) {
+ this.token(")");
+ }
+}
+
+function BindExpression(node) {
+ this.print(node.object, node);
+ this.token("::");
+ this.print(node.callee, node);
+}
+
+function MemberExpression(node) {
+ this.print(node.object, node);
+
+ if (!node.computed && t.isMemberExpression(node.property)) {
+ throw new TypeError("Got a MemberExpression for MemberExpression property");
+ }
+
+ let computed = node.computed;
+
+ if (t.isLiteral(node.property) && typeof node.property.value === "number") {
+ computed = true;
+ }
+
+ if (computed) {
+ this.token("[");
+ this.print(node.property, node);
+ this.token("]");
+ } else {
+ this.token(".");
+ this.print(node.property, node);
+ }
+}
+
+function MetaProperty(node) {
+ this.print(node.meta, node);
+ this.token(".");
+ this.print(node.property, node);
+}
+
+function PrivateName(node) {
+ this.token("#");
+ this.print(node.id, node);
+}
+
+function V8IntrinsicIdentifier(node) {
+ this.token("%");
+ this.word(node.name);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js
new file mode 100644
index 00000000000..08c1734bee1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/flow.js
@@ -0,0 +1,753 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.AnyTypeAnnotation = AnyTypeAnnotation;
+exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
+exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
+exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
+exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
+exports.DeclareClass = DeclareClass;
+exports.DeclareFunction = DeclareFunction;
+exports.InferredPredicate = InferredPredicate;
+exports.DeclaredPredicate = DeclaredPredicate;
+exports.DeclareInterface = DeclareInterface;
+exports.DeclareModule = DeclareModule;
+exports.DeclareModuleExports = DeclareModuleExports;
+exports.DeclareTypeAlias = DeclareTypeAlias;
+exports.DeclareOpaqueType = DeclareOpaqueType;
+exports.DeclareVariable = DeclareVariable;
+exports.DeclareExportDeclaration = DeclareExportDeclaration;
+exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
+exports.EnumDeclaration = EnumDeclaration;
+exports.EnumBooleanBody = EnumBooleanBody;
+exports.EnumNumberBody = EnumNumberBody;
+exports.EnumStringBody = EnumStringBody;
+exports.EnumSymbolBody = EnumSymbolBody;
+exports.EnumDefaultedMember = EnumDefaultedMember;
+exports.EnumBooleanMember = EnumBooleanMember;
+exports.EnumNumberMember = EnumNumberMember;
+exports.EnumStringMember = EnumStringMember;
+exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
+exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
+exports.FunctionTypeParam = FunctionTypeParam;
+exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
+exports._interfaceish = _interfaceish;
+exports._variance = _variance;
+exports.InterfaceDeclaration = InterfaceDeclaration;
+exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
+exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
+exports.MixedTypeAnnotation = MixedTypeAnnotation;
+exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
+exports.NullableTypeAnnotation = NullableTypeAnnotation;
+exports.NumberTypeAnnotation = NumberTypeAnnotation;
+exports.StringTypeAnnotation = StringTypeAnnotation;
+exports.ThisTypeAnnotation = ThisTypeAnnotation;
+exports.TupleTypeAnnotation = TupleTypeAnnotation;
+exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
+exports.TypeAlias = TypeAlias;
+exports.TypeAnnotation = TypeAnnotation;
+exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
+exports.TypeParameter = TypeParameter;
+exports.OpaqueType = OpaqueType;
+exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
+exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
+exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
+exports.ObjectTypeIndexer = ObjectTypeIndexer;
+exports.ObjectTypeProperty = ObjectTypeProperty;
+exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
+exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
+exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
+exports.UnionTypeAnnotation = UnionTypeAnnotation;
+exports.TypeCastExpression = TypeCastExpression;
+exports.Variance = Variance;
+exports.VoidTypeAnnotation = VoidTypeAnnotation;
+Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _types2.NumericLiteral;
+ }
+});
+Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _types2.StringLiteral;
+ }
+});
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _modules = require("./modules");
+
+var _types2 = require("./types");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function AnyTypeAnnotation() {
+ this.word("any");
+}
+
+function ArrayTypeAnnotation(node) {
+ this.print(node.elementType, node);
+ this.token("[");
+ this.token("]");
+}
+
+function BooleanTypeAnnotation() {
+ this.word("boolean");
+}
+
+function BooleanLiteralTypeAnnotation(node) {
+ this.word(node.value ? "true" : "false");
+}
+
+function NullLiteralTypeAnnotation() {
+ this.word("null");
+}
+
+function DeclareClass(node, parent) {
+ if (!t.isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("class");
+ this.space();
+
+ this._interfaceish(node);
+}
+
+function DeclareFunction(node, parent) {
+ if (!t.isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("function");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.id.typeAnnotation.typeAnnotation, node);
+
+ if (node.predicate) {
+ this.space();
+ this.print(node.predicate, node);
+ }
+
+ this.semicolon();
+}
+
+function InferredPredicate() {
+ this.token("%");
+ this.word("checks");
+}
+
+function DeclaredPredicate(node) {
+ this.token("%");
+ this.word("checks");
+ this.token("(");
+ this.print(node.value, node);
+ this.token(")");
+}
+
+function DeclareInterface(node) {
+ this.word("declare");
+ this.space();
+ this.InterfaceDeclaration(node);
+}
+
+function DeclareModule(node) {
+ this.word("declare");
+ this.space();
+ this.word("module");
+ this.space();
+ this.print(node.id, node);
+ this.space();
+ this.print(node.body, node);
+}
+
+function DeclareModuleExports(node) {
+ this.word("declare");
+ this.space();
+ this.word("module");
+ this.token(".");
+ this.word("exports");
+ this.print(node.typeAnnotation, node);
+}
+
+function DeclareTypeAlias(node) {
+ this.word("declare");
+ this.space();
+ this.TypeAlias(node);
+}
+
+function DeclareOpaqueType(node, parent) {
+ if (!t.isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.OpaqueType(node);
+}
+
+function DeclareVariable(node, parent) {
+ if (!t.isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("var");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.id.typeAnnotation, node);
+ this.semicolon();
+}
+
+function DeclareExportDeclaration(node) {
+ this.word("declare");
+ this.space();
+ this.word("export");
+ this.space();
+
+ if (node.default) {
+ this.word("default");
+ this.space();
+ }
+
+ FlowExportDeclaration.apply(this, arguments);
+}
+
+function DeclareExportAllDeclaration() {
+ this.word("declare");
+ this.space();
+
+ _modules.ExportAllDeclaration.apply(this, arguments);
+}
+
+function EnumDeclaration(node) {
+ const {
+ id,
+ body
+ } = node;
+ this.word("enum");
+ this.space();
+ this.print(id, node);
+ this.print(body, node);
+}
+
+function enumExplicitType(context, name, hasExplicitType) {
+ if (hasExplicitType) {
+ context.space();
+ context.word("of");
+ context.space();
+ context.word(name);
+ }
+
+ context.space();
+}
+
+function enumBody(context, node) {
+ const {
+ members
+ } = node;
+ context.token("{");
+ context.indent();
+ context.newline();
+
+ for (const member of members) {
+ context.print(member, node);
+ context.newline();
+ }
+
+ context.dedent();
+ context.token("}");
+}
+
+function EnumBooleanBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "boolean", explicitType);
+ enumBody(this, node);
+}
+
+function EnumNumberBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "number", explicitType);
+ enumBody(this, node);
+}
+
+function EnumStringBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "string", explicitType);
+ enumBody(this, node);
+}
+
+function EnumSymbolBody(node) {
+ enumExplicitType(this, "symbol", true);
+ enumBody(this, node);
+}
+
+function EnumDefaultedMember(node) {
+ const {
+ id
+ } = node;
+ this.print(id, node);
+ this.token(",");
+}
+
+function enumInitializedMember(context, node) {
+ const {
+ id,
+ init
+ } = node;
+ context.print(id, node);
+ context.space();
+ context.token("=");
+ context.space();
+ context.print(init, node);
+ context.token(",");
+}
+
+function EnumBooleanMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function EnumNumberMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function EnumStringMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function FlowExportDeclaration(node) {
+ if (node.declaration) {
+ const declar = node.declaration;
+ this.print(declar, node);
+ if (!t.isStatement(declar)) this.semicolon();
+ } else {
+ this.token("{");
+
+ if (node.specifiers.length) {
+ this.space();
+ this.printList(node.specifiers, node);
+ this.space();
+ }
+
+ this.token("}");
+
+ if (node.source) {
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ }
+
+ this.semicolon();
+ }
+}
+
+function ExistsTypeAnnotation() {
+ this.token("*");
+}
+
+function FunctionTypeAnnotation(node, parent) {
+ this.print(node.typeParameters, node);
+ this.token("(");
+ this.printList(node.params, node);
+
+ if (node.rest) {
+ if (node.params.length) {
+ this.token(",");
+ this.space();
+ }
+
+ this.token("...");
+ this.print(node.rest, node);
+ }
+
+ this.token(")");
+
+ if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
+ this.token(":");
+ } else {
+ this.space();
+ this.token("=>");
+ }
+
+ this.space();
+ this.print(node.returnType, node);
+}
+
+function FunctionTypeParam(node) {
+ this.print(node.name, node);
+ if (node.optional) this.token("?");
+
+ if (node.name) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.typeAnnotation, node);
+}
+
+function InterfaceExtends(node) {
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+}
+
+function _interfaceish(node) {
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+
+ if (node.extends.length) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(node.extends, node);
+ }
+
+ if (node.mixins && node.mixins.length) {
+ this.space();
+ this.word("mixins");
+ this.space();
+ this.printList(node.mixins, node);
+ }
+
+ if (node.implements && node.implements.length) {
+ this.space();
+ this.word("implements");
+ this.space();
+ this.printList(node.implements, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function _variance(node) {
+ if (node.variance) {
+ if (node.variance.kind === "plus") {
+ this.token("+");
+ } else if (node.variance.kind === "minus") {
+ this.token("-");
+ }
+ }
+}
+
+function InterfaceDeclaration(node) {
+ this.word("interface");
+ this.space();
+
+ this._interfaceish(node);
+}
+
+function andSeparator() {
+ this.space();
+ this.token("&");
+ this.space();
+}
+
+function InterfaceTypeAnnotation(node) {
+ this.word("interface");
+
+ if (node.extends && node.extends.length) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(node.extends, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function IntersectionTypeAnnotation(node) {
+ this.printJoin(node.types, node, {
+ separator: andSeparator
+ });
+}
+
+function MixedTypeAnnotation() {
+ this.word("mixed");
+}
+
+function EmptyTypeAnnotation() {
+ this.word("empty");
+}
+
+function NullableTypeAnnotation(node) {
+ this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function NumberTypeAnnotation() {
+ this.word("number");
+}
+
+function StringTypeAnnotation() {
+ this.word("string");
+}
+
+function ThisTypeAnnotation() {
+ this.word("this");
+}
+
+function TupleTypeAnnotation(node) {
+ this.token("[");
+ this.printList(node.types, node);
+ this.token("]");
+}
+
+function TypeofTypeAnnotation(node) {
+ this.word("typeof");
+ this.space();
+ this.print(node.argument, node);
+}
+
+function TypeAlias(node) {
+ this.word("type");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.right, node);
+ this.semicolon();
+}
+
+function TypeAnnotation(node) {
+ this.token(":");
+ this.space();
+ if (node.optional) this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function TypeParameterInstantiation(node) {
+ this.token("<");
+ this.printList(node.params, node, {});
+ this.token(">");
+}
+
+function TypeParameter(node) {
+ this._variance(node);
+
+ this.word(node.name);
+
+ if (node.bound) {
+ this.print(node.bound, node);
+ }
+
+ if (node.default) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.default, node);
+ }
+}
+
+function OpaqueType(node) {
+ this.word("opaque");
+ this.space();
+ this.word("type");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+
+ if (node.supertype) {
+ this.token(":");
+ this.space();
+ this.print(node.supertype, node);
+ }
+
+ if (node.impltype) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.impltype, node);
+ }
+
+ this.semicolon();
+}
+
+function ObjectTypeAnnotation(node) {
+ if (node.exact) {
+ this.token("{|");
+ } else {
+ this.token("{");
+ }
+
+ const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []);
+
+ if (props.length) {
+ this.space();
+ this.printJoin(props, node, {
+ addNewlines(leading) {
+ if (leading && !props[0]) return 1;
+ },
+
+ indent: true,
+ statement: true,
+ iterator: () => {
+ if (props.length !== 1 || node.inexact) {
+ this.token(",");
+ this.space();
+ }
+ }
+ });
+ this.space();
+ }
+
+ if (node.inexact) {
+ this.indent();
+ this.token("...");
+
+ if (props.length) {
+ this.newline();
+ }
+
+ this.dedent();
+ }
+
+ if (node.exact) {
+ this.token("|}");
+ } else {
+ this.token("}");
+ }
+}
+
+function ObjectTypeInternalSlot(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.token("[");
+ this.token("[");
+ this.print(node.id, node);
+ this.token("]");
+ this.token("]");
+ if (node.optional) this.token("?");
+
+ if (!node.method) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeCallProperty(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeIndexer(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this._variance(node);
+
+ this.token("[");
+
+ if (node.id) {
+ this.print(node.id, node);
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.key, node);
+ this.token("]");
+ this.token(":");
+ this.space();
+ this.print(node.value, node);
+}
+
+function ObjectTypeProperty(node) {
+ if (node.proto) {
+ this.word("proto");
+ this.space();
+ }
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ if (node.kind === "get" || node.kind === "set") {
+ this.word(node.kind);
+ this.space();
+ }
+
+ this._variance(node);
+
+ this.print(node.key, node);
+ if (node.optional) this.token("?");
+
+ if (!node.method) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeSpreadProperty(node) {
+ this.token("...");
+ this.print(node.argument, node);
+}
+
+function QualifiedTypeIdentifier(node) {
+ this.print(node.qualification, node);
+ this.token(".");
+ this.print(node.id, node);
+}
+
+function SymbolTypeAnnotation() {
+ this.word("symbol");
+}
+
+function orSeparator() {
+ this.space();
+ this.token("|");
+ this.space();
+}
+
+function UnionTypeAnnotation(node) {
+ this.printJoin(node.types, node, {
+ separator: orSeparator
+ });
+}
+
+function TypeCastExpression(node) {
+ this.token("(");
+ this.print(node.expression, node);
+ this.print(node.typeAnnotation, node);
+ this.token(")");
+}
+
+function Variance(node) {
+ if (node.kind === "plus") {
+ this.token("+");
+ } else {
+ this.token("-");
+ }
+}
+
+function VoidTypeAnnotation() {
+ this.word("void");
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js
new file mode 100644
index 00000000000..8820db09efe
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/index.js
@@ -0,0 +1,148 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _templateLiterals = require("./template-literals");
+
+Object.keys(_templateLiterals).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _templateLiterals[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _templateLiterals[key];
+ }
+ });
+});
+
+var _expressions = require("./expressions");
+
+Object.keys(_expressions).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _expressions[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _expressions[key];
+ }
+ });
+});
+
+var _statements = require("./statements");
+
+Object.keys(_statements).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _statements[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _statements[key];
+ }
+ });
+});
+
+var _classes = require("./classes");
+
+Object.keys(_classes).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _classes[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _classes[key];
+ }
+ });
+});
+
+var _methods = require("./methods");
+
+Object.keys(_methods).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _methods[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _methods[key];
+ }
+ });
+});
+
+var _modules = require("./modules");
+
+Object.keys(_modules).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _modules[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _modules[key];
+ }
+ });
+});
+
+var _types = require("./types");
+
+Object.keys(_types).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _types[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _types[key];
+ }
+ });
+});
+
+var _flow = require("./flow");
+
+Object.keys(_flow).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _flow[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _flow[key];
+ }
+ });
+});
+
+var _base = require("./base");
+
+Object.keys(_base).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _base[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _base[key];
+ }
+ });
+});
+
+var _jsx = require("./jsx");
+
+Object.keys(_jsx).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _jsx[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _jsx[key];
+ }
+ });
+});
+
+var _typescript = require("./typescript");
+
+Object.keys(_typescript).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _typescript[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _typescript[key];
+ }
+ });
+}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/jsx.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js
index 48509139839..48509139839 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/jsx.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/jsx.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js
new file mode 100644
index 00000000000..f51ab2e79b3
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/methods.js
@@ -0,0 +1,163 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._params = _params;
+exports._parameters = _parameters;
+exports._param = _param;
+exports._methodHead = _methodHead;
+exports._predicate = _predicate;
+exports._functionHead = _functionHead;
+exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
+exports.ArrowFunctionExpression = ArrowFunctionExpression;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _params(node) {
+ this.print(node.typeParameters, node);
+ this.token("(");
+
+ this._parameters(node.params, node);
+
+ this.token(")");
+ this.print(node.returnType, node);
+}
+
+function _parameters(parameters, parent) {
+ for (let i = 0; i < parameters.length; i++) {
+ this._param(parameters[i], parent);
+
+ if (i < parameters.length - 1) {
+ this.token(",");
+ this.space();
+ }
+ }
+}
+
+function _param(parameter, parent) {
+ this.printJoin(parameter.decorators, parameter);
+ this.print(parameter, parent);
+ if (parameter.optional) this.token("?");
+ this.print(parameter.typeAnnotation, parameter);
+}
+
+function _methodHead(node) {
+ const kind = node.kind;
+ const key = node.key;
+
+ if (kind === "get" || kind === "set") {
+ this.word(kind);
+ this.space();
+ }
+
+ if (node.async) {
+ this._catchUp("start", key.loc);
+
+ this.word("async");
+ this.space();
+ }
+
+ if (kind === "method" || kind === "init") {
+ if (node.generator) {
+ this.token("*");
+ }
+ }
+
+ if (node.computed) {
+ this.token("[");
+ this.print(key, node);
+ this.token("]");
+ } else {
+ this.print(key, node);
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+
+ this._params(node);
+}
+
+function _predicate(node) {
+ if (node.predicate) {
+ if (!node.returnType) {
+ this.token(":");
+ }
+
+ this.space();
+ this.print(node.predicate, node);
+ }
+}
+
+function _functionHead(node) {
+ if (node.async) {
+ this.word("async");
+ this.space();
+ }
+
+ this.word("function");
+ if (node.generator) this.token("*");
+ this.space();
+
+ if (node.id) {
+ this.print(node.id, node);
+ }
+
+ this._params(node);
+
+ this._predicate(node);
+}
+
+function FunctionExpression(node) {
+ this._functionHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ArrowFunctionExpression(node) {
+ if (node.async) {
+ this.word("async");
+ this.space();
+ }
+
+ const firstParam = node.params[0];
+
+ if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
+ if ((this.format.retainLines || node.async) && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) {
+ this.token("(");
+
+ if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) {
+ this.indent();
+ this.print(firstParam, node);
+ this.dedent();
+
+ this._catchUp("start", node.body.loc);
+ } else {
+ this.print(firstParam, node);
+ }
+
+ this.token(")");
+ } else {
+ this.print(firstParam, node);
+ }
+ } else {
+ this._params(node);
+ }
+
+ this._predicate(node);
+
+ this.space();
+ this.token("=>");
+ this.space();
+ this.print(node.body, node);
+}
+
+function hasTypes(node, param) {
+ return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js
new file mode 100644
index 00000000000..ad266329730
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/modules.js
@@ -0,0 +1,229 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ImportSpecifier = ImportSpecifier;
+exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
+exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
+exports.ExportSpecifier = ExportSpecifier;
+exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
+exports.ExportAllDeclaration = ExportAllDeclaration;
+exports.ExportNamedDeclaration = ExportNamedDeclaration;
+exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
+exports.ImportDeclaration = ImportDeclaration;
+exports.ImportAttribute = ImportAttribute;
+exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function ImportSpecifier(node) {
+ if (node.importKind === "type" || node.importKind === "typeof") {
+ this.word(node.importKind);
+ this.space();
+ }
+
+ this.print(node.imported, node);
+
+ if (node.local && node.local.name !== node.imported.name) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.local, node);
+ }
+}
+
+function ImportDefaultSpecifier(node) {
+ this.print(node.local, node);
+}
+
+function ExportDefaultSpecifier(node) {
+ this.print(node.exported, node);
+}
+
+function ExportSpecifier(node) {
+ this.print(node.local, node);
+
+ if (node.exported && node.local.name !== node.exported.name) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.exported, node);
+ }
+}
+
+function ExportNamespaceSpecifier(node) {
+ this.token("*");
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.exported, node);
+}
+
+function ExportAllDeclaration(node) {
+ this.word("export");
+ this.space();
+
+ if (node.exportKind === "type") {
+ this.word("type");
+ this.space();
+ }
+
+ this.token("*");
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ this.printAssertions(node);
+ this.semicolon();
+}
+
+function ExportNamedDeclaration(node) {
+ if (this.format.decoratorsBeforeExport && t.isClassDeclaration(node.declaration)) {
+ this.printJoin(node.declaration.decorators, node);
+ }
+
+ this.word("export");
+ this.space();
+ ExportDeclaration.apply(this, arguments);
+}
+
+function ExportDefaultDeclaration(node) {
+ if (this.format.decoratorsBeforeExport && t.isClassDeclaration(node.declaration)) {
+ this.printJoin(node.declaration.decorators, node);
+ }
+
+ this.word("export");
+ this.space();
+ this.word("default");
+ this.space();
+ ExportDeclaration.apply(this, arguments);
+}
+
+function ExportDeclaration(node) {
+ if (node.declaration) {
+ const declar = node.declaration;
+ this.print(declar, node);
+ if (!t.isStatement(declar)) this.semicolon();
+ } else {
+ if (node.exportKind === "type") {
+ this.word("type");
+ this.space();
+ }
+
+ const specifiers = node.specifiers.slice(0);
+ let hasSpecial = false;
+
+ for (;;) {
+ const first = specifiers[0];
+
+ if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) {
+ hasSpecial = true;
+ this.print(specifiers.shift(), node);
+
+ if (specifiers.length) {
+ this.token(",");
+ this.space();
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (specifiers.length || !specifiers.length && !hasSpecial) {
+ this.token("{");
+
+ if (specifiers.length) {
+ this.space();
+ this.printList(specifiers, node);
+ this.space();
+ }
+
+ this.token("}");
+ }
+
+ if (node.source) {
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ this.printAssertions(node);
+ }
+
+ this.semicolon();
+ }
+}
+
+function ImportDeclaration(node) {
+ var _node$attributes;
+
+ this.word("import");
+ this.space();
+
+ if (node.importKind === "type" || node.importKind === "typeof") {
+ this.word(node.importKind);
+ this.space();
+ }
+
+ const specifiers = node.specifiers.slice(0);
+
+ if (specifiers == null ? void 0 : specifiers.length) {
+ for (;;) {
+ const first = specifiers[0];
+
+ if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) {
+ this.print(specifiers.shift(), node);
+
+ if (specifiers.length) {
+ this.token(",");
+ this.space();
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (specifiers.length) {
+ this.token("{");
+ this.space();
+ this.printList(specifiers, node);
+ this.space();
+ this.token("}");
+ }
+
+ this.space();
+ this.word("from");
+ this.space();
+ }
+
+ this.print(node.source, node);
+ this.printAssertions(node);
+
+ if ((_node$attributes = node.attributes) == null ? void 0 : _node$attributes.length) {
+ this.space();
+ this.word("with");
+ this.space();
+ this.printList(node.attributes, node);
+ }
+
+ this.semicolon();
+}
+
+function ImportAttribute(node) {
+ this.print(node.key);
+ this.token(":");
+ this.space();
+ this.print(node.value);
+}
+
+function ImportNamespaceSpecifier(node) {
+ this.token("*");
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.local, node);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js
new file mode 100644
index 00000000000..3a9dbfa8358
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/statements.js
@@ -0,0 +1,314 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.WithStatement = WithStatement;
+exports.IfStatement = IfStatement;
+exports.ForStatement = ForStatement;
+exports.WhileStatement = WhileStatement;
+exports.DoWhileStatement = DoWhileStatement;
+exports.LabeledStatement = LabeledStatement;
+exports.TryStatement = TryStatement;
+exports.CatchClause = CatchClause;
+exports.SwitchStatement = SwitchStatement;
+exports.SwitchCase = SwitchCase;
+exports.DebuggerStatement = DebuggerStatement;
+exports.VariableDeclaration = VariableDeclaration;
+exports.VariableDeclarator = VariableDeclarator;
+exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function WithStatement(node) {
+ this.word("with");
+ this.space();
+ this.token("(");
+ this.print(node.object, node);
+ this.token(")");
+ this.printBlock(node);
+}
+
+function IfStatement(node) {
+ this.word("if");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.space();
+ const needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent));
+
+ if (needsBlock) {
+ this.token("{");
+ this.newline();
+ this.indent();
+ }
+
+ this.printAndIndentOnComments(node.consequent, node);
+
+ if (needsBlock) {
+ this.dedent();
+ this.newline();
+ this.token("}");
+ }
+
+ if (node.alternate) {
+ if (this.endsWith("}")) this.space();
+ this.word("else");
+ this.space();
+ this.printAndIndentOnComments(node.alternate, node);
+ }
+}
+
+function getLastStatement(statement) {
+ if (!t.isStatement(statement.body)) return statement;
+ return getLastStatement(statement.body);
+}
+
+function ForStatement(node) {
+ this.word("for");
+ this.space();
+ this.token("(");
+ this.inForStatementInitCounter++;
+ this.print(node.init, node);
+ this.inForStatementInitCounter--;
+ this.token(";");
+
+ if (node.test) {
+ this.space();
+ this.print(node.test, node);
+ }
+
+ this.token(";");
+
+ if (node.update) {
+ this.space();
+ this.print(node.update, node);
+ }
+
+ this.token(")");
+ this.printBlock(node);
+}
+
+function WhileStatement(node) {
+ this.word("while");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.printBlock(node);
+}
+
+const buildForXStatement = function (op) {
+ return function (node) {
+ this.word("for");
+ this.space();
+
+ if (op === "of" && node.await) {
+ this.word("await");
+ this.space();
+ }
+
+ this.token("(");
+ this.print(node.left, node);
+ this.space();
+ this.word(op);
+ this.space();
+ this.print(node.right, node);
+ this.token(")");
+ this.printBlock(node);
+ };
+};
+
+const ForInStatement = buildForXStatement("in");
+exports.ForInStatement = ForInStatement;
+const ForOfStatement = buildForXStatement("of");
+exports.ForOfStatement = ForOfStatement;
+
+function DoWhileStatement(node) {
+ this.word("do");
+ this.space();
+ this.print(node.body, node);
+ this.space();
+ this.word("while");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.semicolon();
+}
+
+function buildLabelStatement(prefix, key = "label") {
+ return function (node) {
+ this.word(prefix);
+ const label = node[key];
+
+ if (label) {
+ this.space();
+ const isLabel = key == "label";
+ const terminatorState = this.startTerminatorless(isLabel);
+ this.print(label, node);
+ this.endTerminatorless(terminatorState);
+ }
+
+ this.semicolon();
+ };
+}
+
+const ContinueStatement = buildLabelStatement("continue");
+exports.ContinueStatement = ContinueStatement;
+const ReturnStatement = buildLabelStatement("return", "argument");
+exports.ReturnStatement = ReturnStatement;
+const BreakStatement = buildLabelStatement("break");
+exports.BreakStatement = BreakStatement;
+const ThrowStatement = buildLabelStatement("throw", "argument");
+exports.ThrowStatement = ThrowStatement;
+
+function LabeledStatement(node) {
+ this.print(node.label, node);
+ this.token(":");
+ this.space();
+ this.print(node.body, node);
+}
+
+function TryStatement(node) {
+ this.word("try");
+ this.space();
+ this.print(node.block, node);
+ this.space();
+
+ if (node.handlers) {
+ this.print(node.handlers[0], node);
+ } else {
+ this.print(node.handler, node);
+ }
+
+ if (node.finalizer) {
+ this.space();
+ this.word("finally");
+ this.space();
+ this.print(node.finalizer, node);
+ }
+}
+
+function CatchClause(node) {
+ this.word("catch");
+ this.space();
+
+ if (node.param) {
+ this.token("(");
+ this.print(node.param, node);
+ this.print(node.param.typeAnnotation, node);
+ this.token(")");
+ this.space();
+ }
+
+ this.print(node.body, node);
+}
+
+function SwitchStatement(node) {
+ this.word("switch");
+ this.space();
+ this.token("(");
+ this.print(node.discriminant, node);
+ this.token(")");
+ this.space();
+ this.token("{");
+ this.printSequence(node.cases, node, {
+ indent: true,
+
+ addNewlines(leading, cas) {
+ if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
+ }
+
+ });
+ this.token("}");
+}
+
+function SwitchCase(node) {
+ if (node.test) {
+ this.word("case");
+ this.space();
+ this.print(node.test, node);
+ this.token(":");
+ } else {
+ this.word("default");
+ this.token(":");
+ }
+
+ if (node.consequent.length) {
+ this.newline();
+ this.printSequence(node.consequent, node, {
+ indent: true
+ });
+ }
+}
+
+function DebuggerStatement() {
+ this.word("debugger");
+ this.semicolon();
+}
+
+function variableDeclarationIndent() {
+ this.token(",");
+ this.newline();
+ if (this.endsWith("\n")) for (let i = 0; i < 4; i++) this.space(true);
+}
+
+function constDeclarationIndent() {
+ this.token(",");
+ this.newline();
+ if (this.endsWith("\n")) for (let i = 0; i < 6; i++) this.space(true);
+}
+
+function VariableDeclaration(node, parent) {
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word(node.kind);
+ this.space();
+ let hasInits = false;
+
+ if (!t.isFor(parent)) {
+ for (const declar of node.declarations) {
+ if (declar.init) {
+ hasInits = true;
+ }
+ }
+ }
+
+ let separator;
+
+ if (hasInits) {
+ separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
+ }
+
+ this.printList(node.declarations, node, {
+ separator
+ });
+
+ if (t.isFor(parent)) {
+ if (parent.left === node || parent.init === node) return;
+ }
+
+ this.semicolon();
+}
+
+function VariableDeclarator(node) {
+ this.print(node.id, node);
+ if (node.definite) this.token("!");
+ this.print(node.id.typeAnnotation, node);
+
+ if (node.init) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.init, node);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/template-literals.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js
index 054330362d6..054330362d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/template-literals.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/template-literals.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js
new file mode 100644
index 00000000000..603a5935b50
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/types.js
@@ -0,0 +1,263 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Identifier = Identifier;
+exports.ArgumentPlaceholder = ArgumentPlaceholder;
+exports.SpreadElement = exports.RestElement = RestElement;
+exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
+exports.ObjectMethod = ObjectMethod;
+exports.ObjectProperty = ObjectProperty;
+exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
+exports.RecordExpression = RecordExpression;
+exports.TupleExpression = TupleExpression;
+exports.RegExpLiteral = RegExpLiteral;
+exports.BooleanLiteral = BooleanLiteral;
+exports.NullLiteral = NullLiteral;
+exports.NumericLiteral = NumericLiteral;
+exports.StringLiteral = StringLiteral;
+exports.BigIntLiteral = BigIntLiteral;
+exports.DecimalLiteral = DecimalLiteral;
+exports.PipelineTopicExpression = PipelineTopicExpression;
+exports.PipelineBareFunction = PipelineBareFunction;
+exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _jsesc = _interopRequireDefault(require("jsesc"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function Identifier(node) {
+ this.exactSource(node.loc, () => {
+ this.word(node.name);
+ });
+}
+
+function ArgumentPlaceholder() {
+ this.token("?");
+}
+
+function RestElement(node) {
+ this.token("...");
+ this.print(node.argument, node);
+}
+
+function ObjectExpression(node) {
+ const props = node.properties;
+ this.token("{");
+ this.printInnerComments(node);
+
+ if (props.length) {
+ this.space();
+ this.printList(props, node, {
+ indent: true,
+ statement: true
+ });
+ this.space();
+ }
+
+ this.token("}");
+}
+
+function ObjectMethod(node) {
+ this.printJoin(node.decorators, node);
+
+ this._methodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ObjectProperty(node) {
+ this.printJoin(node.decorators, node);
+
+ if (node.computed) {
+ this.token("[");
+ this.print(node.key, node);
+ this.token("]");
+ } else {
+ if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) {
+ this.print(node.value, node);
+ return;
+ }
+
+ this.print(node.key, node);
+
+ if (node.shorthand && t.isIdentifier(node.key) && t.isIdentifier(node.value) && node.key.name === node.value.name) {
+ return;
+ }
+ }
+
+ this.token(":");
+ this.space();
+ this.print(node.value, node);
+}
+
+function ArrayExpression(node) {
+ const elems = node.elements;
+ const len = elems.length;
+ this.token("[");
+ this.printInnerComments(node);
+
+ for (let i = 0; i < elems.length; i++) {
+ const elem = elems[i];
+
+ if (elem) {
+ if (i > 0) this.space();
+ this.print(elem, node);
+ if (i < len - 1) this.token(",");
+ } else {
+ this.token(",");
+ }
+ }
+
+ this.token("]");
+}
+
+function RecordExpression(node) {
+ const props = node.properties;
+ let startToken;
+ let endToken;
+
+ if (this.format.recordAndTupleSyntaxType === "bar") {
+ startToken = "{|";
+ endToken = "|}";
+ } else if (this.format.recordAndTupleSyntaxType === "hash") {
+ startToken = "#{";
+ endToken = "}";
+ } else {
+ throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
+ }
+
+ this.token(startToken);
+ this.printInnerComments(node);
+
+ if (props.length) {
+ this.space();
+ this.printList(props, node, {
+ indent: true,
+ statement: true
+ });
+ this.space();
+ }
+
+ this.token(endToken);
+}
+
+function TupleExpression(node) {
+ const elems = node.elements;
+ const len = elems.length;
+ let startToken;
+ let endToken;
+
+ if (this.format.recordAndTupleSyntaxType === "bar") {
+ startToken = "[|";
+ endToken = "|]";
+ } else if (this.format.recordAndTupleSyntaxType === "hash") {
+ startToken = "#[";
+ endToken = "]";
+ } else {
+ throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
+ }
+
+ this.token(startToken);
+ this.printInnerComments(node);
+
+ for (let i = 0; i < elems.length; i++) {
+ const elem = elems[i];
+
+ if (elem) {
+ if (i > 0) this.space();
+ this.print(elem, node);
+ if (i < len - 1) this.token(",");
+ }
+ }
+
+ this.token(endToken);
+}
+
+function RegExpLiteral(node) {
+ this.word(`/${node.pattern}/${node.flags}`);
+}
+
+function BooleanLiteral(node) {
+ this.word(node.value ? "true" : "false");
+}
+
+function NullLiteral() {
+ this.word("null");
+}
+
+function NumericLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+ const opts = this.format.jsescOption;
+ const value = node.value + "";
+
+ if (opts.numbers) {
+ this.number((0, _jsesc.default)(node.value, opts));
+ } else if (raw == null) {
+ this.number(value);
+ } else if (this.format.minified) {
+ this.number(raw.length < value.length ? raw : value);
+ } else {
+ this.number(raw);
+ }
+}
+
+function StringLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ const opts = this.format.jsescOption;
+
+ if (this.format.jsonCompatibleStrings) {
+ opts.json = true;
+ }
+
+ const val = (0, _jsesc.default)(node.value, opts);
+ return this.token(val);
+}
+
+function BigIntLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ this.token(node.value + "n");
+}
+
+function DecimalLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ this.token(node.value + "m");
+}
+
+function PipelineTopicExpression(node) {
+ this.print(node.expression, node);
+}
+
+function PipelineBareFunction(node) {
+ this.print(node.callee, node);
+}
+
+function PipelinePrimaryTopicReference() {
+ this.token("#");
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js
new file mode 100644
index 00000000000..4e938e6fa2a
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/generators/typescript.js
@@ -0,0 +1,781 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TSTypeAnnotation = TSTypeAnnotation;
+exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
+exports.TSTypeParameter = TSTypeParameter;
+exports.TSParameterProperty = TSParameterProperty;
+exports.TSDeclareFunction = TSDeclareFunction;
+exports.TSDeclareMethod = TSDeclareMethod;
+exports.TSQualifiedName = TSQualifiedName;
+exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
+exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
+exports.TSPropertySignature = TSPropertySignature;
+exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
+exports.TSMethodSignature = TSMethodSignature;
+exports.TSIndexSignature = TSIndexSignature;
+exports.TSAnyKeyword = TSAnyKeyword;
+exports.TSBigIntKeyword = TSBigIntKeyword;
+exports.TSUnknownKeyword = TSUnknownKeyword;
+exports.TSNumberKeyword = TSNumberKeyword;
+exports.TSObjectKeyword = TSObjectKeyword;
+exports.TSBooleanKeyword = TSBooleanKeyword;
+exports.TSStringKeyword = TSStringKeyword;
+exports.TSSymbolKeyword = TSSymbolKeyword;
+exports.TSVoidKeyword = TSVoidKeyword;
+exports.TSUndefinedKeyword = TSUndefinedKeyword;
+exports.TSNullKeyword = TSNullKeyword;
+exports.TSNeverKeyword = TSNeverKeyword;
+exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
+exports.TSThisType = TSThisType;
+exports.TSFunctionType = TSFunctionType;
+exports.TSConstructorType = TSConstructorType;
+exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
+exports.TSTypeReference = TSTypeReference;
+exports.TSTypePredicate = TSTypePredicate;
+exports.TSTypeQuery = TSTypeQuery;
+exports.TSTypeLiteral = TSTypeLiteral;
+exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
+exports.tsPrintBraced = tsPrintBraced;
+exports.TSArrayType = TSArrayType;
+exports.TSTupleType = TSTupleType;
+exports.TSOptionalType = TSOptionalType;
+exports.TSRestType = TSRestType;
+exports.TSNamedTupleMember = TSNamedTupleMember;
+exports.TSUnionType = TSUnionType;
+exports.TSIntersectionType = TSIntersectionType;
+exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
+exports.TSConditionalType = TSConditionalType;
+exports.TSInferType = TSInferType;
+exports.TSParenthesizedType = TSParenthesizedType;
+exports.TSTypeOperator = TSTypeOperator;
+exports.TSIndexedAccessType = TSIndexedAccessType;
+exports.TSMappedType = TSMappedType;
+exports.TSLiteralType = TSLiteralType;
+exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
+exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
+exports.TSInterfaceBody = TSInterfaceBody;
+exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
+exports.TSAsExpression = TSAsExpression;
+exports.TSTypeAssertion = TSTypeAssertion;
+exports.TSEnumDeclaration = TSEnumDeclaration;
+exports.TSEnumMember = TSEnumMember;
+exports.TSModuleDeclaration = TSModuleDeclaration;
+exports.TSModuleBlock = TSModuleBlock;
+exports.TSImportType = TSImportType;
+exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
+exports.TSExternalModuleReference = TSExternalModuleReference;
+exports.TSNonNullExpression = TSNonNullExpression;
+exports.TSExportAssignment = TSExportAssignment;
+exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
+exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
+exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
+
+function TSTypeAnnotation(node) {
+ this.token(":");
+ this.space();
+ if (node.optional) this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function TSTypeParameterInstantiation(node) {
+ this.token("<");
+ this.printList(node.params, node, {});
+ this.token(">");
+}
+
+function TSTypeParameter(node) {
+ this.word(node.name);
+
+ if (node.constraint) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.constraint, node);
+ }
+
+ if (node.default) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.default, node);
+ }
+}
+
+function TSParameterProperty(node) {
+ if (node.accessibility) {
+ this.word(node.accessibility);
+ this.space();
+ }
+
+ if (node.readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this._param(node.parameter);
+}
+
+function TSDeclareFunction(node) {
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this._functionHead(node);
+
+ this.token(";");
+}
+
+function TSDeclareMethod(node) {
+ this._classMethodHead(node);
+
+ this.token(";");
+}
+
+function TSQualifiedName(node) {
+ this.print(node.left, node);
+ this.token(".");
+ this.print(node.right, node);
+}
+
+function TSCallSignatureDeclaration(node) {
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSConstructSignatureDeclaration(node) {
+ this.word("new");
+ this.space();
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSPropertySignature(node) {
+ const {
+ readonly,
+ initializer
+ } = node;
+
+ if (readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this.tsPrintPropertyOrMethodName(node);
+ this.print(node.typeAnnotation, node);
+
+ if (initializer) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(initializer, node);
+ }
+
+ this.token(";");
+}
+
+function tsPrintPropertyOrMethodName(node) {
+ if (node.computed) {
+ this.token("[");
+ }
+
+ this.print(node.key, node);
+
+ if (node.computed) {
+ this.token("]");
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+}
+
+function TSMethodSignature(node) {
+ this.tsPrintPropertyOrMethodName(node);
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSIndexSignature(node) {
+ const {
+ readonly
+ } = node;
+
+ if (readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this.token("[");
+
+ this._parameters(node.parameters, node);
+
+ this.token("]");
+ this.print(node.typeAnnotation, node);
+ this.token(";");
+}
+
+function TSAnyKeyword() {
+ this.word("any");
+}
+
+function TSBigIntKeyword() {
+ this.word("bigint");
+}
+
+function TSUnknownKeyword() {
+ this.word("unknown");
+}
+
+function TSNumberKeyword() {
+ this.word("number");
+}
+
+function TSObjectKeyword() {
+ this.word("object");
+}
+
+function TSBooleanKeyword() {
+ this.word("boolean");
+}
+
+function TSStringKeyword() {
+ this.word("string");
+}
+
+function TSSymbolKeyword() {
+ this.word("symbol");
+}
+
+function TSVoidKeyword() {
+ this.word("void");
+}
+
+function TSUndefinedKeyword() {
+ this.word("undefined");
+}
+
+function TSNullKeyword() {
+ this.word("null");
+}
+
+function TSNeverKeyword() {
+ this.word("never");
+}
+
+function TSIntrinsicKeyword() {
+ this.word("intrinsic");
+}
+
+function TSThisType() {
+ this.word("this");
+}
+
+function TSFunctionType(node) {
+ this.tsPrintFunctionOrConstructorType(node);
+}
+
+function TSConstructorType(node) {
+ this.word("new");
+ this.space();
+ this.tsPrintFunctionOrConstructorType(node);
+}
+
+function tsPrintFunctionOrConstructorType(node) {
+ const {
+ typeParameters,
+ parameters
+ } = node;
+ this.print(typeParameters, node);
+ this.token("(");
+
+ this._parameters(parameters, node);
+
+ this.token(")");
+ this.space();
+ this.token("=>");
+ this.space();
+ this.print(node.typeAnnotation.typeAnnotation, node);
+}
+
+function TSTypeReference(node) {
+ this.print(node.typeName, node);
+ this.print(node.typeParameters, node);
+}
+
+function TSTypePredicate(node) {
+ if (node.asserts) {
+ this.word("asserts");
+ this.space();
+ }
+
+ this.print(node.parameterName);
+
+ if (node.typeAnnotation) {
+ this.space();
+ this.word("is");
+ this.space();
+ this.print(node.typeAnnotation.typeAnnotation);
+ }
+}
+
+function TSTypeQuery(node) {
+ this.word("typeof");
+ this.space();
+ this.print(node.exprName);
+}
+
+function TSTypeLiteral(node) {
+ this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
+}
+
+function tsPrintTypeLiteralOrInterfaceBody(members, node) {
+ this.tsPrintBraced(members, node);
+}
+
+function tsPrintBraced(members, node) {
+ this.token("{");
+
+ if (members.length) {
+ this.indent();
+ this.newline();
+
+ for (const member of members) {
+ this.print(member, node);
+ this.newline();
+ }
+
+ this.dedent();
+ this.rightBrace();
+ } else {
+ this.token("}");
+ }
+}
+
+function TSArrayType(node) {
+ this.print(node.elementType, node);
+ this.token("[]");
+}
+
+function TSTupleType(node) {
+ this.token("[");
+ this.printList(node.elementTypes, node);
+ this.token("]");
+}
+
+function TSOptionalType(node) {
+ this.print(node.typeAnnotation, node);
+ this.token("?");
+}
+
+function TSRestType(node) {
+ this.token("...");
+ this.print(node.typeAnnotation, node);
+}
+
+function TSNamedTupleMember(node) {
+ this.print(node.label, node);
+ if (node.optional) this.token("?");
+ this.token(":");
+ this.space();
+ this.print(node.elementType, node);
+}
+
+function TSUnionType(node) {
+ this.tsPrintUnionOrIntersectionType(node, "|");
+}
+
+function TSIntersectionType(node) {
+ this.tsPrintUnionOrIntersectionType(node, "&");
+}
+
+function tsPrintUnionOrIntersectionType(node, sep) {
+ this.printJoin(node.types, node, {
+ separator() {
+ this.space();
+ this.token(sep);
+ this.space();
+ }
+
+ });
+}
+
+function TSConditionalType(node) {
+ this.print(node.checkType);
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.extendsType);
+ this.space();
+ this.token("?");
+ this.space();
+ this.print(node.trueType);
+ this.space();
+ this.token(":");
+ this.space();
+ this.print(node.falseType);
+}
+
+function TSInferType(node) {
+ this.token("infer");
+ this.space();
+ this.print(node.typeParameter);
+}
+
+function TSParenthesizedType(node) {
+ this.token("(");
+ this.print(node.typeAnnotation, node);
+ this.token(")");
+}
+
+function TSTypeOperator(node) {
+ this.word(node.operator);
+ this.space();
+ this.print(node.typeAnnotation, node);
+}
+
+function TSIndexedAccessType(node) {
+ this.print(node.objectType, node);
+ this.token("[");
+ this.print(node.indexType, node);
+ this.token("]");
+}
+
+function TSMappedType(node) {
+ const {
+ nameType,
+ optional,
+ readonly,
+ typeParameter
+ } = node;
+ this.token("{");
+ this.space();
+
+ if (readonly) {
+ tokenIfPlusMinus(this, readonly);
+ this.word("readonly");
+ this.space();
+ }
+
+ this.token("[");
+ this.word(typeParameter.name);
+ this.space();
+ this.word("in");
+ this.space();
+ this.print(typeParameter.constraint, typeParameter);
+
+ if (nameType) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(nameType, node);
+ }
+
+ this.token("]");
+
+ if (optional) {
+ tokenIfPlusMinus(this, optional);
+ this.token("?");
+ }
+
+ this.token(":");
+ this.space();
+ this.print(node.typeAnnotation, node);
+ this.space();
+ this.token("}");
+}
+
+function tokenIfPlusMinus(self, tok) {
+ if (tok !== true) {
+ self.token(tok);
+ }
+}
+
+function TSLiteralType(node) {
+ this.print(node.literal, node);
+}
+
+function TSExpressionWithTypeArguments(node) {
+ this.print(node.expression, node);
+ this.print(node.typeParameters, node);
+}
+
+function TSInterfaceDeclaration(node) {
+ const {
+ declare,
+ id,
+ typeParameters,
+ extends: extendz,
+ body
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("interface");
+ this.space();
+ this.print(id, node);
+ this.print(typeParameters, node);
+
+ if (extendz) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(extendz, node);
+ }
+
+ this.space();
+ this.print(body, node);
+}
+
+function TSInterfaceBody(node) {
+ this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
+}
+
+function TSTypeAliasDeclaration(node) {
+ const {
+ declare,
+ id,
+ typeParameters,
+ typeAnnotation
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("type");
+ this.space();
+ this.print(id, node);
+ this.print(typeParameters, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(typeAnnotation, node);
+ this.token(";");
+}
+
+function TSAsExpression(node) {
+ const {
+ expression,
+ typeAnnotation
+ } = node;
+ this.print(expression, node);
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(typeAnnotation, node);
+}
+
+function TSTypeAssertion(node) {
+ const {
+ typeAnnotation,
+ expression
+ } = node;
+ this.token("<");
+ this.print(typeAnnotation, node);
+ this.token(">");
+ this.space();
+ this.print(expression, node);
+}
+
+function TSEnumDeclaration(node) {
+ const {
+ declare,
+ const: isConst,
+ id,
+ members
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (isConst) {
+ this.word("const");
+ this.space();
+ }
+
+ this.word("enum");
+ this.space();
+ this.print(id, node);
+ this.space();
+ this.tsPrintBraced(members, node);
+}
+
+function TSEnumMember(node) {
+ const {
+ id,
+ initializer
+ } = node;
+ this.print(id, node);
+
+ if (initializer) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(initializer, node);
+ }
+
+ this.token(",");
+}
+
+function TSModuleDeclaration(node) {
+ const {
+ declare,
+ id
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (!node.global) {
+ this.word(id.type === "Identifier" ? "namespace" : "module");
+ this.space();
+ }
+
+ this.print(id, node);
+
+ if (!node.body) {
+ this.token(";");
+ return;
+ }
+
+ let body = node.body;
+
+ while (body.type === "TSModuleDeclaration") {
+ this.token(".");
+ this.print(body.id, body);
+ body = body.body;
+ }
+
+ this.space();
+ this.print(body, node);
+}
+
+function TSModuleBlock(node) {
+ this.tsPrintBraced(node.body, node);
+}
+
+function TSImportType(node) {
+ const {
+ argument,
+ qualifier,
+ typeParameters
+ } = node;
+ this.word("import");
+ this.token("(");
+ this.print(argument, node);
+ this.token(")");
+
+ if (qualifier) {
+ this.token(".");
+ this.print(qualifier, node);
+ }
+
+ if (typeParameters) {
+ this.print(typeParameters, node);
+ }
+}
+
+function TSImportEqualsDeclaration(node) {
+ const {
+ isExport,
+ id,
+ moduleReference
+ } = node;
+
+ if (isExport) {
+ this.word("export");
+ this.space();
+ }
+
+ this.word("import");
+ this.space();
+ this.print(id, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(moduleReference, node);
+ this.token(";");
+}
+
+function TSExternalModuleReference(node) {
+ this.token("require(");
+ this.print(node.expression, node);
+ this.token(")");
+}
+
+function TSNonNullExpression(node) {
+ this.print(node.expression, node);
+ this.token("!");
+}
+
+function TSExportAssignment(node) {
+ this.word("export");
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.expression, node);
+ this.token(";");
+}
+
+function TSNamespaceExportDeclaration(node) {
+ this.word("export");
+ this.space();
+ this.word("as");
+ this.space();
+ this.word("namespace");
+ this.space();
+ this.print(node.id, node);
+}
+
+function tsPrintSignatureDeclarationBase(node) {
+ const {
+ typeParameters,
+ parameters
+ } = node;
+ this.print(typeParameters, node);
+ this.token("(");
+
+ this._parameters(parameters, node);
+
+ this.token(")");
+ this.print(node.typeAnnotation, node);
+}
+
+function tsPrintClassMemberModifiers(node, isField) {
+ if (isField && node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (node.accessibility) {
+ this.word(node.accessibility);
+ this.space();
+ }
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ if (node.abstract) {
+ this.word("abstract");
+ this.space();
+ }
+
+ if (isField && node.readonly) {
+ this.word("readonly");
+ this.space();
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js
new file mode 100644
index 00000000000..115ab16a10a
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/index.js
@@ -0,0 +1,94 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+exports.CodeGenerator = void 0;
+
+var _sourceMap = _interopRequireDefault(require("./source-map"));
+
+var _printer = _interopRequireDefault(require("./printer"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class Generator extends _printer.default {
+ constructor(ast, opts = {}, code) {
+ const format = normalizeOptions(code, opts);
+ const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
+ super(format, map);
+ this.ast = void 0;
+ this.ast = ast;
+ }
+
+ generate() {
+ return super.generate(this.ast);
+ }
+
+}
+
+function normalizeOptions(code, opts) {
+ const format = {
+ auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
+ auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
+ shouldPrintComment: opts.shouldPrintComment,
+ retainLines: opts.retainLines,
+ retainFunctionParens: opts.retainFunctionParens,
+ comments: opts.comments == null || opts.comments,
+ compact: opts.compact,
+ minified: opts.minified,
+ concise: opts.concise,
+ jsonCompatibleStrings: opts.jsonCompatibleStrings,
+ indent: {
+ adjustMultilineComment: true,
+ style: " ",
+ base: 0
+ },
+ decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
+ jsescOption: Object.assign({
+ quotes: "double",
+ wrap: true
+ }, opts.jsescOption),
+ recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
+ };
+
+ if (format.minified) {
+ format.compact = true;
+
+ format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
+ } else {
+ format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
+ }
+
+ if (format.compact === "auto") {
+ format.compact = code.length > 500000;
+
+ if (format.compact) {
+ console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`);
+ }
+ }
+
+ if (format.compact) {
+ format.indent.adjustMultilineComment = false;
+ }
+
+ return format;
+}
+
+class CodeGenerator {
+ constructor(ast, opts, code) {
+ this._generator = new Generator(ast, opts, code);
+ }
+
+ generate() {
+ return this._generator.generate();
+ }
+
+}
+
+exports.CodeGenerator = CodeGenerator;
+
+function _default(ast, opts, code) {
+ const gen = new Generator(ast, opts, code);
+ return gen.generate();
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js
new file mode 100644
index 00000000000..1cbc55ecc3f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/index.js
@@ -0,0 +1,107 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.needsWhitespace = needsWhitespace;
+exports.needsWhitespaceBefore = needsWhitespaceBefore;
+exports.needsWhitespaceAfter = needsWhitespaceAfter;
+exports.needsParens = needsParens;
+
+var whitespace = _interopRequireWildcard(require("./whitespace"));
+
+var parens = _interopRequireWildcard(require("./parentheses"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function expandAliases(obj) {
+ const newObj = {};
+
+ function add(type, func) {
+ const fn = newObj[type];
+ newObj[type] = fn ? function (node, parent, stack) {
+ const result = fn(node, parent, stack);
+ return result == null ? func(node, parent, stack) : result;
+ } : func;
+ }
+
+ for (const type of Object.keys(obj)) {
+ const aliases = t.FLIPPED_ALIAS_KEYS[type];
+
+ if (aliases) {
+ for (const alias of aliases) {
+ add(alias, obj[type]);
+ }
+ } else {
+ add(type, obj[type]);
+ }
+ }
+
+ return newObj;
+}
+
+const expandedParens = expandAliases(parens);
+const expandedWhitespaceNodes = expandAliases(whitespace.nodes);
+const expandedWhitespaceList = expandAliases(whitespace.list);
+
+function find(obj, node, parent, printStack) {
+ const fn = obj[node.type];
+ return fn ? fn(node, parent, printStack) : null;
+}
+
+function isOrHasCallExpression(node) {
+ if (t.isCallExpression(node)) {
+ return true;
+ }
+
+ return t.isMemberExpression(node) && isOrHasCallExpression(node.object);
+}
+
+function needsWhitespace(node, parent, type) {
+ if (!node) return 0;
+
+ if (t.isExpressionStatement(node)) {
+ node = node.expression;
+ }
+
+ let linesInfo = find(expandedWhitespaceNodes, node, parent);
+
+ if (!linesInfo) {
+ const items = find(expandedWhitespaceList, node, parent);
+
+ if (items) {
+ for (let i = 0; i < items.length; i++) {
+ linesInfo = needsWhitespace(items[i], node, type);
+ if (linesInfo) break;
+ }
+ }
+ }
+
+ if (typeof linesInfo === "object" && linesInfo !== null) {
+ return linesInfo[type] || 0;
+ }
+
+ return 0;
+}
+
+function needsWhitespaceBefore(node, parent) {
+ return needsWhitespace(node, parent, "before");
+}
+
+function needsWhitespaceAfter(node, parent) {
+ return needsWhitespace(node, parent, "after");
+}
+
+function needsParens(node, parent, printStack) {
+ if (!parent) return false;
+
+ if (t.isNewExpression(parent) && parent.callee === node) {
+ if (isOrHasCallExpression(node)) return true;
+ }
+
+ return find(expandedParens, node, parent, printStack);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js
new file mode 100644
index 00000000000..9f848db204f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/parentheses.js
@@ -0,0 +1,253 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.NullableTypeAnnotation = NullableTypeAnnotation;
+exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
+exports.UpdateExpression = UpdateExpression;
+exports.ObjectExpression = ObjectExpression;
+exports.DoExpression = DoExpression;
+exports.Binary = Binary;
+exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
+exports.TSAsExpression = TSAsExpression;
+exports.TSTypeAssertion = TSTypeAssertion;
+exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
+exports.TSInferType = TSInferType;
+exports.BinaryExpression = BinaryExpression;
+exports.SequenceExpression = SequenceExpression;
+exports.AwaitExpression = exports.YieldExpression = YieldExpression;
+exports.ClassExpression = ClassExpression;
+exports.UnaryLike = UnaryLike;
+exports.FunctionExpression = FunctionExpression;
+exports.ArrowFunctionExpression = ArrowFunctionExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
+exports.AssignmentExpression = AssignmentExpression;
+exports.LogicalExpression = LogicalExpression;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const PRECEDENCE = {
+ "||": 0,
+ "??": 0,
+ "&&": 1,
+ "|": 2,
+ "^": 3,
+ "&": 4,
+ "==": 5,
+ "===": 5,
+ "!=": 5,
+ "!==": 5,
+ "<": 6,
+ ">": 6,
+ "<=": 6,
+ ">=": 6,
+ in: 6,
+ instanceof: 6,
+ ">>": 7,
+ "<<": 7,
+ ">>>": 7,
+ "+": 8,
+ "-": 8,
+ "*": 9,
+ "/": 9,
+ "%": 9,
+ "**": 10
+};
+
+const isClassExtendsClause = (node, parent) => (t.isClassDeclaration(parent) || t.isClassExpression(parent)) && parent.superClass === node;
+
+const hasPostfixPart = (node, parent) => (t.isMemberExpression(parent) || t.isOptionalMemberExpression(parent)) && parent.object === node || (t.isCallExpression(parent) || t.isOptionalCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isTaggedTemplateExpression(parent) && parent.tag === node || t.isTSNonNullExpression(parent);
+
+function NullableTypeAnnotation(node, parent) {
+ return t.isArrayTypeAnnotation(parent);
+}
+
+function FunctionTypeAnnotation(node, parent, printStack) {
+ return t.isUnionTypeAnnotation(parent) || t.isIntersectionTypeAnnotation(parent) || t.isArrayTypeAnnotation(parent) || t.isTypeAnnotation(parent) && t.isArrowFunctionExpression(printStack[printStack.length - 3]);
+}
+
+function UpdateExpression(node, parent) {
+ return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
+}
+
+function ObjectExpression(node, parent, printStack) {
+ return isFirstInStatement(printStack, {
+ considerArrow: true
+ });
+}
+
+function DoExpression(node, parent, printStack) {
+ return isFirstInStatement(printStack);
+}
+
+function Binary(node, parent) {
+ if (node.operator === "**" && t.isBinaryExpression(parent, {
+ operator: "**"
+ })) {
+ return parent.left === node;
+ }
+
+ if (isClassExtendsClause(node, parent)) {
+ return true;
+ }
+
+ if (hasPostfixPart(node, parent) || t.isUnaryLike(parent) || t.isAwaitExpression(parent)) {
+ return true;
+ }
+
+ if (t.isBinary(parent)) {
+ const parentOp = parent.operator;
+ const parentPos = PRECEDENCE[parentOp];
+ const nodeOp = node.operator;
+ const nodePos = PRECEDENCE[nodeOp];
+
+ if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) {
+ return true;
+ }
+ }
+}
+
+function UnionTypeAnnotation(node, parent) {
+ return t.isArrayTypeAnnotation(parent) || t.isNullableTypeAnnotation(parent) || t.isIntersectionTypeAnnotation(parent) || t.isUnionTypeAnnotation(parent);
+}
+
+function TSAsExpression() {
+ return true;
+}
+
+function TSTypeAssertion() {
+ return true;
+}
+
+function TSUnionType(node, parent) {
+ return t.isTSArrayType(parent) || t.isTSOptionalType(parent) || t.isTSIntersectionType(parent) || t.isTSUnionType(parent) || t.isTSRestType(parent);
+}
+
+function TSInferType(node, parent) {
+ return t.isTSArrayType(parent) || t.isTSOptionalType(parent);
+}
+
+function BinaryExpression(node, parent) {
+ return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent));
+}
+
+function SequenceExpression(node, parent) {
+ if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) {
+ return false;
+ }
+
+ return true;
+}
+
+function YieldExpression(node, parent) {
+ return t.isBinary(parent) || t.isUnaryLike(parent) || hasPostfixPart(node, parent) || t.isAwaitExpression(parent) && t.isYieldExpression(node) || t.isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
+}
+
+function ClassExpression(node, parent, printStack) {
+ return isFirstInStatement(printStack, {
+ considerDefaultExports: true
+ });
+}
+
+function UnaryLike(node, parent) {
+ return hasPostfixPart(node, parent) || t.isBinaryExpression(parent, {
+ operator: "**",
+ left: node
+ }) || isClassExtendsClause(node, parent);
+}
+
+function FunctionExpression(node, parent, printStack) {
+ return isFirstInStatement(printStack, {
+ considerDefaultExports: true
+ });
+}
+
+function ArrowFunctionExpression(node, parent) {
+ return t.isExportDeclaration(parent) || ConditionalExpression(node, parent);
+}
+
+function ConditionalExpression(node, parent) {
+ if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, {
+ test: node
+ }) || t.isAwaitExpression(parent) || t.isTSTypeAssertion(parent) || t.isTSAsExpression(parent)) {
+ return true;
+ }
+
+ return UnaryLike(node, parent);
+}
+
+function OptionalMemberExpression(node, parent) {
+ return t.isCallExpression(parent, {
+ callee: node
+ }) || t.isMemberExpression(parent, {
+ object: node
+ });
+}
+
+function AssignmentExpression(node, parent, printStack) {
+ if (t.isObjectPattern(node.left)) {
+ return true;
+ } else {
+ return ConditionalExpression(node, parent, printStack);
+ }
+}
+
+function LogicalExpression(node, parent) {
+ switch (node.operator) {
+ case "||":
+ if (!t.isLogicalExpression(parent)) return false;
+ return parent.operator === "??" || parent.operator === "&&";
+
+ case "&&":
+ return t.isLogicalExpression(parent, {
+ operator: "??"
+ });
+
+ case "??":
+ return t.isLogicalExpression(parent) && parent.operator !== "??";
+ }
+}
+
+function isFirstInStatement(printStack, {
+ considerArrow = false,
+ considerDefaultExports = false
+} = {}) {
+ let i = printStack.length - 1;
+ let node = printStack[i];
+ i--;
+ let parent = printStack[i];
+
+ while (i >= 0) {
+ if (t.isExpressionStatement(parent, {
+ expression: node
+ }) || considerDefaultExports && t.isExportDefaultDeclaration(parent, {
+ declaration: node
+ }) || considerArrow && t.isArrowFunctionExpression(parent, {
+ body: node
+ })) {
+ return true;
+ }
+
+ if (hasPostfixPart(node, parent) && !t.isNewExpression(parent) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isConditional(parent, {
+ test: node
+ }) || t.isBinary(parent, {
+ left: node
+ }) || t.isAssignmentExpression(parent, {
+ left: node
+ })) {
+ node = parent;
+ i--;
+ parent = printStack[i];
+ } else {
+ return false;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js
new file mode 100644
index 00000000000..92efe538a76
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/node/whitespace.js
@@ -0,0 +1,201 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.list = exports.nodes = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function crawl(node, state = {}) {
+ if (t.isMemberExpression(node) || t.isOptionalMemberExpression(node)) {
+ crawl(node.object, state);
+ if (node.computed) crawl(node.property, state);
+ } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
+ crawl(node.left, state);
+ crawl(node.right, state);
+ } else if (t.isCallExpression(node) || t.isOptionalCallExpression(node)) {
+ state.hasCall = true;
+ crawl(node.callee, state);
+ } else if (t.isFunction(node)) {
+ state.hasFunction = true;
+ } else if (t.isIdentifier(node)) {
+ state.hasHelper = state.hasHelper || isHelper(node.callee);
+ }
+
+ return state;
+}
+
+function isHelper(node) {
+ if (t.isMemberExpression(node)) {
+ return isHelper(node.object) || isHelper(node.property);
+ } else if (t.isIdentifier(node)) {
+ return node.name === "require" || node.name[0] === "_";
+ } else if (t.isCallExpression(node)) {
+ return isHelper(node.callee);
+ } else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
+ return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
+ } else {
+ return false;
+ }
+}
+
+function isType(node) {
+ return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node);
+}
+
+const nodes = {
+ AssignmentExpression(node) {
+ const state = crawl(node.right);
+
+ if (state.hasCall && state.hasHelper || state.hasFunction) {
+ return {
+ before: state.hasFunction,
+ after: true
+ };
+ }
+ },
+
+ SwitchCase(node, parent) {
+ return {
+ before: node.consequent.length || parent.cases[0] === node,
+ after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
+ };
+ },
+
+ LogicalExpression(node) {
+ if (t.isFunction(node.left) || t.isFunction(node.right)) {
+ return {
+ after: true
+ };
+ }
+ },
+
+ Literal(node) {
+ if (node.value === "use strict") {
+ return {
+ after: true
+ };
+ }
+ },
+
+ CallExpression(node) {
+ if (t.isFunction(node.callee) || isHelper(node)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ },
+
+ OptionalCallExpression(node) {
+ if (t.isFunction(node.callee)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ },
+
+ VariableDeclaration(node) {
+ for (let i = 0; i < node.declarations.length; i++) {
+ const declar = node.declarations[i];
+ let enabled = isHelper(declar.id) && !isType(declar.init);
+
+ if (!enabled) {
+ const state = crawl(declar.init);
+ enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
+ }
+
+ if (enabled) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ }
+ },
+
+ IfStatement(node) {
+ if (t.isBlockStatement(node.consequent)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ }
+
+};
+exports.nodes = nodes;
+
+nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
+ if (parent.properties[0] === node) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeCallProperty = function (node, parent) {
+ var _parent$properties;
+
+ if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) == null ? void 0 : _parent$properties.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeIndexer = function (node, parent) {
+ var _parent$properties2, _parent$callPropertie;
+
+ if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) == null ? void 0 : _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) == null ? void 0 : _parent$callPropertie.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeInternalSlot = function (node, parent) {
+ var _parent$properties3, _parent$callPropertie2, _parent$indexers;
+
+ if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) == null ? void 0 : _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) == null ? void 0 : _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) == null ? void 0 : _parent$indexers.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+const list = {
+ VariableDeclaration(node) {
+ return node.declarations.map(decl => decl.init);
+ },
+
+ ArrayExpression(node) {
+ return node.elements;
+ },
+
+ ObjectExpression(node) {
+ return node.properties;
+ }
+
+};
+exports.list = list;
+[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) {
+ if (typeof amounts === "boolean") {
+ amounts = {
+ after: amounts,
+ before: amounts
+ };
+ }
+
+ [type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
+ nodes[type] = function () {
+ return amounts;
+ };
+ });
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js
new file mode 100644
index 00000000000..65ccd2327d4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/printer.js
@@ -0,0 +1,513 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _buffer = _interopRequireDefault(require("./buffer"));
+
+var n = _interopRequireWildcard(require("./node"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var generatorFunctions = _interopRequireWildcard(require("./generators"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const SCIENTIFIC_NOTATION = /e/i;
+const ZERO_DECIMAL_INTEGER = /\.0+$/;
+const NON_DECIMAL_LITERAL = /^0[box]/;
+const PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
+
+class Printer {
+ constructor(format, map) {
+ this.inForStatementInitCounter = 0;
+ this._printStack = [];
+ this._indent = 0;
+ this._insideAux = false;
+ this._printedCommentStarts = {};
+ this._parenPushNewlineState = null;
+ this._noLineTerminator = false;
+ this._printAuxAfterOnNextUserNode = false;
+ this._printedComments = new WeakSet();
+ this._endsWithInteger = false;
+ this._endsWithWord = false;
+ this.format = format || {};
+ this._buf = new _buffer.default(map);
+ }
+
+ generate(ast) {
+ this.print(ast);
+
+ this._maybeAddAuxComment();
+
+ return this._buf.get();
+ }
+
+ indent() {
+ if (this.format.compact || this.format.concise) return;
+ this._indent++;
+ }
+
+ dedent() {
+ if (this.format.compact || this.format.concise) return;
+ this._indent--;
+ }
+
+ semicolon(force = false) {
+ this._maybeAddAuxComment();
+
+ this._append(";", !force);
+ }
+
+ rightBrace() {
+ if (this.format.minified) {
+ this._buf.removeLastSemicolon();
+ }
+
+ this.token("}");
+ }
+
+ space(force = false) {
+ if (this.format.compact) return;
+
+ if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
+ this._space();
+ }
+ }
+
+ word(str) {
+ if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
+ this._space();
+ }
+
+ this._maybeAddAuxComment();
+
+ this._append(str);
+
+ this._endsWithWord = true;
+ }
+
+ number(str) {
+ this.word(str);
+ this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
+ }
+
+ token(str) {
+ if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
+ this._space();
+ }
+
+ this._maybeAddAuxComment();
+
+ this._append(str);
+ }
+
+ newline(i) {
+ if (this.format.retainLines || this.format.compact) return;
+
+ if (this.format.concise) {
+ this.space();
+ return;
+ }
+
+ if (this.endsWith("\n\n")) return;
+ if (typeof i !== "number") i = 1;
+ i = Math.min(2, i);
+ if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
+ if (i <= 0) return;
+
+ for (let j = 0; j < i; j++) {
+ this._newline();
+ }
+ }
+
+ endsWith(str) {
+ return this._buf.endsWith(str);
+ }
+
+ removeTrailingNewline() {
+ this._buf.removeTrailingNewline();
+ }
+
+ exactSource(loc, cb) {
+ this._catchUp("start", loc);
+
+ this._buf.exactSource(loc, cb);
+ }
+
+ source(prop, loc) {
+ this._catchUp(prop, loc);
+
+ this._buf.source(prop, loc);
+ }
+
+ withSource(prop, loc, cb) {
+ this._catchUp(prop, loc);
+
+ this._buf.withSource(prop, loc, cb);
+ }
+
+ _space() {
+ this._append(" ", true);
+ }
+
+ _newline() {
+ this._append("\n", true);
+ }
+
+ _append(str, queue = false) {
+ this._maybeAddParen(str);
+
+ this._maybeIndent(str);
+
+ if (queue) this._buf.queue(str);else this._buf.append(str);
+ this._endsWithWord = false;
+ this._endsWithInteger = false;
+ }
+
+ _maybeIndent(str) {
+ if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
+ this._buf.queue(this._getIndent());
+ }
+ }
+
+ _maybeAddParen(str) {
+ const parenPushNewlineState = this._parenPushNewlineState;
+ if (!parenPushNewlineState) return;
+ let i;
+
+ for (i = 0; i < str.length && str[i] === " "; i++) continue;
+
+ if (i === str.length) {
+ return;
+ }
+
+ const cha = str[i];
+
+ if (cha !== "\n") {
+ if (cha !== "/" || i + 1 === str.length) {
+ this._parenPushNewlineState = null;
+ return;
+ }
+
+ const chaPost = str[i + 1];
+
+ if (chaPost === "*") {
+ if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
+ return;
+ }
+ } else if (chaPost !== "/") {
+ this._parenPushNewlineState = null;
+ return;
+ }
+ }
+
+ this.token("(");
+ this.indent();
+ parenPushNewlineState.printed = true;
+ }
+
+ _catchUp(prop, loc) {
+ if (!this.format.retainLines) return;
+ const pos = loc ? loc[prop] : null;
+
+ if ((pos == null ? void 0 : pos.line) != null) {
+ const count = pos.line - this._buf.getCurrentLine();
+
+ for (let i = 0; i < count; i++) {
+ this._newline();
+ }
+ }
+ }
+
+ _getIndent() {
+ return this.format.indent.style.repeat(this._indent);
+ }
+
+ startTerminatorless(isLabel = false) {
+ if (isLabel) {
+ this._noLineTerminator = true;
+ return null;
+ } else {
+ return this._parenPushNewlineState = {
+ printed: false
+ };
+ }
+ }
+
+ endTerminatorless(state) {
+ this._noLineTerminator = false;
+
+ if (state == null ? void 0 : state.printed) {
+ this.dedent();
+ this.newline();
+ this.token(")");
+ }
+ }
+
+ print(node, parent) {
+ if (!node) return;
+ const oldConcise = this.format.concise;
+
+ if (node._compact) {
+ this.format.concise = true;
+ }
+
+ const printMethod = this[node.type];
+
+ if (!printMethod) {
+ throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
+ }
+
+ this._printStack.push(node);
+
+ const oldInAux = this._insideAux;
+ this._insideAux = !node.loc;
+
+ this._maybeAddAuxComment(this._insideAux && !oldInAux);
+
+ let needsParens = n.needsParens(node, parent, this._printStack);
+
+ if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
+ needsParens = true;
+ }
+
+ if (needsParens) this.token("(");
+
+ this._printLeadingComments(node);
+
+ const loc = t.isProgram(node) || t.isFile(node) ? null : node.loc;
+ this.withSource("start", loc, () => {
+ printMethod.call(this, node, parent);
+ });
+
+ this._printTrailingComments(node);
+
+ if (needsParens) this.token(")");
+
+ this._printStack.pop();
+
+ this.format.concise = oldConcise;
+ this._insideAux = oldInAux;
+ }
+
+ _maybeAddAuxComment(enteredPositionlessNode) {
+ if (enteredPositionlessNode) this._printAuxBeforeComment();
+ if (!this._insideAux) this._printAuxAfterComment();
+ }
+
+ _printAuxBeforeComment() {
+ if (this._printAuxAfterOnNextUserNode) return;
+ this._printAuxAfterOnNextUserNode = true;
+ const comment = this.format.auxiliaryCommentBefore;
+
+ if (comment) {
+ this._printComment({
+ type: "CommentBlock",
+ value: comment
+ });
+ }
+ }
+
+ _printAuxAfterComment() {
+ if (!this._printAuxAfterOnNextUserNode) return;
+ this._printAuxAfterOnNextUserNode = false;
+ const comment = this.format.auxiliaryCommentAfter;
+
+ if (comment) {
+ this._printComment({
+ type: "CommentBlock",
+ value: comment
+ });
+ }
+ }
+
+ getPossibleRaw(node) {
+ const extra = node.extra;
+
+ if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
+ return extra.raw;
+ }
+ }
+
+ printJoin(nodes, parent, opts = {}) {
+ if (!(nodes == null ? void 0 : nodes.length)) return;
+ if (opts.indent) this.indent();
+ const newlineOpts = {
+ addNewlines: opts.addNewlines
+ };
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (!node) continue;
+ if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
+ this.print(node, parent);
+
+ if (opts.iterator) {
+ opts.iterator(node, i);
+ }
+
+ if (opts.separator && i < nodes.length - 1) {
+ opts.separator.call(this);
+ }
+
+ if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
+ }
+
+ if (opts.indent) this.dedent();
+ }
+
+ printAndIndentOnComments(node, parent) {
+ const indent = node.leadingComments && node.leadingComments.length > 0;
+ if (indent) this.indent();
+ this.print(node, parent);
+ if (indent) this.dedent();
+ }
+
+ printBlock(parent) {
+ const node = parent.body;
+
+ if (!t.isEmptyStatement(node)) {
+ this.space();
+ }
+
+ this.print(node, parent);
+ }
+
+ _printTrailingComments(node) {
+ this._printComments(this._getComments(false, node));
+ }
+
+ _printLeadingComments(node) {
+ this._printComments(this._getComments(true, node), true);
+ }
+
+ printInnerComments(node, indent = true) {
+ var _node$innerComments;
+
+ if (!((_node$innerComments = node.innerComments) == null ? void 0 : _node$innerComments.length)) return;
+ if (indent) this.indent();
+
+ this._printComments(node.innerComments);
+
+ if (indent) this.dedent();
+ }
+
+ printSequence(nodes, parent, opts = {}) {
+ opts.statement = true;
+ return this.printJoin(nodes, parent, opts);
+ }
+
+ printList(items, parent, opts = {}) {
+ if (opts.separator == null) {
+ opts.separator = commaSeparator;
+ }
+
+ return this.printJoin(items, parent, opts);
+ }
+
+ _printNewline(leading, node, parent, opts) {
+ if (this.format.retainLines || this.format.compact) return;
+
+ if (this.format.concise) {
+ this.space();
+ return;
+ }
+
+ let lines = 0;
+
+ if (this._buf.hasContent()) {
+ if (!leading) lines++;
+ if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
+ const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
+ if (needs(node, parent)) lines++;
+ }
+
+ this.newline(lines);
+ }
+
+ _getComments(leading, node) {
+ return node && (leading ? node.leadingComments : node.trailingComments) || [];
+ }
+
+ _printComment(comment, skipNewLines) {
+ if (!this.format.shouldPrintComment(comment.value)) return;
+ if (comment.ignore) return;
+ if (this._printedComments.has(comment)) return;
+
+ this._printedComments.add(comment);
+
+ if (comment.start != null) {
+ if (this._printedCommentStarts[comment.start]) return;
+ this._printedCommentStarts[comment.start] = true;
+ }
+
+ const isBlockComment = comment.type === "CommentBlock";
+ const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
+ if (printNewLines && this._buf.hasContent()) this.newline(1);
+ if (!this.endsWith("[") && !this.endsWith("{")) this.space();
+ let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`;
+
+ if (isBlockComment && this.format.indent.adjustMultilineComment) {
+ var _comment$loc;
+
+ const offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column;
+
+ if (offset) {
+ const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
+ val = val.replace(newlineRegex, "\n");
+ }
+
+ const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
+ val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`);
+ }
+
+ if (this.endsWith("/")) this._space();
+ this.withSource("start", comment.loc, () => {
+ this._append(val);
+ });
+ if (printNewLines) this.newline(1);
+ }
+
+ _printComments(comments, inlinePureAnnotation) {
+ if (!(comments == null ? void 0 : comments.length)) return;
+
+ if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
+ this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
+ } else {
+ for (const comment of comments) {
+ this._printComment(comment);
+ }
+ }
+ }
+
+ printAssertions(node) {
+ var _node$assertions;
+
+ if ((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) {
+ this.space();
+ this.word("assert");
+ this.space();
+ this.token("{");
+ this.space();
+ this.printList(node.assertions, node);
+ this.space();
+ this.token("}");
+ }
+ }
+
+}
+
+exports.default = Printer;
+Object.assign(Printer.prototype, generatorFunctions);
+
+function commaSeparator() {
+ this.token(",");
+ this.space();
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js
new file mode 100644
index 00000000000..7a0a240b0e4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/lib/source-map.js
@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _sourceMap = _interopRequireDefault(require("source-map"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class SourceMap {
+ constructor(opts, code) {
+ this._cachedMap = null;
+ this._code = code;
+ this._opts = opts;
+ this._rawMappings = [];
+ }
+
+ get() {
+ if (!this._cachedMap) {
+ const map = this._cachedMap = new _sourceMap.default.SourceMapGenerator({
+ sourceRoot: this._opts.sourceRoot
+ });
+ const code = this._code;
+
+ if (typeof code === "string") {
+ map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code);
+ } else if (typeof code === "object") {
+ Object.keys(code).forEach(sourceFileName => {
+ map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
+ });
+ }
+
+ this._rawMappings.forEach(mapping => map.addMapping(mapping), map);
+ }
+
+ return this._cachedMap.toJSON();
+ }
+
+ getRawMappings() {
+ return this._rawMappings.slice();
+ }
+
+ mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
+ if (this._lastGenLine !== generatedLine && line === null) return;
+
+ if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
+ return;
+ }
+
+ this._cachedMap = null;
+ this._lastGenLine = generatedLine;
+ this._lastSourceLine = line;
+ this._lastSourceColumn = column;
+
+ this._rawMappings.push({
+ name: identifierName || undefined,
+ generated: {
+ line: generatedLine,
+ column: generatedColumn
+ },
+ source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
+ original: line == null ? undefined : {
+ line: line,
+ column: column
+ }
+ });
+ }
+
+}
+
+exports.default = SourceMap; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/generator/package.json b/tools/node_modules/@babel/core/node_modules/@babel/generator/package.json
new file mode 100644
index 00000000000..b76c14e2910
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/generator/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/generator",
+ "version": "7.12.5",
+ "description": "Turns an AST into code.",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-generator"
+ },
+ "main": "lib/index.js",
+ "files": [
+ "lib"
+ ],
+ "dependencies": {
+ "@babel/types": "^7.12.5",
+ "jsesc": "^2.5.1",
+ "source-map": "^0.5.0"
+ },
+ "devDependencies": {
+ "@babel/helper-fixtures": "7.10.5",
+ "@babel/parser": "7.12.5"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md
index a8a6809ace3..a8a6809ace3 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/README.md
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js
new file mode 100644
index 00000000000..00e1b5573ab
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/lib/index.js
@@ -0,0 +1,178 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var _helperGetFunctionArity = _interopRequireDefault(require("@babel/helper-get-function-arity"));
+
+var _template = _interopRequireDefault(require("@babel/template"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
+ (function (FUNCTION_KEY) {
+ function FUNCTION_ID() {
+ return FUNCTION_KEY.apply(this, arguments);
+ }
+
+ FUNCTION_ID.toString = function () {
+ return FUNCTION_KEY.toString();
+ }
+
+ return FUNCTION_ID;
+ })(FUNCTION)
+`);
+const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
+ (function (FUNCTION_KEY) {
+ function* FUNCTION_ID() {
+ return yield* FUNCTION_KEY.apply(this, arguments);
+ }
+
+ FUNCTION_ID.toString = function () {
+ return FUNCTION_KEY.toString();
+ };
+
+ return FUNCTION_ID;
+ })(FUNCTION)
+`);
+const visitor = {
+ "ReferencedIdentifier|BindingIdentifier"(path, state) {
+ if (path.node.name !== state.name) return;
+ const localDeclar = path.scope.getBindingIdentifier(state.name);
+ if (localDeclar !== state.outerDeclar) return;
+ state.selfReference = true;
+ path.stop();
+ }
+
+};
+
+function getNameFromLiteralId(id) {
+ if (t.isNullLiteral(id)) {
+ return "null";
+ }
+
+ if (t.isRegExpLiteral(id)) {
+ return `_${id.pattern}_${id.flags}`;
+ }
+
+ if (t.isTemplateLiteral(id)) {
+ return id.quasis.map(quasi => quasi.value.raw).join("");
+ }
+
+ if (id.value !== undefined) {
+ return id.value + "";
+ }
+
+ return "";
+}
+
+function wrap(state, method, id, scope) {
+ if (state.selfReference) {
+ if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
+ scope.rename(id.name);
+ } else {
+ if (!t.isFunction(method)) return;
+ let build = buildPropertyMethodAssignmentWrapper;
+
+ if (method.generator) {
+ build = buildGeneratorPropertyMethodAssignmentWrapper;
+ }
+
+ const template = build({
+ FUNCTION: method,
+ FUNCTION_ID: id,
+ FUNCTION_KEY: scope.generateUidIdentifier(id.name)
+ }).expression;
+ const params = template.callee.body.body[0].params;
+
+ for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
+ params.push(scope.generateUidIdentifier("x"));
+ }
+
+ return template;
+ }
+ }
+
+ method.id = id;
+ scope.getProgramParent().references[id.name] = true;
+}
+
+function visit(node, name, scope) {
+ const state = {
+ selfAssignment: false,
+ selfReference: false,
+ outerDeclar: scope.getBindingIdentifier(name),
+ references: [],
+ name: name
+ };
+ const binding = scope.getOwnBinding(name);
+
+ if (binding) {
+ if (binding.kind === "param") {
+ state.selfReference = true;
+ } else {}
+ } else if (state.outerDeclar || scope.hasGlobal(name)) {
+ scope.traverse(node, visitor, state);
+ }
+
+ return state;
+}
+
+function _default({
+ node,
+ parent,
+ scope,
+ id
+}, localBinding = false) {
+ if (node.id) return;
+
+ if ((t.isObjectProperty(parent) || t.isObjectMethod(parent, {
+ kind: "method"
+ })) && (!parent.computed || t.isLiteral(parent.key))) {
+ id = parent.key;
+ } else if (t.isVariableDeclarator(parent)) {
+ id = parent.id;
+
+ if (t.isIdentifier(id) && !localBinding) {
+ const binding = scope.parent.getBinding(id.name);
+
+ if (binding && binding.constant && scope.getBinding(id.name) === binding) {
+ node.id = t.cloneNode(id);
+ node.id[t.NOT_LOCAL_BINDING] = true;
+ return;
+ }
+ }
+ } else if (t.isAssignmentExpression(parent, {
+ operator: "="
+ })) {
+ id = parent.left;
+ } else if (!id) {
+ return;
+ }
+
+ let name;
+
+ if (id && t.isLiteral(id)) {
+ name = getNameFromLiteralId(id);
+ } else if (id && t.isIdentifier(id)) {
+ name = id.name;
+ }
+
+ if (name === undefined) {
+ return;
+ }
+
+ name = t.toBindingIdentifierName(name);
+ id = t.identifier(name);
+ id[t.NOT_LOCAL_BINDING] = true;
+ const state = visit(node, name, scope);
+ return wrap(state, node, id, scope) || node;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json
new file mode 100644
index 00000000000..98c7f62ce19
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-function-name/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "@babel/helper-function-name",
+ "version": "7.10.4",
+ "description": "Helper function to change the property 'name' of every function",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-function-name"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/helper-get-function-arity": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md
index 1de8084fb13..1de8084fb13 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/README.md
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js
new file mode 100644
index 00000000000..46e71dce2bf
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/lib/index.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _default(node) {
+ const params = node.params;
+
+ for (let i = 0; i < params.length; i++) {
+ const param = params[i];
+
+ if (t.isAssignmentPattern(param) || t.isRestElement(param)) {
+ return i;
+ }
+ }
+
+ return params.length;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json
new file mode 100644
index 00000000000..6b53c0b74b3
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-get-function-arity/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "@babel/helper-get-function-arity",
+ "version": "7.10.4",
+ "description": "Helper function to get function arity",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-get-function-arity"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.10.4"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/README.md
new file mode 100644
index 00000000000..01c551d6a96
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-member-expression-to-functions
+
+> Helper function to replace certain member expressions with function calls
+
+See our website [@babel/helper-member-expression-to-functions](https://babeljs.io/docs/en/babel-helper-member-expression-to-functions) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-member-expression-to-functions
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-member-expression-to-functions --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/lib/index.js
new file mode 100644
index 00000000000..827d7a2d2cd
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/lib/index.js
@@ -0,0 +1,386 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var t = require('@babel/types');
+
+function willPathCastToBoolean(path) {
+ const maybeWrapped = path;
+ const {
+ node,
+ parentPath
+ } = maybeWrapped;
+
+ if (parentPath.isLogicalExpression()) {
+ const {
+ operator,
+ right
+ } = parentPath.node;
+
+ if (operator === "&&" || operator === "||" || operator === "??" && node === right) {
+ return willPathCastToBoolean(parentPath);
+ }
+ }
+
+ if (parentPath.isSequenceExpression()) {
+ const {
+ expressions
+ } = parentPath.node;
+
+ if (expressions[expressions.length - 1] === node) {
+ return willPathCastToBoolean(parentPath);
+ } else {
+ return true;
+ }
+ }
+
+ return parentPath.isConditional({
+ test: node
+ }) || parentPath.isUnaryExpression({
+ operator: "!"
+ }) || parentPath.isLoop({
+ test: node
+ });
+}
+
+class AssignmentMemoiser {
+ constructor() {
+ this._map = new WeakMap();
+ }
+
+ has(key) {
+ return this._map.has(key);
+ }
+
+ get(key) {
+ if (!this.has(key)) return;
+
+ const record = this._map.get(key);
+
+ const {
+ value
+ } = record;
+ record.count--;
+
+ if (record.count === 0) {
+ return t.assignmentExpression("=", value, key);
+ }
+
+ return value;
+ }
+
+ set(key, value, count) {
+ return this._map.set(key, {
+ count,
+ value
+ });
+ }
+
+}
+
+function toNonOptional(path, base) {
+ const {
+ node
+ } = path;
+
+ if (path.isOptionalMemberExpression()) {
+ return t.memberExpression(base, node.property, node.computed);
+ }
+
+ if (path.isOptionalCallExpression()) {
+ const callee = path.get("callee");
+
+ if (path.node.optional && callee.isOptionalMemberExpression()) {
+ const {
+ object
+ } = callee.node;
+ const context = path.scope.maybeGenerateMemoised(object) || object;
+ callee.get("object").replaceWith(t.assignmentExpression("=", context, object));
+ return t.callExpression(t.memberExpression(base, t.identifier("call")), [context, ...node.arguments]);
+ }
+
+ return t.callExpression(base, node.arguments);
+ }
+
+ return path.node;
+}
+
+function isInDetachedTree(path) {
+ while (path) {
+ if (path.isProgram()) break;
+ const {
+ parentPath,
+ container,
+ listKey
+ } = path;
+ const parentNode = parentPath.node;
+
+ if (listKey) {
+ if (container !== parentNode[listKey]) return true;
+ } else {
+ if (container !== parentNode) return true;
+ }
+
+ path = parentPath;
+ }
+
+ return false;
+}
+
+const handle = {
+ memoise() {},
+
+ handle(member) {
+ const {
+ node,
+ parent,
+ parentPath,
+ scope
+ } = member;
+
+ if (member.isOptionalMemberExpression()) {
+ if (isInDetachedTree(member)) return;
+ const endPath = member.find(({
+ node,
+ parent,
+ parentPath
+ }) => {
+ if (parentPath.isOptionalMemberExpression()) {
+ return parent.optional || parent.object !== node;
+ }
+
+ if (parentPath.isOptionalCallExpression()) {
+ return node !== member.node && parent.optional || parent.callee !== node;
+ }
+
+ return true;
+ });
+
+ if (scope.path.isPattern()) {
+ endPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], endPath.node), []));
+ return;
+ }
+
+ const willEndPathCastToBoolean = willPathCastToBoolean(endPath);
+ const rootParentPath = endPath.parentPath;
+
+ if (rootParentPath.isUpdateExpression({
+ argument: node
+ }) || rootParentPath.isAssignmentExpression({
+ left: node
+ })) {
+ throw member.buildCodeFrameError(`can't handle assignment`);
+ }
+
+ const isDeleteOperation = rootParentPath.isUnaryExpression({
+ operator: "delete"
+ });
+
+ if (isDeleteOperation && endPath.isOptionalMemberExpression() && endPath.get("property").isPrivateName()) {
+ throw member.buildCodeFrameError(`can't delete a private class element`);
+ }
+
+ let startingOptional = member;
+
+ for (;;) {
+ if (startingOptional.isOptionalMemberExpression()) {
+ if (startingOptional.node.optional) break;
+ startingOptional = startingOptional.get("object");
+ continue;
+ } else if (startingOptional.isOptionalCallExpression()) {
+ if (startingOptional.node.optional) break;
+ startingOptional = startingOptional.get("callee");
+ continue;
+ }
+
+ throw new Error(`Internal error: unexpected ${startingOptional.node.type}`);
+ }
+
+ const startingProp = startingOptional.isOptionalMemberExpression() ? "object" : "callee";
+ const startingNode = startingOptional.node[startingProp];
+ const baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);
+ const baseRef = baseNeedsMemoised != null ? baseNeedsMemoised : startingNode;
+ const parentIsOptionalCall = parentPath.isOptionalCallExpression({
+ callee: node
+ });
+ const parentIsCall = parentPath.isCallExpression({
+ callee: node
+ });
+ startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));
+
+ if (parentIsOptionalCall) {
+ if (parent.optional) {
+ parentPath.replaceWith(this.optionalCall(member, parent.arguments));
+ } else {
+ parentPath.replaceWith(this.call(member, parent.arguments));
+ }
+ } else if (parentIsCall) {
+ member.replaceWith(this.boundGet(member));
+ } else {
+ member.replaceWith(this.get(member));
+ }
+
+ let regular = member.node;
+
+ for (let current = member; current !== endPath;) {
+ const {
+ parentPath
+ } = current;
+
+ if (parentPath === endPath && parentIsOptionalCall && parent.optional) {
+ regular = parentPath.node;
+ break;
+ }
+
+ regular = toNonOptional(parentPath, regular);
+ current = parentPath;
+ }
+
+ let context;
+ const endParentPath = endPath.parentPath;
+
+ if (t.isMemberExpression(regular) && endParentPath.isOptionalCallExpression({
+ callee: endPath.node,
+ optional: true
+ })) {
+ const {
+ object
+ } = regular;
+ context = member.scope.maybeGenerateMemoised(object);
+
+ if (context) {
+ regular.object = t.assignmentExpression("=", context, object);
+ }
+ }
+
+ let replacementPath = endPath;
+
+ if (isDeleteOperation) {
+ replacementPath = endParentPath;
+ regular = endParentPath.node;
+ }
+
+ if (willEndPathCastToBoolean) {
+ const nonNullishCheck = t.logicalExpression("&&", t.binaryExpression("!==", baseNeedsMemoised ? t.assignmentExpression("=", t.cloneNode(baseRef), t.cloneNode(startingNode)) : t.cloneNode(baseRef), t.nullLiteral()), t.binaryExpression("!==", t.cloneNode(baseRef), scope.buildUndefinedNode()));
+ replacementPath.replaceWith(t.logicalExpression("&&", nonNullishCheck, regular));
+ } else {
+ const nullishCheck = t.logicalExpression("||", t.binaryExpression("===", baseNeedsMemoised ? t.assignmentExpression("=", t.cloneNode(baseRef), t.cloneNode(startingNode)) : t.cloneNode(baseRef), t.nullLiteral()), t.binaryExpression("===", t.cloneNode(baseRef), scope.buildUndefinedNode()));
+ replacementPath.replaceWith(t.conditionalExpression(nullishCheck, isDeleteOperation ? t.booleanLiteral(true) : scope.buildUndefinedNode(), regular));
+ }
+
+ if (context) {
+ const endParent = endParentPath.node;
+ endParentPath.replaceWith(t.optionalCallExpression(t.optionalMemberExpression(endParent.callee, t.identifier("call"), false, true), [t.cloneNode(context), ...endParent.arguments], false));
+ }
+
+ return;
+ }
+
+ if (parentPath.isUpdateExpression({
+ argument: node
+ })) {
+ if (this.simpleSet) {
+ member.replaceWith(this.simpleSet(member));
+ return;
+ }
+
+ const {
+ operator,
+ prefix
+ } = parent;
+ this.memoise(member, 2);
+ const value = t.binaryExpression(operator[0], t.unaryExpression("+", this.get(member)), t.numericLiteral(1));
+
+ if (prefix) {
+ parentPath.replaceWith(this.set(member, value));
+ } else {
+ const {
+ scope
+ } = member;
+ const ref = scope.generateUidIdentifierBasedOnNode(node);
+ scope.push({
+ id: ref
+ });
+ value.left = t.assignmentExpression("=", t.cloneNode(ref), value.left);
+ parentPath.replaceWith(t.sequenceExpression([this.set(member, value), t.cloneNode(ref)]));
+ }
+
+ return;
+ }
+
+ if (parentPath.isAssignmentExpression({
+ left: node
+ })) {
+ if (this.simpleSet) {
+ member.replaceWith(this.simpleSet(member));
+ return;
+ }
+
+ const {
+ operator,
+ right: value
+ } = parent;
+
+ if (operator === "=") {
+ parentPath.replaceWith(this.set(member, value));
+ } else {
+ const operatorTrunc = operator.slice(0, -1);
+
+ if (t.LOGICAL_OPERATORS.includes(operatorTrunc)) {
+ this.memoise(member, 1);
+ parentPath.replaceWith(t.logicalExpression(operatorTrunc, this.get(member), this.set(member, value)));
+ } else {
+ this.memoise(member, 2);
+ parentPath.replaceWith(this.set(member, t.binaryExpression(operatorTrunc, this.get(member), value)));
+ }
+ }
+
+ return;
+ }
+
+ if (parentPath.isCallExpression({
+ callee: node
+ })) {
+ parentPath.replaceWith(this.call(member, parent.arguments));
+ return;
+ }
+
+ if (parentPath.isOptionalCallExpression({
+ callee: node
+ })) {
+ if (scope.path.isPattern()) {
+ parentPath.replaceWith(t.callExpression(t.arrowFunctionExpression([], parentPath.node), []));
+ return;
+ }
+
+ parentPath.replaceWith(this.optionalCall(member, parent.arguments));
+ return;
+ }
+
+ if (parentPath.isForXStatement({
+ left: node
+ }) || parentPath.isObjectProperty({
+ value: node
+ }) && parentPath.parentPath.isObjectPattern() || parentPath.isAssignmentPattern({
+ left: node
+ }) && parentPath.parentPath.isObjectProperty({
+ value: parent
+ }) && parentPath.parentPath.parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isAssignmentPattern({
+ left: node
+ }) && parentPath.parentPath.isArrayPattern() || parentPath.isRestElement()) {
+ member.replaceWith(this.destructureSet(member));
+ return;
+ }
+
+ member.replaceWith(this.get(member));
+ }
+
+};
+function memberExpressionToFunctions(path, visitor, state) {
+ path.traverse(visitor, Object.assign({}, handle, state, {
+ memoiser: new AssignmentMemoiser()
+ }));
+}
+
+exports.default = memberExpressionToFunctions;
+//# sourceMappingURL=index.js.map
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/package.json
new file mode 100644
index 00000000000..607d85d5dcb
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-member-expression-to-functions/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "@babel/helper-member-expression-to-functions",
+ "version": "7.12.7",
+ "description": "Helper function to replace certain member expressions with function calls",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-member-expression-to-functions"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "author": "Justin Ridgewell <justin@ridgewell.name>",
+ "dependencies": {
+ "@babel/types": "^7.12.7"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/LICENSE
index f31575ec773..f31575ec773 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/README.md
new file mode 100644
index 00000000000..dfc0bb88cf5
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-module-imports
+
+> Babel helper functions for inserting module loads
+
+See our website [@babel/helper-module-imports](https://babeljs.io/docs/en/babel-helper-module-imports) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-module-imports
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-module-imports --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-builder.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-builder.js
new file mode 100644
index 00000000000..4fed51ec96d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-builder.js
@@ -0,0 +1,139 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _assert = _interopRequireDefault(require("assert"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class ImportBuilder {
+ constructor(importedSource, scope, hub) {
+ this._statements = [];
+ this._resultName = null;
+ this._scope = null;
+ this._hub = null;
+ this._scope = scope;
+ this._hub = hub;
+ this._importedSource = importedSource;
+ }
+
+ done() {
+ return {
+ statements: this._statements,
+ resultName: this._resultName
+ };
+ }
+
+ import() {
+ this._statements.push(t.importDeclaration([], t.stringLiteral(this._importedSource)));
+
+ return this;
+ }
+
+ require() {
+ this._statements.push(t.expressionStatement(t.callExpression(t.identifier("require"), [t.stringLiteral(this._importedSource)])));
+
+ return this;
+ }
+
+ namespace(name = "namespace") {
+ name = this._scope.generateUidIdentifier(name);
+ const statement = this._statements[this._statements.length - 1];
+ (0, _assert.default)(statement.type === "ImportDeclaration");
+ (0, _assert.default)(statement.specifiers.length === 0);
+ statement.specifiers = [t.importNamespaceSpecifier(name)];
+ this._resultName = t.cloneNode(name);
+ return this;
+ }
+
+ default(name) {
+ name = this._scope.generateUidIdentifier(name);
+ const statement = this._statements[this._statements.length - 1];
+ (0, _assert.default)(statement.type === "ImportDeclaration");
+ (0, _assert.default)(statement.specifiers.length === 0);
+ statement.specifiers = [t.importDefaultSpecifier(name)];
+ this._resultName = t.cloneNode(name);
+ return this;
+ }
+
+ named(name, importName) {
+ if (importName === "default") return this.default(name);
+ name = this._scope.generateUidIdentifier(name);
+ const statement = this._statements[this._statements.length - 1];
+ (0, _assert.default)(statement.type === "ImportDeclaration");
+ (0, _assert.default)(statement.specifiers.length === 0);
+ statement.specifiers = [t.importSpecifier(name, t.identifier(importName))];
+ this._resultName = t.cloneNode(name);
+ return this;
+ }
+
+ var(name) {
+ name = this._scope.generateUidIdentifier(name);
+ let statement = this._statements[this._statements.length - 1];
+
+ if (statement.type !== "ExpressionStatement") {
+ (0, _assert.default)(this._resultName);
+ statement = t.expressionStatement(this._resultName);
+
+ this._statements.push(statement);
+ }
+
+ this._statements[this._statements.length - 1] = t.variableDeclaration("var", [t.variableDeclarator(name, statement.expression)]);
+ this._resultName = t.cloneNode(name);
+ return this;
+ }
+
+ defaultInterop() {
+ return this._interop(this._hub.addHelper("interopRequireDefault"));
+ }
+
+ wildcardInterop() {
+ return this._interop(this._hub.addHelper("interopRequireWildcard"));
+ }
+
+ _interop(callee) {
+ const statement = this._statements[this._statements.length - 1];
+
+ if (statement.type === "ExpressionStatement") {
+ statement.expression = t.callExpression(callee, [statement.expression]);
+ } else if (statement.type === "VariableDeclaration") {
+ (0, _assert.default)(statement.declarations.length === 1);
+ statement.declarations[0].init = t.callExpression(callee, [statement.declarations[0].init]);
+ } else {
+ _assert.default.fail("Unexpected type.");
+ }
+
+ return this;
+ }
+
+ prop(name) {
+ const statement = this._statements[this._statements.length - 1];
+
+ if (statement.type === "ExpressionStatement") {
+ statement.expression = t.memberExpression(statement.expression, t.identifier(name));
+ } else if (statement.type === "VariableDeclaration") {
+ (0, _assert.default)(statement.declarations.length === 1);
+ statement.declarations[0].init = t.memberExpression(statement.declarations[0].init, t.identifier(name));
+ } else {
+ _assert.default.fail("Unexpected type:" + statement.type);
+ }
+
+ return this;
+ }
+
+ read(name) {
+ this._resultName = t.memberExpression(this._resultName, t.identifier(name));
+ }
+
+}
+
+exports.default = ImportBuilder; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-injector.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-injector.js
new file mode 100644
index 00000000000..1e983caed62
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/import-injector.js
@@ -0,0 +1,271 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _assert = _interopRequireDefault(require("assert"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _importBuilder = _interopRequireDefault(require("./import-builder"));
+
+var _isModule = _interopRequireDefault(require("./is-module"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class ImportInjector {
+ constructor(path, importedSource, opts) {
+ this._defaultOpts = {
+ importedSource: null,
+ importedType: "commonjs",
+ importedInterop: "babel",
+ importingInterop: "babel",
+ ensureLiveReference: false,
+ ensureNoContext: false
+ };
+ const programPath = path.find(p => p.isProgram());
+ this._programPath = programPath;
+ this._programScope = programPath.scope;
+ this._hub = programPath.hub;
+ this._defaultOpts = this._applyDefaults(importedSource, opts, true);
+ }
+
+ addDefault(importedSourceIn, opts) {
+ return this.addNamed("default", importedSourceIn, opts);
+ }
+
+ addNamed(importName, importedSourceIn, opts) {
+ (0, _assert.default)(typeof importName === "string");
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
+ }
+
+ addNamespace(importedSourceIn, opts) {
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
+ }
+
+ addSideEffect(importedSourceIn, opts) {
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
+ }
+
+ _applyDefaults(importedSource, opts, isInit = false) {
+ const optsList = [];
+
+ if (typeof importedSource === "string") {
+ optsList.push({
+ importedSource
+ });
+ optsList.push(opts);
+ } else {
+ (0, _assert.default)(!opts, "Unexpected secondary arguments.");
+ optsList.push(importedSource);
+ }
+
+ const newOpts = Object.assign({}, this._defaultOpts);
+
+ for (const opts of optsList) {
+ if (!opts) continue;
+ Object.keys(newOpts).forEach(key => {
+ if (opts[key] !== undefined) newOpts[key] = opts[key];
+ });
+
+ if (!isInit) {
+ if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
+ if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
+ }
+ }
+
+ return newOpts;
+ }
+
+ _generateImport(opts, importName) {
+ const isDefault = importName === "default";
+ const isNamed = !!importName && !isDefault;
+ const isNamespace = importName === null;
+ const {
+ importedSource,
+ importedType,
+ importedInterop,
+ importingInterop,
+ ensureLiveReference,
+ ensureNoContext,
+ nameHint,
+ blockHoist
+ } = opts;
+ let name = nameHint || importName;
+ const isMod = (0, _isModule.default)(this._programPath);
+ const isModuleForNode = isMod && importingInterop === "node";
+ const isModuleForBabel = isMod && importingInterop === "babel";
+ const builder = new _importBuilder.default(importedSource, this._programScope, this._hub);
+
+ if (importedType === "es6") {
+ if (!isModuleForNode && !isModuleForBabel) {
+ throw new Error("Cannot import an ES6 module from CommonJS");
+ }
+
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(nameHint || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else if (importedType !== "commonjs") {
+ throw new Error(`Unexpected interopType "${importedType}"`);
+ } else if (importedInterop === "babel") {
+ if (isModuleForNode) {
+ name = name !== "default" ? name : importedSource;
+ const es6Default = `${importedSource}$es6Default`;
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(es6Default).var(name || importedSource).wildcardInterop();
+ } else if (isDefault) {
+ if (ensureLiveReference) {
+ builder.default(es6Default).var(name || importedSource).defaultInterop().read("default");
+ } else {
+ builder.default(es6Default).var(name).defaultInterop().prop(importName);
+ }
+ } else if (isNamed) {
+ builder.default(es6Default).read(importName);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource).wildcardInterop();
+ } else if ((isDefault || isNamed) && ensureLiveReference) {
+ if (isDefault) {
+ name = name !== "default" ? name : importedSource;
+ builder.var(name).read(importName);
+ builder.defaultInterop();
+ } else {
+ builder.var(importedSource).read(importName);
+ }
+ } else if (isDefault) {
+ builder.var(name).defaultInterop().prop(importName);
+ } else if (isNamed) {
+ builder.var(name).prop(importName);
+ }
+ }
+ } else if (importedInterop === "compiled") {
+ if (isModuleForNode) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.default(importedSource).read(name);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource);
+ } else if (isDefault || isNamed) {
+ if (ensureLiveReference) {
+ builder.var(importedSource).read(name);
+ } else {
+ builder.prop(importName).var(name);
+ }
+ }
+ }
+ } else if (importedInterop === "uncompiled") {
+ if (isDefault && ensureLiveReference) {
+ throw new Error("No live reference for commonjs default");
+ }
+
+ if (isModuleForNode) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault) {
+ builder.default(name);
+ } else if (isNamed) {
+ builder.default(importedSource).read(name);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault) {
+ builder.default(name);
+ } else if (isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource);
+ } else if (isDefault) {
+ builder.var(name);
+ } else if (isNamed) {
+ if (ensureLiveReference) {
+ builder.var(importedSource).read(name);
+ } else {
+ builder.var(name).prop(importName);
+ }
+ }
+ }
+ } else {
+ throw new Error(`Unknown importedInterop "${importedInterop}".`);
+ }
+
+ const {
+ statements,
+ resultName
+ } = builder.done();
+
+ this._insertStatements(statements, blockHoist);
+
+ if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
+ return t.sequenceExpression([t.numericLiteral(0), resultName]);
+ }
+
+ return resultName;
+ }
+
+ _insertStatements(statements, blockHoist = 3) {
+ statements.forEach(node => {
+ node._blockHoist = blockHoist;
+ });
+
+ const targetPath = this._programPath.get("body").find(p => {
+ const val = p.node._blockHoist;
+ return Number.isFinite(val) && val < 4;
+ });
+
+ if (targetPath) {
+ targetPath.insertBefore(statements);
+ } else {
+ this._programPath.unshiftContainer("body", statements);
+ }
+ }
+
+}
+
+exports.default = ImportInjector; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/index.js
new file mode 100644
index 00000000000..50e1e980853
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/index.js
@@ -0,0 +1,43 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.addDefault = addDefault;
+exports.addNamed = addNamed;
+exports.addNamespace = addNamespace;
+exports.addSideEffect = addSideEffect;
+Object.defineProperty(exports, "ImportInjector", {
+ enumerable: true,
+ get: function () {
+ return _importInjector.default;
+ }
+});
+Object.defineProperty(exports, "isModule", {
+ enumerable: true,
+ get: function () {
+ return _isModule.default;
+ }
+});
+
+var _importInjector = _interopRequireDefault(require("./import-injector"));
+
+var _isModule = _interopRequireDefault(require("./is-module"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function addDefault(path, importedSource, opts) {
+ return new _importInjector.default(path).addDefault(importedSource, opts);
+}
+
+function addNamed(path, name, importedSource, opts) {
+ return new _importInjector.default(path).addNamed(name, importedSource, opts);
+}
+
+function addNamespace(path, importedSource, opts) {
+ return new _importInjector.default(path).addNamespace(importedSource, opts);
+}
+
+function addSideEffect(path, importedSource, opts) {
+ return new _importInjector.default(path).addSideEffect(importedSource, opts);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/is-module.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/is-module.js
new file mode 100644
index 00000000000..ad9e399540f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/lib/is-module.js
@@ -0,0 +1,18 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isModule;
+
+function isModule(path) {
+ const {
+ sourceType
+ } = path.node;
+
+ if (sourceType !== "module" && sourceType !== "script") {
+ throw path.buildCodeFrameError(`Unknown sourceType "${sourceType}", cannot transform.`);
+ }
+
+ return path.node.sourceType === "module";
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/package.json
new file mode 100644
index 00000000000..a2de4d9dbd4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-imports/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/helper-module-imports",
+ "version": "7.12.5",
+ "description": "Babel helper functions for inserting module loads",
+ "author": "Logan Smyth <loganfsmyth@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-module-imports"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.12.5"
+ },
+ "devDependencies": {
+ "@babel/core": "7.12.3"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/README.md
new file mode 100644
index 00000000000..8dfc1bda1d7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-module-transforms
+
+> Babel helper functions for implementing ES6 module transformations
+
+See our website [@babel/helper-module-transforms](https://babeljs.io/docs/en/next/babel-helper-module-transforms.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-module-transforms
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-module-transforms --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/get-module-name.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/get-module-name.js
new file mode 100644
index 00000000000..005469dc1d1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/get-module-name.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getModuleName;
+
+function getModuleName(rootOpts, pluginOpts) {
+ var _pluginOpts$moduleRoo, _rootOpts$moduleIds, _rootOpts$moduleRoot;
+
+ const {
+ filename,
+ filenameRelative = filename,
+ sourceRoot = (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
+ } = rootOpts;
+ const {
+ moduleId = rootOpts.moduleId,
+ moduleIds = (_rootOpts$moduleIds = rootOpts.moduleIds) != null ? _rootOpts$moduleIds : !!moduleId,
+ getModuleId = rootOpts.getModuleId,
+ moduleRoot = (_rootOpts$moduleRoot = rootOpts.moduleRoot) != null ? _rootOpts$moduleRoot : sourceRoot
+ } = pluginOpts;
+ if (!moduleIds) return null;
+
+ if (moduleId != null && !getModuleId) {
+ return moduleId;
+ }
+
+ let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
+
+ if (filenameRelative) {
+ const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
+ moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
+ }
+
+ moduleName = moduleName.replace(/\\/g, "/");
+
+ if (getModuleId) {
+ return getModuleId(moduleName) || moduleName;
+ } else {
+ return moduleName;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/index.js
new file mode 100644
index 00000000000..0ff2249b86b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/index.js
@@ -0,0 +1,358 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader;
+exports.ensureStatementsHoisted = ensureStatementsHoisted;
+exports.wrapInterop = wrapInterop;
+exports.buildNamespaceInitStatements = buildNamespaceInitStatements;
+Object.defineProperty(exports, "isModule", {
+ enumerable: true,
+ get: function () {
+ return _helperModuleImports.isModule;
+ }
+});
+Object.defineProperty(exports, "rewriteThis", {
+ enumerable: true,
+ get: function () {
+ return _rewriteThis.default;
+ }
+});
+Object.defineProperty(exports, "hasExports", {
+ enumerable: true,
+ get: function () {
+ return _normalizeAndLoadMetadata.hasExports;
+ }
+});
+Object.defineProperty(exports, "isSideEffectImport", {
+ enumerable: true,
+ get: function () {
+ return _normalizeAndLoadMetadata.isSideEffectImport;
+ }
+});
+Object.defineProperty(exports, "getModuleName", {
+ enumerable: true,
+ get: function () {
+ return _getModuleName.default;
+ }
+});
+
+var _assert = _interopRequireDefault(require("assert"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _template = _interopRequireDefault(require("@babel/template"));
+
+var _chunk = _interopRequireDefault(require("lodash/chunk"));
+
+var _helperModuleImports = require("@babel/helper-module-imports");
+
+var _rewriteThis = _interopRequireDefault(require("./rewrite-this"));
+
+var _rewriteLiveReferences = _interopRequireDefault(require("./rewrite-live-references"));
+
+var _normalizeAndLoadMetadata = _interopRequireWildcard(require("./normalize-and-load-metadata"));
+
+var _getModuleName = _interopRequireDefault(require("./get-module-name"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function rewriteModuleStatementsAndPrepareHeader(path, {
+ exportName,
+ strict,
+ allowTopLevelThis,
+ strictMode,
+ loose,
+ noInterop,
+ lazy,
+ esNamespaceOnly
+}) {
+ (0, _assert.default)((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script");
+ path.node.sourceType = "script";
+ const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, {
+ noInterop,
+ loose,
+ lazy,
+ esNamespaceOnly
+ });
+
+ if (!allowTopLevelThis) {
+ (0, _rewriteThis.default)(path);
+ }
+
+ (0, _rewriteLiveReferences.default)(path, meta);
+
+ if (strictMode !== false) {
+ const hasStrict = path.node.directives.some(directive => {
+ return directive.value.value === "use strict";
+ });
+
+ if (!hasStrict) {
+ path.unshiftContainer("directives", t.directive(t.directiveLiteral("use strict")));
+ }
+ }
+
+ const headers = [];
+
+ if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) {
+ headers.push(buildESModuleHeader(meta, loose));
+ }
+
+ const nameList = buildExportNameListDeclaration(path, meta);
+
+ if (nameList) {
+ meta.exportNameListName = nameList.name;
+ headers.push(nameList.statement);
+ }
+
+ headers.push(...buildExportInitializationStatements(path, meta, loose));
+ return {
+ meta,
+ headers
+ };
+}
+
+function ensureStatementsHoisted(statements) {
+ statements.forEach(header => {
+ header._blockHoist = 3;
+ });
+}
+
+function wrapInterop(programPath, expr, type) {
+ if (type === "none") {
+ return null;
+ }
+
+ let helper;
+
+ if (type === "default") {
+ helper = "interopRequireDefault";
+ } else if (type === "namespace") {
+ helper = "interopRequireWildcard";
+ } else {
+ throw new Error(`Unknown interop: ${type}`);
+ }
+
+ return t.callExpression(programPath.hub.addHelper(helper), [expr]);
+}
+
+function buildNamespaceInitStatements(metadata, sourceMetadata, loose = false) {
+ const statements = [];
+ let srcNamespace = t.identifier(sourceMetadata.name);
+ if (sourceMetadata.lazy) srcNamespace = t.callExpression(srcNamespace, []);
+
+ for (const localName of sourceMetadata.importsNamespace) {
+ if (localName === sourceMetadata.name) continue;
+ statements.push(_template.default.statement`var NAME = SOURCE;`({
+ NAME: localName,
+ SOURCE: t.cloneNode(srcNamespace)
+ }));
+ }
+
+ if (loose) {
+ statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, loose));
+ }
+
+ for (const exportName of sourceMetadata.reexportNamespace) {
+ statements.push((sourceMetadata.lazy ? _template.default.statement`
+ Object.defineProperty(EXPORTS, "NAME", {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE;
+ }
+ });
+ ` : _template.default.statement`EXPORTS.NAME = NAMESPACE;`)({
+ EXPORTS: metadata.exportName,
+ NAME: exportName,
+ NAMESPACE: t.cloneNode(srcNamespace)
+ }));
+ }
+
+ if (sourceMetadata.reexportAll) {
+ const statement = buildNamespaceReexport(metadata, t.cloneNode(srcNamespace), loose);
+ statement.loc = sourceMetadata.reexportAll.loc;
+ statements.push(statement);
+ }
+
+ return statements;
+}
+
+const ReexportTemplate = {
+ loose: _template.default.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,
+ looseComputed: _template.default.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`,
+ spec: (0, _template.default)`
+ Object.defineProperty(EXPORTS, "EXPORT_NAME", {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE_IMPORT;
+ },
+ });
+ `
+};
+
+const buildReexportsFromMeta = (meta, metadata, loose) => {
+ const namespace = metadata.lazy ? t.callExpression(t.identifier(metadata.name), []) : t.identifier(metadata.name);
+ const {
+ stringSpecifiers
+ } = meta;
+ return Array.from(metadata.reexports, ([exportName, importName]) => {
+ let NAMESPACE_IMPORT;
+
+ if (stringSpecifiers.has(importName)) {
+ NAMESPACE_IMPORT = t.memberExpression(t.cloneNode(namespace), t.stringLiteral(importName), true);
+ } else {
+ NAMESPACE_IMPORT = NAMESPACE_IMPORT = t.memberExpression(t.cloneNode(namespace), t.identifier(importName));
+ }
+
+ const astNodes = {
+ EXPORTS: meta.exportName,
+ EXPORT_NAME: exportName,
+ NAMESPACE_IMPORT
+ };
+
+ if (loose) {
+ if (stringSpecifiers.has(exportName)) {
+ return ReexportTemplate.looseComputed(astNodes);
+ } else {
+ return ReexportTemplate.loose(astNodes);
+ }
+ } else {
+ return ReexportTemplate.spec(astNodes);
+ }
+ });
+};
+
+function buildESModuleHeader(metadata, enumerable = false) {
+ return (enumerable ? _template.default.statement`
+ EXPORTS.__esModule = true;
+ ` : _template.default.statement`
+ Object.defineProperty(EXPORTS, "__esModule", {
+ value: true,
+ });
+ `)({
+ EXPORTS: metadata.exportName
+ });
+}
+
+function buildNamespaceReexport(metadata, namespace, loose) {
+ return (loose ? _template.default.statement`
+ Object.keys(NAMESPACE).forEach(function(key) {
+ if (key === "default" || key === "__esModule") return;
+ VERIFY_NAME_LIST;
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
+
+ EXPORTS[key] = NAMESPACE[key];
+ });
+ ` : _template.default.statement`
+ Object.keys(NAMESPACE).forEach(function(key) {
+ if (key === "default" || key === "__esModule") return;
+ VERIFY_NAME_LIST;
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
+
+ Object.defineProperty(EXPORTS, key, {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE[key];
+ },
+ });
+ });
+ `)({
+ NAMESPACE: namespace,
+ EXPORTS: metadata.exportName,
+ VERIFY_NAME_LIST: metadata.exportNameListName ? (0, _template.default)`
+ if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
+ `({
+ EXPORTS_LIST: metadata.exportNameListName
+ }) : null
+ });
+}
+
+function buildExportNameListDeclaration(programPath, metadata) {
+ const exportedVars = Object.create(null);
+
+ for (const data of metadata.local.values()) {
+ for (const name of data.names) {
+ exportedVars[name] = true;
+ }
+ }
+
+ let hasReexport = false;
+
+ for (const data of metadata.source.values()) {
+ for (const exportName of data.reexports.keys()) {
+ exportedVars[exportName] = true;
+ }
+
+ for (const exportName of data.reexportNamespace) {
+ exportedVars[exportName] = true;
+ }
+
+ hasReexport = hasReexport || data.reexportAll;
+ }
+
+ if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
+ const name = programPath.scope.generateUidIdentifier("exportNames");
+ delete exportedVars.default;
+ return {
+ name: name.name,
+ statement: t.variableDeclaration("var", [t.variableDeclarator(name, t.valueToNode(exportedVars))])
+ };
+}
+
+function buildExportInitializationStatements(programPath, metadata, loose = false) {
+ const initStatements = [];
+ const exportNames = [];
+
+ for (const [localName, data] of metadata.local) {
+ if (data.kind === "import") {} else if (data.kind === "hoisted") {
+ initStatements.push(buildInitStatement(metadata, data.names, t.identifier(localName)));
+ } else {
+ exportNames.push(...data.names);
+ }
+ }
+
+ for (const data of metadata.source.values()) {
+ if (!loose) {
+ initStatements.push(...buildReexportsFromMeta(metadata, data, loose));
+ }
+
+ for (const exportName of data.reexportNamespace) {
+ exportNames.push(exportName);
+ }
+ }
+
+ initStatements.push(...(0, _chunk.default)(exportNames, 100).map(members => {
+ return buildInitStatement(metadata, members, programPath.scope.buildUndefinedNode());
+ }));
+ return initStatements;
+}
+
+const InitTemplate = {
+ computed: _template.default.expression`EXPORTS["NAME"] = VALUE`,
+ default: _template.default.expression`EXPORTS.NAME = VALUE`
+};
+
+function buildInitStatement(metadata, exportNames, initExpr) {
+ const {
+ stringSpecifiers,
+ exportName: EXPORTS
+ } = metadata;
+ return t.expressionStatement(exportNames.reduce((acc, exportName) => {
+ const params = {
+ EXPORTS,
+ NAME: exportName,
+ VALUE: acc
+ };
+
+ if (stringSpecifiers.has(exportName)) {
+ return InitTemplate.computed(params);
+ } else {
+ return InitTemplate.default(params);
+ }
+ }, initExpr));
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
new file mode 100644
index 00000000000..d57c16d121e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
@@ -0,0 +1,368 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.hasExports = hasExports;
+exports.isSideEffectImport = isSideEffectImport;
+exports.default = normalizeModuleAndLoadMetadata;
+
+var _path = require("path");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _helperSplitExportDeclaration = _interopRequireDefault(require("@babel/helper-split-export-declaration"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function hasExports(metadata) {
+ return metadata.hasExports;
+}
+
+function isSideEffectImport(source) {
+ return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
+}
+
+function normalizeModuleAndLoadMetadata(programPath, exportName, {
+ noInterop = false,
+ loose = false,
+ lazy = false,
+ esNamespaceOnly = false
+} = {}) {
+ if (!exportName) {
+ exportName = programPath.scope.generateUidIdentifier("exports").name;
+ }
+
+ const stringSpecifiers = new Set();
+ nameAnonymousExports(programPath);
+ const {
+ local,
+ source,
+ hasExports
+ } = getModuleMetadata(programPath, {
+ loose,
+ lazy
+ }, stringSpecifiers);
+ removeModuleDeclarations(programPath);
+
+ for (const [, metadata] of source) {
+ if (metadata.importsNamespace.size > 0) {
+ metadata.name = metadata.importsNamespace.values().next().value;
+ }
+
+ if (noInterop) metadata.interop = "none";else if (esNamespaceOnly) {
+ if (metadata.interop === "namespace") {
+ metadata.interop = "default";
+ }
+ }
+ }
+
+ return {
+ exportName,
+ exportNameListName: null,
+ hasExports,
+ local,
+ source,
+ stringSpecifiers
+ };
+}
+
+function getExportSpecifierName(path, stringSpecifiers) {
+ if (path.isIdentifier()) {
+ return path.node.name;
+ } else if (path.isStringLiteral()) {
+ const stringValue = path.node.value;
+
+ if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) {
+ stringSpecifiers.add(stringValue);
+ }
+
+ return stringValue;
+ } else {
+ throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`);
+ }
+}
+
+function getModuleMetadata(programPath, {
+ loose,
+ lazy
+}, stringSpecifiers) {
+ const localData = getLocalExportMetadata(programPath, loose, stringSpecifiers);
+ const sourceData = new Map();
+
+ const getData = sourceNode => {
+ const source = sourceNode.value;
+ let data = sourceData.get(source);
+
+ if (!data) {
+ data = {
+ name: programPath.scope.generateUidIdentifier((0, _path.basename)(source, (0, _path.extname)(source))).name,
+ interop: "none",
+ loc: null,
+ imports: new Map(),
+ importsNamespace: new Set(),
+ reexports: new Map(),
+ reexportNamespace: new Set(),
+ reexportAll: null,
+ lazy: false
+ };
+ sourceData.set(source, data);
+ }
+
+ return data;
+ };
+
+ let hasExports = false;
+ programPath.get("body").forEach(child => {
+ if (child.isImportDeclaration()) {
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ child.get("specifiers").forEach(spec => {
+ if (spec.isImportDefaultSpecifier()) {
+ const localName = spec.get("local").node.name;
+ data.imports.set(localName, "default");
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexports.set(name, "default");
+ });
+ }
+ } else if (spec.isImportNamespaceSpecifier()) {
+ const localName = spec.get("local").node.name;
+ data.importsNamespace.add(localName);
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexportNamespace.add(name);
+ });
+ }
+ } else if (spec.isImportSpecifier()) {
+ const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers);
+ const localName = spec.get("local").node.name;
+ data.imports.set(localName, importName);
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexports.set(name, importName);
+ });
+ }
+ }
+ });
+ } else if (child.isExportAllDeclaration()) {
+ hasExports = true;
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ data.reexportAll = {
+ loc: child.node.loc
+ };
+ } else if (child.isExportNamedDeclaration() && child.node.source) {
+ hasExports = true;
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ child.get("specifiers").forEach(spec => {
+ if (!spec.isExportSpecifier()) {
+ throw spec.buildCodeFrameError("Unexpected export specifier type");
+ }
+
+ const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers);
+ const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers);
+ data.reexports.set(exportName, importName);
+
+ if (exportName === "__esModule") {
+ throw exportName.buildCodeFrameError('Illegal export "__esModule".');
+ }
+ });
+ } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
+ hasExports = true;
+ }
+ });
+
+ for (const metadata of sourceData.values()) {
+ let needsDefault = false;
+ let needsNamed = false;
+
+ if (metadata.importsNamespace.size > 0) {
+ needsDefault = true;
+ needsNamed = true;
+ }
+
+ if (metadata.reexportAll) {
+ needsNamed = true;
+ }
+
+ for (const importName of metadata.imports.values()) {
+ if (importName === "default") needsDefault = true;else needsNamed = true;
+ }
+
+ for (const importName of metadata.reexports.values()) {
+ if (importName === "default") needsDefault = true;else needsNamed = true;
+ }
+
+ if (needsDefault && needsNamed) {
+ metadata.interop = "namespace";
+ } else if (needsDefault) {
+ metadata.interop = "default";
+ }
+ }
+
+ for (const [source, metadata] of sourceData) {
+ if (lazy !== false && !(isSideEffectImport(metadata) || metadata.reexportAll)) {
+ if (lazy === true) {
+ metadata.lazy = !/\./.test(source);
+ } else if (Array.isArray(lazy)) {
+ metadata.lazy = lazy.indexOf(source) !== -1;
+ } else if (typeof lazy === "function") {
+ metadata.lazy = lazy(source);
+ } else {
+ throw new Error(`.lazy must be a boolean, string array, or function`);
+ }
+ }
+ }
+
+ return {
+ hasExports,
+ local: localData,
+ source: sourceData
+ };
+}
+
+function getLocalExportMetadata(programPath, loose, stringSpecifiers) {
+ const bindingKindLookup = new Map();
+ programPath.get("body").forEach(child => {
+ let kind;
+
+ if (child.isImportDeclaration()) {
+ kind = "import";
+ } else {
+ if (child.isExportDefaultDeclaration()) child = child.get("declaration");
+
+ if (child.isExportNamedDeclaration()) {
+ if (child.node.declaration) {
+ child = child.get("declaration");
+ } else if (loose && child.node.source && child.get("source").isStringLiteral()) {
+ child.node.specifiers.forEach(specifier => {
+ bindingKindLookup.set(specifier.local.name, "block");
+ });
+ return;
+ }
+ }
+
+ if (child.isFunctionDeclaration()) {
+ kind = "hoisted";
+ } else if (child.isClassDeclaration()) {
+ kind = "block";
+ } else if (child.isVariableDeclaration({
+ kind: "var"
+ })) {
+ kind = "var";
+ } else if (child.isVariableDeclaration()) {
+ kind = "block";
+ } else {
+ return;
+ }
+ }
+
+ Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {
+ bindingKindLookup.set(name, kind);
+ });
+ });
+ const localMetadata = new Map();
+
+ const getLocalMetadata = idPath => {
+ const localName = idPath.node.name;
+ let metadata = localMetadata.get(localName);
+
+ if (!metadata) {
+ const kind = bindingKindLookup.get(localName);
+
+ if (kind === undefined) {
+ throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
+ }
+
+ metadata = {
+ names: [],
+ kind
+ };
+ localMetadata.set(localName, metadata);
+ }
+
+ return metadata;
+ };
+
+ programPath.get("body").forEach(child => {
+ if (child.isExportNamedDeclaration() && (loose || !child.node.source)) {
+ if (child.node.declaration) {
+ const declaration = child.get("declaration");
+ const ids = declaration.getOuterBindingIdentifierPaths();
+ Object.keys(ids).forEach(name => {
+ if (name === "__esModule") {
+ throw declaration.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ getLocalMetadata(ids[name]).names.push(name);
+ });
+ } else {
+ child.get("specifiers").forEach(spec => {
+ const local = spec.get("local");
+ const exported = spec.get("exported");
+ const localMetadata = getLocalMetadata(local);
+ const exportName = getExportSpecifierName(exported, stringSpecifiers);
+
+ if (exportName === "__esModule") {
+ throw exported.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ localMetadata.names.push(exportName);
+ });
+ }
+ } else if (child.isExportDefaultDeclaration()) {
+ const declaration = child.get("declaration");
+
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
+ getLocalMetadata(declaration.get("id")).names.push("default");
+ } else {
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
+ }
+ }
+ });
+ return localMetadata;
+}
+
+function nameAnonymousExports(programPath) {
+ programPath.get("body").forEach(child => {
+ if (!child.isExportDefaultDeclaration()) return;
+ (0, _helperSplitExportDeclaration.default)(child);
+ });
+}
+
+function removeModuleDeclarations(programPath) {
+ programPath.get("body").forEach(child => {
+ if (child.isImportDeclaration()) {
+ child.remove();
+ } else if (child.isExportNamedDeclaration()) {
+ if (child.node.declaration) {
+ child.node.declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(child.node.declaration);
+ } else {
+ child.remove();
+ }
+ } else if (child.isExportDefaultDeclaration()) {
+ const declaration = child.get("declaration");
+
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
+ declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(declaration);
+ } else {
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
+ }
+ } else if (child.isExportAllDeclaration()) {
+ child.remove();
+ }
+ });
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
new file mode 100644
index 00000000000..b0ebe01326e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
@@ -0,0 +1,297 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rewriteLiveReferences;
+
+var _assert = _interopRequireDefault(require("assert"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _template = _interopRequireDefault(require("@babel/template"));
+
+var _helperSimpleAccess = _interopRequireDefault(require("@babel/helper-simple-access"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function rewriteLiveReferences(programPath, metadata) {
+ const imported = new Map();
+ const exported = new Map();
+
+ const requeueInParent = path => {
+ programPath.requeue(path);
+ };
+
+ for (const [source, data] of metadata.source) {
+ for (const [localName, importName] of data.imports) {
+ imported.set(localName, [source, importName, null]);
+ }
+
+ for (const localName of data.importsNamespace) {
+ imported.set(localName, [source, null, localName]);
+ }
+ }
+
+ for (const [local, data] of metadata.local) {
+ let exportMeta = exported.get(local);
+
+ if (!exportMeta) {
+ exportMeta = [];
+ exported.set(local, exportMeta);
+ }
+
+ exportMeta.push(...data.names);
+ }
+
+ programPath.traverse(rewriteBindingInitVisitor, {
+ metadata,
+ requeueInParent,
+ scope: programPath.scope,
+ exported
+ });
+ (0, _helperSimpleAccess.default)(programPath, new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())]));
+ programPath.traverse(rewriteReferencesVisitor, {
+ seen: new WeakSet(),
+ metadata,
+ requeueInParent,
+ scope: programPath.scope,
+ imported,
+ exported,
+ buildImportReference: ([source, importName, localName], identNode) => {
+ const meta = metadata.source.get(source);
+
+ if (localName) {
+ if (meta.lazy) identNode = t.callExpression(identNode, []);
+ return identNode;
+ }
+
+ let namespace = t.identifier(meta.name);
+ if (meta.lazy) namespace = t.callExpression(namespace, []);
+ const computed = metadata.stringSpecifiers.has(importName);
+ return t.memberExpression(namespace, computed ? t.stringLiteral(importName) : t.identifier(importName), computed);
+ }
+ });
+}
+
+const rewriteBindingInitVisitor = {
+ Scope(path) {
+ path.skip();
+ },
+
+ ClassDeclaration(path) {
+ const {
+ requeueInParent,
+ exported,
+ metadata
+ } = this;
+ const {
+ id
+ } = path.node;
+ if (!id) throw new Error("Expected class to have a name");
+ const localName = id.name;
+ const exportNames = exported.get(localName) || [];
+
+ if (exportNames.length > 0) {
+ const statement = t.expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, t.identifier(localName)));
+ statement._blockHoist = path.node._blockHoist;
+ requeueInParent(path.insertAfter(statement)[0]);
+ }
+ },
+
+ VariableDeclaration(path) {
+ const {
+ requeueInParent,
+ exported,
+ metadata
+ } = this;
+ Object.keys(path.getOuterBindingIdentifiers()).forEach(localName => {
+ const exportNames = exported.get(localName) || [];
+
+ if (exportNames.length > 0) {
+ const statement = t.expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, t.identifier(localName)));
+ statement._blockHoist = path.node._blockHoist;
+ requeueInParent(path.insertAfter(statement)[0]);
+ }
+ });
+ }
+
+};
+
+const buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr) => {
+ return (exportNames || []).reduce((expr, exportName) => {
+ const {
+ stringSpecifiers
+ } = metadata;
+ const computed = stringSpecifiers.has(exportName);
+ return t.assignmentExpression("=", t.memberExpression(t.identifier(metadata.exportName), computed ? t.stringLiteral(exportName) : t.identifier(exportName), computed), expr);
+ }, localExpr);
+};
+
+const buildImportThrow = localName => {
+ return _template.default.expression.ast`
+ (function() {
+ throw new Error('"' + '${localName}' + '" is read-only.');
+ })()
+ `;
+};
+
+const rewriteReferencesVisitor = {
+ ReferencedIdentifier(path) {
+ const {
+ seen,
+ buildImportReference,
+ scope,
+ imported,
+ requeueInParent
+ } = this;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const localName = path.node.name;
+ const localBinding = path.scope.getBinding(localName);
+ const rootBinding = scope.getBinding(localName);
+ if (rootBinding !== localBinding) return;
+ const importData = imported.get(localName);
+
+ if (importData) {
+ const ref = buildImportReference(importData, path.node);
+ ref.loc = path.node.loc;
+
+ if ((path.parentPath.isCallExpression({
+ callee: path.node
+ }) || path.parentPath.isOptionalCallExpression({
+ callee: path.node
+ }) || path.parentPath.isTaggedTemplateExpression({
+ tag: path.node
+ })) && t.isMemberExpression(ref)) {
+ path.replaceWith(t.sequenceExpression([t.numericLiteral(0), ref]));
+ } else if (path.isJSXIdentifier() && t.isMemberExpression(ref)) {
+ const {
+ object,
+ property
+ } = ref;
+ path.replaceWith(t.JSXMemberExpression(t.JSXIdentifier(object.name), t.JSXIdentifier(property.name)));
+ } else {
+ path.replaceWith(ref);
+ }
+
+ requeueInParent(path);
+ path.skip();
+ }
+ },
+
+ AssignmentExpression: {
+ exit(path) {
+ const {
+ scope,
+ seen,
+ imported,
+ exported,
+ requeueInParent,
+ buildImportReference
+ } = this;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const left = path.get("left");
+ if (left.isMemberExpression()) return;
+
+ if (left.isIdentifier()) {
+ const localName = left.node.name;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ const exportedNames = exported.get(localName);
+ const importData = imported.get(localName);
+
+ if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
+ (0, _assert.default)(path.node.operator === "=", "Path was not simplified");
+ const assignment = path.node;
+
+ if (importData) {
+ assignment.left = buildImportReference(importData, assignment.left);
+ assignment.right = t.sequenceExpression([assignment.right, buildImportThrow(localName)]);
+ }
+
+ path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment));
+ requeueInParent(path);
+ }
+ } else {
+ const ids = left.getOuterBindingIdentifiers();
+ const programScopeIds = Object.keys(ids).filter(localName => scope.getBinding(localName) === path.scope.getBinding(localName));
+ const id = programScopeIds.find(localName => imported.has(localName));
+
+ if (id) {
+ path.node.right = t.sequenceExpression([path.node.right, buildImportThrow(id)]);
+ }
+
+ const items = [];
+ programScopeIds.forEach(localName => {
+ const exportedNames = exported.get(localName) || [];
+
+ if (exportedNames.length > 0) {
+ items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, t.identifier(localName)));
+ }
+ });
+
+ if (items.length > 0) {
+ let node = t.sequenceExpression(items);
+
+ if (path.parentPath.isExpressionStatement()) {
+ node = t.expressionStatement(node);
+ node._blockHoist = path.parentPath.node._blockHoist;
+ }
+
+ const statement = path.insertAfter(node)[0];
+ requeueInParent(statement);
+ }
+ }
+ }
+
+ },
+
+ "ForOfStatement|ForInStatement"(path) {
+ const {
+ scope,
+ node
+ } = path;
+ const {
+ left
+ } = node;
+ const {
+ exported,
+ scope: programScope
+ } = this;
+
+ if (!t.isVariableDeclaration(left)) {
+ let didTransform = false;
+ const bodyPath = path.get("body");
+ const loopBodyScope = bodyPath.scope;
+
+ for (const name of Object.keys(t.getOuterBindingIdentifiers(left))) {
+ if (exported.get(name) && programScope.getBinding(name) === scope.getBinding(name)) {
+ didTransform = true;
+
+ if (loopBodyScope.hasOwnBinding(name)) {
+ loopBodyScope.rename(name);
+ }
+ }
+ }
+
+ if (!didTransform) {
+ return;
+ }
+
+ const newLoopId = scope.generateUidIdentifierBasedOnNode(left);
+ bodyPath.unshiftContainer("body", t.expressionStatement(t.assignmentExpression("=", left, newLoopId)));
+ path.get("left").replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.cloneNode(newLoopId))]));
+ scope.registerDeclaration(path.get("left"));
+ }
+ }
+
+}; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
new file mode 100644
index 00000000000..8a7042f4227
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
@@ -0,0 +1,31 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rewriteThis;
+
+var _helperReplaceSupers = require("@babel/helper-replace-supers");
+
+var _traverse = _interopRequireDefault(require("@babel/traverse"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function rewriteThis(programPath) {
+ (0, _traverse.default)(programPath.node, Object.assign({}, rewriteThisVisitor, {
+ noScope: true
+ }));
+}
+
+const rewriteThisVisitor = _traverse.default.visitors.merge([_helperReplaceSupers.environmentVisitor, {
+ ThisExpression(path) {
+ path.replaceWith(t.unaryExpression("void", t.numericLiteral(0), true));
+ }
+
+}]); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/package.json
new file mode 100644
index 00000000000..cc356aa1f99
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-module-transforms/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/helper-module-transforms",
+ "version": "7.12.1",
+ "description": "Babel helper functions for implementing ES6 module transformations",
+ "author": "Logan Smyth <loganfsmyth@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-module-transforms"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.12.1",
+ "@babel/helper-replace-supers": "^7.12.1",
+ "@babel/helper-simple-access": "^7.12.1",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.12.1",
+ "@babel/types": "^7.12.1",
+ "lodash": "^4.17.19"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/README.md
new file mode 100644
index 00000000000..3fdbc9bf187
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-optimise-call-expression
+
+> Helper function to optimise call expression
+
+See our website [@babel/helper-optimise-call-expression](https://babeljs.io/docs/en/babel-helper-optimise-call-expression) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-optimise-call-expression
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-optimise-call-expression --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/lib/index.js
new file mode 100644
index 00000000000..0d5b34e5d6f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/lib/index.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _default(callee, thisNode, args, optional) {
+ if (args.length === 1 && t.isSpreadElement(args[0]) && t.isIdentifier(args[0].argument, {
+ name: "arguments"
+ })) {
+ if (optional) {
+ return t.optionalCallExpression(t.optionalMemberExpression(callee, t.identifier("apply"), false, true), [thisNode, args[0].argument], false);
+ }
+
+ return t.callExpression(t.memberExpression(callee, t.identifier("apply")), [thisNode, args[0].argument]);
+ } else {
+ if (optional) {
+ return t.optionalCallExpression(t.optionalMemberExpression(callee, t.identifier("call"), false, true), [thisNode, ...args], false);
+ }
+
+ return t.callExpression(t.memberExpression(callee, t.identifier("call")), [thisNode, ...args]);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/package.json
new file mode 100644
index 00000000000..e71c0e88752
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-optimise-call-expression/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@babel/helper-optimise-call-expression",
+ "version": "7.12.7",
+ "description": "Helper function to optimise call expression",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-optimise-call-expression"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.12.7"
+ },
+ "devDependencies": {
+ "@babel/generator": "7.12.5",
+ "@babel/parser": "7.12.7"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/README.md
new file mode 100644
index 00000000000..774e0fa49bf
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-replace-supers
+
+> Helper function to replace supers
+
+See our website [@babel/helper-replace-supers](https://babeljs.io/docs/en/babel-helper-replace-supers) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-replace-supers
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-replace-supers --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/lib/index.js
new file mode 100644
index 00000000000..d434da7028c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/lib/index.js
@@ -0,0 +1,255 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.skipAllButComputedKey = skipAllButComputedKey;
+exports.default = exports.environmentVisitor = void 0;
+
+var _traverse = _interopRequireDefault(require("@babel/traverse"));
+
+var _helperMemberExpressionToFunctions = _interopRequireDefault(require("@babel/helper-member-expression-to-functions"));
+
+var _helperOptimiseCallExpression = _interopRequireDefault(require("@babel/helper-optimise-call-expression"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) {
+ objectRef = t.cloneNode(objectRef);
+ const targetRef = isStatic || isPrivateMethod ? objectRef : t.memberExpression(objectRef, t.identifier("prototype"));
+ return t.callExpression(file.addHelper("getPrototypeOf"), [targetRef]);
+}
+
+function skipAllButComputedKey(path) {
+ if (!path.node.computed) {
+ path.skip();
+ return;
+ }
+
+ const keys = t.VISITOR_KEYS[path.type];
+
+ for (const key of keys) {
+ if (key !== "key") path.skipKey(key);
+ }
+}
+
+const environmentVisitor = {
+ [`${t.StaticBlock ? "StaticBlock|" : ""}ClassPrivateProperty|TypeAnnotation`](path) {
+ path.skip();
+ },
+
+ Function(path) {
+ if (path.isMethod()) return;
+ if (path.isArrowFunctionExpression()) return;
+ path.skip();
+ },
+
+ "Method|ClassProperty"(path) {
+ skipAllButComputedKey(path);
+ }
+
+};
+exports.environmentVisitor = environmentVisitor;
+
+const visitor = _traverse.default.visitors.merge([environmentVisitor, {
+ Super(path, state) {
+ const {
+ node,
+ parentPath
+ } = path;
+ if (!parentPath.isMemberExpression({
+ object: node
+ })) return;
+ state.handle(parentPath);
+ }
+
+}]);
+
+const specHandlers = {
+ memoise(superMember, count) {
+ const {
+ scope,
+ node
+ } = superMember;
+ const {
+ computed,
+ property
+ } = node;
+
+ if (!computed) {
+ return;
+ }
+
+ const memo = scope.maybeGenerateMemoised(property);
+
+ if (!memo) {
+ return;
+ }
+
+ this.memoiser.set(property, memo, count);
+ },
+
+ prop(superMember) {
+ const {
+ computed,
+ property
+ } = superMember.node;
+
+ if (this.memoiser.has(property)) {
+ return t.cloneNode(this.memoiser.get(property));
+ }
+
+ if (computed) {
+ return t.cloneNode(property);
+ }
+
+ return t.stringLiteral(property.name);
+ },
+
+ get(superMember) {
+ return this._get(superMember, this._getThisRefs());
+ },
+
+ _get(superMember, thisRefs) {
+ const proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
+ return t.callExpression(this.file.addHelper("get"), [thisRefs.memo ? t.sequenceExpression([thisRefs.memo, proto]) : proto, this.prop(superMember), thisRefs.this]);
+ },
+
+ _getThisRefs() {
+ if (!this.isDerivedConstructor) {
+ return {
+ this: t.thisExpression()
+ };
+ }
+
+ const thisRef = this.scope.generateDeclaredUidIdentifier("thisSuper");
+ return {
+ memo: t.assignmentExpression("=", thisRef, t.thisExpression()),
+ this: t.cloneNode(thisRef)
+ };
+ },
+
+ set(superMember, value) {
+ const thisRefs = this._getThisRefs();
+
+ const proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
+ return t.callExpression(this.file.addHelper("set"), [thisRefs.memo ? t.sequenceExpression([thisRefs.memo, proto]) : proto, this.prop(superMember), value, thisRefs.this, t.booleanLiteral(superMember.isInStrictMode())]);
+ },
+
+ destructureSet(superMember) {
+ throw superMember.buildCodeFrameError(`Destructuring to a super field is not supported yet.`);
+ },
+
+ call(superMember, args) {
+ const thisRefs = this._getThisRefs();
+
+ return (0, _helperOptimiseCallExpression.default)(this._get(superMember, thisRefs), t.cloneNode(thisRefs.this), args, false);
+ },
+
+ optionalCall(superMember, args) {
+ const thisRefs = this._getThisRefs();
+
+ return (0, _helperOptimiseCallExpression.default)(this._get(superMember, thisRefs), t.cloneNode(thisRefs.this), args, true);
+ }
+
+};
+const looseHandlers = Object.assign({}, specHandlers, {
+ prop(superMember) {
+ const {
+ property
+ } = superMember.node;
+
+ if (this.memoiser.has(property)) {
+ return t.cloneNode(this.memoiser.get(property));
+ }
+
+ return t.cloneNode(property);
+ },
+
+ get(superMember) {
+ const {
+ isStatic,
+ superRef
+ } = this;
+ const {
+ computed
+ } = superMember.node;
+ const prop = this.prop(superMember);
+ let object;
+
+ if (isStatic) {
+ object = superRef ? t.cloneNode(superRef) : t.memberExpression(t.identifier("Function"), t.identifier("prototype"));
+ } else {
+ object = superRef ? t.memberExpression(t.cloneNode(superRef), t.identifier("prototype")) : t.memberExpression(t.identifier("Object"), t.identifier("prototype"));
+ }
+
+ return t.memberExpression(object, prop, computed);
+ },
+
+ set(superMember, value) {
+ const {
+ computed
+ } = superMember.node;
+ const prop = this.prop(superMember);
+ return t.assignmentExpression("=", t.memberExpression(t.thisExpression(), prop, computed), value);
+ },
+
+ destructureSet(superMember) {
+ const {
+ computed
+ } = superMember.node;
+ const prop = this.prop(superMember);
+ return t.memberExpression(t.thisExpression(), prop, computed);
+ },
+
+ call(superMember, args) {
+ return (0, _helperOptimiseCallExpression.default)(this.get(superMember), t.thisExpression(), args, false);
+ },
+
+ optionalCall(superMember, args) {
+ return (0, _helperOptimiseCallExpression.default)(this.get(superMember), t.thisExpression(), args, true);
+ }
+
+});
+
+class ReplaceSupers {
+ constructor(opts) {
+ const path = opts.methodPath;
+ this.methodPath = path;
+ this.isDerivedConstructor = path.isClassMethod({
+ kind: "constructor"
+ }) && !!opts.superRef;
+ this.isStatic = path.isObjectMethod() || path.node.static;
+ this.isPrivateMethod = path.isPrivate() && path.isMethod();
+ this.file = opts.file;
+ this.superRef = opts.superRef;
+ this.isLoose = opts.isLoose;
+ this.opts = opts;
+ }
+
+ getObjectRef() {
+ return t.cloneNode(this.opts.objectRef || this.opts.getObjectRef());
+ }
+
+ replace() {
+ const handler = this.isLoose ? looseHandlers : specHandlers;
+ (0, _helperMemberExpressionToFunctions.default)(this.methodPath, visitor, Object.assign({
+ file: this.file,
+ scope: this.methodPath.scope,
+ isDerivedConstructor: this.isDerivedConstructor,
+ isStatic: this.isStatic,
+ isPrivateMethod: this.isPrivateMethod,
+ getObjectRef: this.getObjectRef.bind(this),
+ superRef: this.superRef
+ }, handler));
+ }
+
+}
+
+exports.default = ReplaceSupers; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/package.json
new file mode 100644
index 00000000000..e2c2392524f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-replace-supers/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "@babel/helper-replace-supers",
+ "version": "7.12.5",
+ "description": "Helper function to replace supers",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-replace-supers"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/helper-member-expression-to-functions": "^7.12.1",
+ "@babel/helper-optimise-call-expression": "^7.10.4",
+ "@babel/traverse": "^7.12.5",
+ "@babel/types": "^7.12.5"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/README.md
new file mode 100644
index 00000000000..206436ca8b9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-simple-access
+
+> Babel helper for ensuring that access to a given value is performed through simple accesses
+
+See our website [@babel/helper-simple-access](https://babeljs.io/docs/en/next/babel-helper-simple-access.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-simple-access
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-simple-access --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/lib/index.js
new file mode 100644
index 00000000000..12cfe715024
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/lib/index.js
@@ -0,0 +1,79 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = simplifyAccess;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function simplifyAccess(path, bindingNames) {
+ path.traverse(simpleAssignmentVisitor, {
+ scope: path.scope,
+ bindingNames,
+ seen: new WeakSet()
+ });
+}
+
+const simpleAssignmentVisitor = {
+ UpdateExpression: {
+ exit(path) {
+ const {
+ scope,
+ bindingNames
+ } = this;
+ const arg = path.get("argument");
+ if (!arg.isIdentifier()) return;
+ const localName = arg.node.name;
+ if (!bindingNames.has(localName)) return;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) {
+ const operator = path.node.operator == "++" ? "+=" : "-=";
+ path.replaceWith(t.assignmentExpression(operator, arg.node, t.numericLiteral(1)));
+ } else if (path.node.prefix) {
+ path.replaceWith(t.assignmentExpression("=", t.identifier(localName), t.binaryExpression(path.node.operator[0], t.unaryExpression("+", arg.node), t.numericLiteral(1))));
+ } else {
+ const old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old");
+ const varName = old.name;
+ path.scope.push({
+ id: old
+ });
+ const binary = t.binaryExpression(path.node.operator[0], t.identifier(varName), t.numericLiteral(1));
+ path.replaceWith(t.sequenceExpression([t.assignmentExpression("=", t.identifier(varName), t.unaryExpression("+", arg.node)), t.assignmentExpression("=", t.cloneNode(arg.node), binary), t.identifier(varName)]));
+ }
+ }
+
+ },
+ AssignmentExpression: {
+ exit(path) {
+ const {
+ scope,
+ seen,
+ bindingNames
+ } = this;
+ if (path.node.operator === "=") return;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const left = path.get("left");
+ if (!left.isIdentifier()) return;
+ const localName = left.node.name;
+ if (!bindingNames.has(localName)) return;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ path.node.right = t.binaryExpression(path.node.operator.slice(0, -1), t.cloneNode(path.node.left), path.node.right);
+ path.node.operator = "=";
+ }
+
+ }
+}; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/package.json
new file mode 100644
index 00000000000..a775b777106
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-simple-access/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "@babel/helper-simple-access",
+ "version": "7.12.1",
+ "description": "Babel helper for ensuring that access to a given value is performed through simple accesses",
+ "author": "Logan Smyth <loganfsmyth@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-simple-access"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.12.1"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md
index d241fee0f6d..d241fee0f6d 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/README.md
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js
new file mode 100644
index 00000000000..98e7385572c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/lib/index.js
@@ -0,0 +1,62 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = splitExportDeclaration;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function splitExportDeclaration(exportDeclaration) {
+ if (!exportDeclaration.isExportDeclaration()) {
+ throw new Error("Only export declarations can be split.");
+ }
+
+ const isDefault = exportDeclaration.isExportDefaultDeclaration();
+ const declaration = exportDeclaration.get("declaration");
+ const isClassDeclaration = declaration.isClassDeclaration();
+
+ if (isDefault) {
+ const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
+ const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
+ let id = declaration.node.id;
+ let needBindingRegistration = false;
+
+ if (!id) {
+ needBindingRegistration = true;
+ id = scope.generateUidIdentifier("default");
+
+ if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
+ declaration.node.id = t.cloneNode(id);
+ }
+ }
+
+ const updatedDeclaration = standaloneDeclaration ? declaration : t.variableDeclaration("var", [t.variableDeclarator(t.cloneNode(id), declaration.node)]);
+ const updatedExportDeclaration = t.exportNamedDeclaration(null, [t.exportSpecifier(t.cloneNode(id), t.identifier("default"))]);
+ exportDeclaration.insertAfter(updatedExportDeclaration);
+ exportDeclaration.replaceWith(updatedDeclaration);
+
+ if (needBindingRegistration) {
+ scope.registerDeclaration(exportDeclaration);
+ }
+
+ return exportDeclaration;
+ }
+
+ if (exportDeclaration.get("specifiers").length > 0) {
+ throw new Error("It doesn't make sense to split exported specifiers.");
+ }
+
+ const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
+ const specifiers = Object.keys(bindingIdentifiers).map(name => {
+ return t.exportSpecifier(t.identifier(name), t.identifier(name));
+ });
+ const aliasDeclar = t.exportNamedDeclaration(null, specifiers);
+ exportDeclaration.insertAfter(aliasDeclar);
+ exportDeclaration.replaceWith(declaration.node);
+ return exportDeclaration;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json
new file mode 100644
index 00000000000..3cd12554e9a
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-split-export-declaration/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@babel/helper-split-export-declaration",
+ "version": "7.11.0",
+ "description": "",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-split-export-declaration"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.11.0"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/README.md
new file mode 100644
index 00000000000..ab2dad17314
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-validator-identifier
+
+> Validate identifier/keywords name
+
+See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/next/babel-helper-validator-identifier.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-validator-identifier
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-validator-identifier --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/identifier.js
new file mode 100644
index 00000000000..51ec76370cc
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/identifier.js
@@ -0,0 +1,77 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isIdentifierStart = isIdentifierStart;
+exports.isIdentifierChar = isIdentifierChar;
+exports.isIdentifierName = isIdentifierName;
+let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\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";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+
+ return false;
+}
+
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+
+function isIdentifierName(name) {
+ let isFirst = true;
+
+ for (let _i = 0, _Array$from = Array.from(name); _i < _Array$from.length; _i++) {
+ const char = _Array$from[_i];
+ const cp = char.codePointAt(0);
+
+ if (isFirst) {
+ if (!isIdentifierStart(cp)) {
+ return false;
+ }
+
+ isFirst = false;
+ } else if (!isIdentifierChar(cp)) {
+ return false;
+ }
+ }
+
+ return !isFirst;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/index.js
new file mode 100644
index 00000000000..7b623c90a6e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/index.js
@@ -0,0 +1,57 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "isIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierName;
+ }
+});
+Object.defineProperty(exports, "isIdentifierChar", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierChar;
+ }
+});
+Object.defineProperty(exports, "isIdentifierStart", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierStart;
+ }
+});
+Object.defineProperty(exports, "isReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindOnlyReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictReservedWord;
+ }
+});
+Object.defineProperty(exports, "isKeyword", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isKeyword;
+ }
+});
+
+var _identifier = require("./identifier");
+
+var _keyword = require("./keyword"); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/keyword.js
new file mode 100644
index 00000000000..110cee40028
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/lib/keyword.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isReservedWord = isReservedWord;
+exports.isStrictReservedWord = isStrictReservedWord;
+exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
+exports.isStrictBindReservedWord = isStrictBindReservedWord;
+exports.isKeyword = isKeyword;
+const reservedWords = {
+ keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+
+function isStrictReservedWord(word, inModule) {
+ return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
+
+function isStrictBindOnlyReservedWord(word) {
+ return reservedWordsStrictBindSet.has(word);
+}
+
+function isStrictBindReservedWord(word, inModule) {
+ return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
+
+function isKeyword(word) {
+ return keywords.has(word);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/package.json
new file mode 100644
index 00000000000..79112981bdd
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "@babel/helper-validator-identifier",
+ "version": "7.10.4",
+ "description": "Validate identifier/keywords name",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-validator-identifier"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": "./lib/index.js",
+ "devDependencies": {
+ "charcodes": "^0.2.0",
+ "unicode-13.0.0": "^0.8.0"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
new file mode 100644
index 00000000000..70b371508bd
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
@@ -0,0 +1,75 @@
+"use strict";
+
+// Always use the latest available version of Unicode!
+// https://tc39.github.io/ecma262/#sec-conformance
+const version = "13.0.0";
+
+const start = require("unicode-" +
+ version +
+ "/Binary_Property/ID_Start/code-points.js").filter(function (ch) {
+ return ch > 0x7f;
+});
+let last = -1;
+const cont = [0x200c, 0x200d].concat(
+ require("unicode-" +
+ version +
+ "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) {
+ return ch > 0x7f && search(start, ch, last + 1) == -1;
+ })
+);
+
+function search(arr, ch, starting) {
+ for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
+ if (arr[i] === ch) return i;
+ }
+ return -1;
+}
+
+function pad(str, width) {
+ while (str.length < width) str = "0" + str;
+ return str;
+}
+
+function esc(code) {
+ const hex = code.toString(16);
+ if (hex.length <= 2) return "\\x" + pad(hex, 2);
+ else return "\\u" + pad(hex, 4);
+}
+
+function generate(chars) {
+ const astral = [];
+ let re = "";
+ for (let i = 0, at = 0x10000; i < chars.length; i++) {
+ const from = chars[i];
+ let to = from;
+ while (i < chars.length - 1 && chars[i + 1] == to + 1) {
+ i++;
+ to++;
+ }
+ if (to <= 0xffff) {
+ if (from == to) re += esc(from);
+ else if (from + 1 == to) re += esc(from) + esc(to);
+ else re += esc(from) + "-" + esc(to);
+ } else {
+ astral.push(from - at, to - from);
+ at = to;
+ }
+ }
+ return { nonASCII: re, astral: astral };
+}
+
+const startData = generate(start);
+const contData = generate(cont);
+
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
+);
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
+);
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helpers/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helpers/README.md b/tools/node_modules/@babel/core/node_modules/@babel/helpers/README.md
new file mode 100644
index 00000000000..3b79dbf5509
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helpers/README.md
@@ -0,0 +1,19 @@
+# @babel/helpers
+
+> Collection of helper functions used by Babel transforms.
+
+See our website [@babel/helpers](https://babeljs.io/docs/en/babel-helpers) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helpers
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helpers --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js b/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js
new file mode 100644
index 00000000000..feb2e016acb
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers.js
@@ -0,0 +1,2078 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _template = _interopRequireDefault(require("@babel/template"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const helpers = Object.create(null);
+var _default = helpers;
+exports.default = _default;
+
+const helper = minVersion => tpl => ({
+ minVersion,
+ ast: () => _template.default.program.ast(tpl)
+});
+
+helpers.typeof = helper("7.0.0-beta.0")`
+ export default function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ _typeof = function (obj) { return typeof obj; };
+ } else {
+ _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype
+ ? "symbol"
+ : typeof obj;
+ };
+ }
+
+ return _typeof(obj);
+ }
+`;
+helpers.jsx = helper("7.0.0-beta.0")`
+ var REACT_ELEMENT_TYPE;
+
+ export default function _createRawReactElement(type, props, key, children) {
+ if (!REACT_ELEMENT_TYPE) {
+ REACT_ELEMENT_TYPE = (
+ typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element")
+ ) || 0xeac7;
+ }
+
+ var defaultProps = type && type.defaultProps;
+ var childrenLength = arguments.length - 3;
+
+ if (!props && childrenLength !== 0) {
+ // If we're going to assign props.children, we create a new object now
+ // to avoid mutating defaultProps.
+ props = {
+ children: void 0,
+ };
+ }
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = new Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 3];
+ }
+ props.children = childArray;
+ }
+
+ if (props && defaultProps) {
+ for (var propName in defaultProps) {
+ if (props[propName] === void 0) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ } else if (!props) {
+ props = defaultProps || {};
+ }
+
+ return {
+ $$typeof: REACT_ELEMENT_TYPE,
+ type: type,
+ key: key === undefined ? null : '' + key,
+ ref: null,
+ props: props,
+ _owner: null,
+ };
+ }
+`;
+helpers.asyncIterator = helper("7.0.0-beta.0")`
+ export default function _asyncIterator(iterable) {
+ var method
+ if (typeof Symbol !== "undefined") {
+ if (Symbol.asyncIterator) {
+ method = iterable[Symbol.asyncIterator]
+ if (method != null) return method.call(iterable);
+ }
+ if (Symbol.iterator) {
+ method = iterable[Symbol.iterator]
+ if (method != null) return method.call(iterable);
+ }
+ }
+ throw new TypeError("Object is not async iterable");
+ }
+`;
+helpers.AwaitValue = helper("7.0.0-beta.0")`
+ export default function _AwaitValue(value) {
+ this.wrapped = value;
+ }
+`;
+helpers.AsyncGenerator = helper("7.0.0-beta.0")`
+ import AwaitValue from "AwaitValue";
+
+ export default function AsyncGenerator(gen) {
+ var front, back;
+
+ function send(key, arg) {
+ return new Promise(function (resolve, reject) {
+ var request = {
+ key: key,
+ arg: arg,
+ resolve: resolve,
+ reject: reject,
+ next: null,
+ };
+
+ if (back) {
+ back = back.next = request;
+ } else {
+ front = back = request;
+ resume(key, arg);
+ }
+ });
+ }
+
+ function resume(key, arg) {
+ try {
+ var result = gen[key](arg)
+ var value = result.value;
+ var wrappedAwait = value instanceof AwaitValue;
+
+ Promise.resolve(wrappedAwait ? value.wrapped : value).then(
+ function (arg) {
+ if (wrappedAwait) {
+ resume(key === "return" ? "return" : "next", arg);
+ return
+ }
+
+ settle(result.done ? "return" : "normal", arg);
+ },
+ function (err) { resume("throw", err); });
+ } catch (err) {
+ settle("throw", err);
+ }
+ }
+
+ function settle(type, value) {
+ switch (type) {
+ case "return":
+ front.resolve({ value: value, done: true });
+ break;
+ case "throw":
+ front.reject(value);
+ break;
+ default:
+ front.resolve({ value: value, done: false });
+ break;
+ }
+
+ front = front.next;
+ if (front) {
+ resume(front.key, front.arg);
+ } else {
+ back = null;
+ }
+ }
+
+ this._invoke = send;
+
+ // Hide "return" method if generator return is not supported
+ if (typeof gen.return !== "function") {
+ this.return = undefined;
+ }
+ }
+
+ if (typeof Symbol === "function" && Symbol.asyncIterator) {
+ AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };
+ }
+
+ AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };
+ AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };
+ AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };
+`;
+helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")`
+ import AsyncGenerator from "AsyncGenerator";
+
+ export default function _wrapAsyncGenerator(fn) {
+ return function () {
+ return new AsyncGenerator(fn.apply(this, arguments));
+ };
+ }
+`;
+helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")`
+ import AwaitValue from "AwaitValue";
+
+ export default function _awaitAsyncGenerator(value) {
+ return new AwaitValue(value);
+ }
+`;
+helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")`
+ export default function _asyncGeneratorDelegate(inner, awaitWrap) {
+ var iter = {}, waiting = false;
+
+ function pump(key, value) {
+ waiting = true;
+ value = new Promise(function (resolve) { resolve(inner[key](value)); });
+ return { done: false, value: awaitWrap(value) };
+ };
+
+ if (typeof Symbol === "function" && Symbol.iterator) {
+ iter[Symbol.iterator] = function () { return this; };
+ }
+
+ iter.next = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+ return pump("next", value);
+ };
+
+ if (typeof inner.throw === "function") {
+ iter.throw = function (value) {
+ if (waiting) {
+ waiting = false;
+ throw value;
+ }
+ return pump("throw", value);
+ };
+ }
+
+ if (typeof inner.return === "function") {
+ iter.return = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+ return pump("return", value);
+ };
+ }
+
+ return iter;
+ }
+`;
+helpers.asyncToGenerator = helper("7.0.0-beta.0")`
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+ }
+
+ export default function _asyncToGenerator(fn) {
+ return function () {
+ var self = this, args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+ }
+`;
+helpers.classCallCheck = helper("7.0.0-beta.0")`
+ export default function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+ }
+`;
+helpers.createClass = helper("7.0.0-beta.0")`
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i ++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+
+ export default function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+ }
+`;
+helpers.defineEnumerableProperties = helper("7.0.0-beta.0")`
+ export default function _defineEnumerableProperties(obj, descs) {
+ for (var key in descs) {
+ var desc = descs[key];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, key, desc);
+ }
+
+ // Symbols are not enumerated over by for-in loops. If native
+ // Symbols are available, fetch all of the descs object's own
+ // symbol properties and define them on our target object too.
+ if (Object.getOwnPropertySymbols) {
+ var objectSymbols = Object.getOwnPropertySymbols(descs);
+ for (var i = 0; i < objectSymbols.length; i++) {
+ var sym = objectSymbols[i];
+ var desc = descs[sym];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, sym, desc);
+ }
+ }
+ return obj;
+ }
+`;
+helpers.defaults = helper("7.0.0-beta.0")`
+ export default function _defaults(obj, defaults) {
+ var keys = Object.getOwnPropertyNames(defaults);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = Object.getOwnPropertyDescriptor(defaults, key);
+ if (value && value.configurable && obj[key] === undefined) {
+ Object.defineProperty(obj, key, value);
+ }
+ }
+ return obj;
+ }
+`;
+helpers.defineProperty = helper("7.0.0-beta.0")`
+ export default function _defineProperty(obj, key, value) {
+ // Shortcircuit the slow defineProperty path when possible.
+ // We are trying to avoid issues where setters defined on the
+ // prototype cause side effects under the fast path of simple
+ // assignment. By checking for existence of the property with
+ // the in operator, we can optimize most of this overhead away.
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+ return obj;
+ }
+`;
+helpers.extends = helper("7.0.0-beta.0")`
+ export default function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
+ }
+`;
+helpers.objectSpread = helper("7.0.0-beta.0")`
+ import defineProperty from "defineProperty";
+
+ export default function _objectSpread(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = (arguments[i] != null) ? Object(arguments[i]) : {};
+ var ownKeys = Object.keys(source);
+ if (typeof Object.getOwnPropertySymbols === 'function') {
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ }));
+ }
+ ownKeys.forEach(function(key) {
+ defineProperty(target, key, source[key]);
+ });
+ }
+ return target;
+ }
+`;
+helpers.objectSpread2 = helper("7.5.0")`
+ import defineProperty from "defineProperty";
+
+ // This function is different to "Reflect.ownKeys". The enumerableOnly
+ // filters on symbol properties only. Returned string properties are always
+ // enumerable. It is good to use in objectSpread.
+
+ function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ keys.push.apply(keys, symbols);
+ }
+ return keys;
+ }
+
+ export default function _objectSpread2(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = (arguments[i] != null) ? arguments[i] : {};
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(
+ target,
+ key,
+ Object.getOwnPropertyDescriptor(source, key)
+ );
+ });
+ }
+ }
+ return target;
+ }
+`;
+helpers.inherits = helper("7.0.0-beta.0")`
+ import setPrototypeOf from "setPrototypeOf";
+
+ export default function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) setPrototypeOf(subClass, superClass);
+ }
+`;
+helpers.inheritsLoose = helper("7.0.0-beta.0")`
+ export default function _inheritsLoose(subClass, superClass) {
+ subClass.prototype = Object.create(superClass.prototype);
+ subClass.prototype.constructor = subClass;
+ subClass.__proto__ = superClass;
+ }
+`;
+helpers.getPrototypeOf = helper("7.0.0-beta.0")`
+ export default function _getPrototypeOf(o) {
+ _getPrototypeOf = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+ }
+`;
+helpers.setPrototypeOf = helper("7.0.0-beta.0")`
+ export default function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+ return _setPrototypeOf(o, p);
+ }
+`;
+helpers.isNativeReflectConstruct = helper("7.9.0")`
+ export default function _isNativeReflectConstruct() {
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+
+ // core-js@3
+ if (Reflect.construct.sham) return false;
+
+ // Proxy can't be polyfilled. Every browser implemented
+ // proxies before or at the same time as Reflect.construct,
+ // so if they support Proxy they also support Reflect.construct.
+ if (typeof Proxy === "function") return true;
+
+ // Since Reflect.construct can't be properly polyfilled, some
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
+ // Those polyfills don't allow us to subclass built-ins, so we need to
+ // use our fallback implementation.
+ try {
+ // If the internal slots aren't set, this throws an error similar to
+ // TypeError: this is not a Date object.
+ Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
+`;
+helpers.construct = helper("7.0.0-beta.0")`
+ import setPrototypeOf from "setPrototypeOf";
+ import isNativeReflectConstruct from "isNativeReflectConstruct";
+
+ export default function _construct(Parent, args, Class) {
+ if (isNativeReflectConstruct()) {
+ _construct = Reflect.construct;
+ } else {
+ // NOTE: If Parent !== Class, the correct __proto__ is set *after*
+ // calling the constructor.
+ _construct = function _construct(Parent, args, Class) {
+ var a = [null];
+ a.push.apply(a, args);
+ var Constructor = Function.bind.apply(Parent, a);
+ var instance = new Constructor();
+ if (Class) setPrototypeOf(instance, Class.prototype);
+ return instance;
+ };
+ }
+ // Avoid issues with Class being present but undefined when it wasn't
+ // present in the original call.
+ return _construct.apply(null, arguments);
+ }
+`;
+helpers.isNativeFunction = helper("7.0.0-beta.0")`
+ export default function _isNativeFunction(fn) {
+ // Note: This function returns "true" for core-js functions.
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
+ }
+`;
+helpers.wrapNativeSuper = helper("7.0.0-beta.0")`
+ import getPrototypeOf from "getPrototypeOf";
+ import setPrototypeOf from "setPrototypeOf";
+ import isNativeFunction from "isNativeFunction";
+ import construct from "construct";
+
+ export default function _wrapNativeSuper(Class) {
+ var _cache = typeof Map === "function" ? new Map() : undefined;
+
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
+ if (Class === null || !isNativeFunction(Class)) return Class;
+ if (typeof Class !== "function") {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+ if (typeof _cache !== "undefined") {
+ if (_cache.has(Class)) return _cache.get(Class);
+ _cache.set(Class, Wrapper);
+ }
+ function Wrapper() {
+ return construct(Class, arguments, getPrototypeOf(this).constructor)
+ }
+ Wrapper.prototype = Object.create(Class.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: false,
+ writable: true,
+ configurable: true,
+ }
+ });
+
+ return setPrototypeOf(Wrapper, Class);
+ }
+
+ return _wrapNativeSuper(Class)
+ }
+`;
+helpers.instanceof = helper("7.0.0-beta.0")`
+ export default function _instanceof(left, right) {
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
+ return !!right[Symbol.hasInstance](left);
+ } else {
+ return left instanceof right;
+ }
+ }
+`;
+helpers.interopRequireDefault = helper("7.0.0-beta.0")`
+ export default function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : { default: obj };
+ }
+`;
+helpers.interopRequireWildcard = helper("7.0.0-beta.0")`
+ function _getRequireWildcardCache() {
+ if (typeof WeakMap !== "function") return null;
+
+ var cache = new WeakMap();
+ _getRequireWildcardCache = function () { return cache; };
+ return cache;
+ }
+
+ export default function _interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ }
+
+ if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
+ return { default: obj }
+ }
+
+ var cache = _getRequireWildcardCache();
+ if (cache && cache.has(obj)) {
+ return cache.get(obj);
+ }
+
+ var newObj = {};
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = hasPropertyDescriptor
+ ? Object.getOwnPropertyDescriptor(obj, key)
+ : null;
+ if (desc && (desc.get || desc.set)) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ newObj.default = obj;
+ if (cache) {
+ cache.set(obj, newObj);
+ }
+ return newObj;
+ }
+`;
+helpers.newArrowCheck = helper("7.0.0-beta.0")`
+ export default function _newArrowCheck(innerThis, boundThis) {
+ if (innerThis !== boundThis) {
+ throw new TypeError("Cannot instantiate an arrow function");
+ }
+ }
+`;
+helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")`
+ export default function _objectDestructuringEmpty(obj) {
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
+ }
+`;
+helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")`
+ export default function _objectWithoutPropertiesLoose(source, excluded) {
+ if (source == null) return {};
+
+ var target = {};
+ var sourceKeys = Object.keys(source);
+ var key, i;
+
+ for (i = 0; i < sourceKeys.length; i++) {
+ key = sourceKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ target[key] = source[key];
+ }
+
+ return target;
+ }
+`;
+helpers.objectWithoutProperties = helper("7.0.0-beta.0")`
+ import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose";
+
+ export default function _objectWithoutProperties(source, excluded) {
+ if (source == null) return {};
+
+ var target = objectWithoutPropertiesLoose(source, excluded);
+ var key, i;
+
+ if (Object.getOwnPropertySymbols) {
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
+ key = sourceSymbolKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+ }
+`;
+helpers.assertThisInitialized = helper("7.0.0-beta.0")`
+ export default function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+ return self;
+ }
+`;
+helpers.possibleConstructorReturn = helper("7.0.0-beta.0")`
+ import assertThisInitialized from "assertThisInitialized";
+
+ export default function _possibleConstructorReturn(self, call) {
+ if (call && (typeof call === "object" || typeof call === "function")) {
+ return call;
+ }
+ return assertThisInitialized(self);
+ }
+`;
+helpers.createSuper = helper("7.9.0")`
+ import getPrototypeOf from "getPrototypeOf";
+ import isNativeReflectConstruct from "isNativeReflectConstruct";
+ import possibleConstructorReturn from "possibleConstructorReturn";
+
+ export default function _createSuper(Derived) {
+ var hasNativeReflectConstruct = isNativeReflectConstruct();
+
+ return function _createSuperInternal() {
+ var Super = getPrototypeOf(Derived), result;
+ if (hasNativeReflectConstruct) {
+ // NOTE: This doesn't work if this.__proto__.constructor has been modified.
+ var NewTarget = getPrototypeOf(this).constructor;
+ result = Reflect.construct(Super, arguments, NewTarget);
+ } else {
+ result = Super.apply(this, arguments);
+ }
+ return possibleConstructorReturn(this, result);
+ }
+ }
+ `;
+helpers.superPropBase = helper("7.0.0-beta.0")`
+ import getPrototypeOf from "getPrototypeOf";
+
+ export default function _superPropBase(object, property) {
+ // Yes, this throws if object is null to being with, that's on purpose.
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
+ object = getPrototypeOf(object);
+ if (object === null) break;
+ }
+ return object;
+ }
+`;
+helpers.get = helper("7.0.0-beta.0")`
+ import superPropBase from "superPropBase";
+
+ export default function _get(target, property, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.get) {
+ _get = Reflect.get;
+ } else {
+ _get = function _get(target, property, receiver) {
+ var base = superPropBase(target, property);
+
+ if (!base) return;
+
+ var desc = Object.getOwnPropertyDescriptor(base, property);
+ if (desc.get) {
+ return desc.get.call(receiver);
+ }
+
+ return desc.value;
+ };
+ }
+ return _get(target, property, receiver || target);
+ }
+`;
+helpers.set = helper("7.0.0-beta.0")`
+ import superPropBase from "superPropBase";
+ import defineProperty from "defineProperty";
+
+ function set(target, property, value, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.set) {
+ set = Reflect.set;
+ } else {
+ set = function set(target, property, value, receiver) {
+ var base = superPropBase(target, property);
+ var desc;
+
+ if (base) {
+ desc = Object.getOwnPropertyDescriptor(base, property);
+ if (desc.set) {
+ desc.set.call(receiver, value);
+ return true;
+ } else if (!desc.writable) {
+ // Both getter and non-writable fall into this.
+ return false;
+ }
+ }
+
+ // Without a super that defines the property, spec boils down to
+ // "define on receiver" for some reason.
+ desc = Object.getOwnPropertyDescriptor(receiver, property);
+ if (desc) {
+ if (!desc.writable) {
+ // Setter, getter, and non-writable fall into this.
+ return false;
+ }
+
+ desc.value = value;
+ Object.defineProperty(receiver, property, desc);
+ } else {
+ // Avoid setters that may be defined on Sub's prototype, but not on
+ // the instance.
+ defineProperty(receiver, property, value);
+ }
+
+ return true;
+ };
+ }
+
+ return set(target, property, value, receiver);
+ }
+
+ export default function _set(target, property, value, receiver, isStrict) {
+ var s = set(target, property, value, receiver || target);
+ if (!s && isStrict) {
+ throw new Error('failed to set property');
+ }
+
+ return value;
+ }
+`;
+helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")`
+ export default function _taggedTemplateLiteral(strings, raw) {
+ if (!raw) { raw = strings.slice(0); }
+ return Object.freeze(Object.defineProperties(strings, {
+ raw: { value: Object.freeze(raw) }
+ }));
+ }
+`;
+helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")`
+ export default function _taggedTemplateLiteralLoose(strings, raw) {
+ if (!raw) { raw = strings.slice(0); }
+ strings.raw = raw;
+ return strings;
+ }
+`;
+helpers.readOnlyError = helper("7.0.0-beta.0")`
+ export default function _readOnlyError(name) {
+ throw new TypeError("\\"" + name + "\\" is read-only");
+ }
+`;
+helpers.classNameTDZError = helper("7.0.0-beta.0")`
+ export default function _classNameTDZError(name) {
+ throw new Error("Class \\"" + name + "\\" cannot be referenced in computed property keys.");
+ }
+`;
+helpers.temporalUndefined = helper("7.0.0-beta.0")`
+ // This function isn't mean to be called, but to be used as a reference.
+ // We can't use a normal object because it isn't hoisted.
+ export default function _temporalUndefined() {}
+`;
+helpers.tdz = helper("7.5.5")`
+ export default function _tdzError(name) {
+ throw new ReferenceError(name + " is not defined - temporal dead zone");
+ }
+`;
+helpers.temporalRef = helper("7.0.0-beta.0")`
+ import undef from "temporalUndefined";
+ import err from "tdz";
+
+ export default function _temporalRef(val, name) {
+ return val === undef ? err(name) : val;
+ }
+`;
+helpers.slicedToArray = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArrayLimit from "iterableToArrayLimit";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _slicedToArray(arr, i) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArrayLimit(arr, i) ||
+ unsupportedIterableToArray(arr, i) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.slicedToArrayLoose = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArrayLimitLoose from "iterableToArrayLimitLoose";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _slicedToArrayLoose(arr, i) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArrayLimitLoose(arr, i) ||
+ unsupportedIterableToArray(arr, i) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.toArray = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArray from "iterableToArray";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _toArray(arr) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArray(arr) ||
+ unsupportedIterableToArray(arr) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.toConsumableArray = helper("7.0.0-beta.0")`
+ import arrayWithoutHoles from "arrayWithoutHoles";
+ import iterableToArray from "iterableToArray";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableSpread from "nonIterableSpread";
+
+ export default function _toConsumableArray(arr) {
+ return (
+ arrayWithoutHoles(arr) ||
+ iterableToArray(arr) ||
+ unsupportedIterableToArray(arr) ||
+ nonIterableSpread()
+ );
+ }
+`;
+helpers.arrayWithoutHoles = helper("7.0.0-beta.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) return arrayLikeToArray(arr);
+ }
+`;
+helpers.arrayWithHoles = helper("7.0.0-beta.0")`
+ export default function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+ }
+`;
+helpers.maybeArrayLike = helper("7.9.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _maybeArrayLike(next, arr, i) {
+ if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
+ var len = arr.length;
+ return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
+ }
+ return next(arr, i);
+ }
+`;
+helpers.iterableToArray = helper("7.0.0-beta.0")`
+ export default function _iterableToArray(iter) {
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
+ }
+`;
+helpers.iterableToArrayLimit = helper("7.0.0-beta.0")`
+ export default function _iterableToArrayLimit(arr, i) {
+ // this is an expanded form of \`for...of\` that properly supports abrupt completions of
+ // iterators etc. variable names have been minimised to reduce the size of this massive
+ // helper. sometimes spec compliance is annoying :(
+ //
+ // _n = _iteratorNormalCompletion
+ // _d = _didIteratorError
+ // _e = _iteratorError
+ // _i = _iterator
+ // _s = _step
+
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+ return _arr;
+ }
+`;
+helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")`
+ export default function _iterableToArrayLimitLoose(arr, i) {
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
+
+ var _arr = [];
+ for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
+ _arr.push(_step.value);
+ if (i && _arr.length === i) break;
+ }
+ return _arr;
+ }
+`;
+helpers.unsupportedIterableToArray = helper("7.9.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
+ return arrayLikeToArray(o, minLen);
+ }
+`;
+helpers.arrayLikeToArray = helper("7.9.0")`
+ export default function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+ return arr2;
+ }
+`;
+helpers.nonIterableSpread = helper("7.0.0-beta.0")`
+ export default function _nonIterableSpread() {
+ throw new TypeError(
+ "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+`;
+helpers.nonIterableRest = helper("7.0.0-beta.0")`
+ export default function _nonIterableRest() {
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+`;
+helpers.createForOfIteratorHelper = helper("7.9.0")`
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+
+ // s: start (create the iterator)
+ // n: next
+ // e: error (called whenever something throws)
+ // f: finish (always called at the end)
+
+ export default function _createForOfIteratorHelper(o, allowArrayLike) {
+ var it;
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ // Fallback for engines without symbol support
+ if (
+ Array.isArray(o) ||
+ (it = unsupportedIterableToArray(o)) ||
+ (allowArrayLike && o && typeof o.length === "number")
+ ) {
+ if (it) o = it;
+ var i = 0;
+ var F = function(){};
+ return {
+ s: F,
+ n: function() {
+ if (i >= o.length) return { done: true };
+ return { done: false, value: o[i++] };
+ },
+ e: function(e) { throw e; },
+ f: F,
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var normalCompletion = true, didErr = false, err;
+
+ return {
+ s: function() {
+ it = o[Symbol.iterator]();
+ },
+ n: function() {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function(e) {
+ didErr = true;
+ err = e;
+ },
+ f: function() {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+ }
+`;
+helpers.createForOfIteratorHelperLoose = helper("7.9.0")`
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+
+ export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
+ var it;
+
+ if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
+ // Fallback for engines without symbol support
+ if (
+ Array.isArray(o) ||
+ (it = unsupportedIterableToArray(o)) ||
+ (allowArrayLike && o && typeof o.length === "number")
+ ) {
+ if (it) o = it;
+ var i = 0;
+ return function() {
+ if (i >= o.length) return { done: true };
+ return { done: false, value: o[i++] };
+ }
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ it = o[Symbol.iterator]();
+ return it.next.bind(it);
+ }
+`;
+helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")`
+ export default function _skipFirstGeneratorNext(fn) {
+ return function () {
+ var it = fn.apply(this, arguments);
+ it.next();
+ return it;
+ }
+ }
+`;
+helpers.toPrimitive = helper("7.1.5")`
+ export default function _toPrimitive(
+ input,
+ hint /*: "default" | "string" | "number" | void */
+ ) {
+ if (typeof input !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if (typeof res !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return (hint === "string" ? String : Number)(input);
+ }
+`;
+helpers.toPropertyKey = helper("7.1.5")`
+ import toPrimitive from "toPrimitive";
+
+ export default function _toPropertyKey(arg) {
+ var key = toPrimitive(arg, "string");
+ return typeof key === "symbol" ? key : String(key);
+ }
+`;
+helpers.initializerWarningHelper = helper("7.0.0-beta.0")`
+ export default function _initializerWarningHelper(descriptor, context){
+ throw new Error(
+ 'Decorating class property failed. Please ensure that ' +
+ 'proposal-class-properties is enabled and runs after the decorators transform.'
+ );
+ }
+`;
+helpers.initializerDefineProperty = helper("7.0.0-beta.0")`
+ export default function _initializerDefineProperty(target, property, descriptor, context){
+ if (!descriptor) return;
+
+ Object.defineProperty(target, property, {
+ enumerable: descriptor.enumerable,
+ configurable: descriptor.configurable,
+ writable: descriptor.writable,
+ value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,
+ });
+ }
+`;
+helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")`
+ export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){
+ var desc = {};
+ Object.keys(descriptor).forEach(function(key){
+ desc[key] = descriptor[key];
+ });
+ desc.enumerable = !!desc.enumerable;
+ desc.configurable = !!desc.configurable;
+ if ('value' in desc || desc.initializer){
+ desc.writable = true;
+ }
+
+ desc = decorators.slice().reverse().reduce(function(desc, decorator){
+ return decorator(target, property, desc) || desc;
+ }, desc);
+
+ if (context && desc.initializer !== void 0){
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+ desc.initializer = undefined;
+ }
+
+ if (desc.initializer === void 0){
+ Object.defineProperty(target, property, desc);
+ desc = null;
+ }
+
+ return desc;
+ }
+`;
+helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")`
+ var id = 0;
+ export default function _classPrivateFieldKey(name) {
+ return "__private_" + (id++) + "_" + name;
+ }
+`;
+helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")`
+ export default function _classPrivateFieldBase(receiver, privateKey) {
+ if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
+ throw new TypeError("attempted to use private field on non-instance");
+ }
+ return receiver;
+ }
+`;
+helpers.classPrivateFieldGet = helper("7.0.0-beta.0")`
+ export default function _classPrivateFieldGet(receiver, privateMap) {
+ var descriptor = privateMap.get(receiver);
+ if (!descriptor) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+ if (descriptor.get) {
+ return descriptor.get.call(receiver);
+ }
+ return descriptor.value;
+ }
+`;
+helpers.classPrivateFieldSet = helper("7.0.0-beta.0")`
+ export default function _classPrivateFieldSet(receiver, privateMap, value) {
+ var descriptor = privateMap.get(receiver);
+ if (!descriptor) {
+ throw new TypeError("attempted to set private field on non-instance");
+ }
+ if (descriptor.set) {
+ descriptor.set.call(receiver, value);
+ } else {
+ if (!descriptor.writable) {
+ // This should only throw in strict mode, but class bodies are
+ // always strict and private fields can only be used inside
+ // class bodies.
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ descriptor.value = value;
+ }
+
+ return value;
+ }
+`;
+helpers.classPrivateFieldDestructureSet = helper("7.4.4")`
+ export default function _classPrivateFieldDestructureSet(receiver, privateMap) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to set private field on non-instance");
+ }
+ var descriptor = privateMap.get(receiver);
+ if (descriptor.set) {
+ if (!("__destrObj" in descriptor)) {
+ descriptor.__destrObj = {
+ set value(v) {
+ descriptor.set.call(receiver, v)
+ },
+ };
+ }
+ return descriptor.__destrObj;
+ } else {
+ if (!descriptor.writable) {
+ // This should only throw in strict mode, but class bodies are
+ // always strict and private fields can only be used inside
+ // class bodies.
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ return descriptor;
+ }
+ }
+`;
+helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")`
+ export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+ if (descriptor.get) {
+ return descriptor.get.call(receiver);
+ }
+ return descriptor.value;
+ }
+`;
+helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")`
+ export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+ if (descriptor.set) {
+ descriptor.set.call(receiver, value);
+ } else {
+ if (!descriptor.writable) {
+ // This should only throw in strict mode, but class bodies are
+ // always strict and private fields can only be used inside
+ // class bodies.
+ throw new TypeError("attempted to set read only private field");
+ }
+ descriptor.value = value;
+ }
+
+ return value;
+ }
+`;
+helpers.classStaticPrivateMethodGet = helper("7.3.2")`
+ export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+ return method;
+ }
+`;
+helpers.classStaticPrivateMethodSet = helper("7.3.2")`
+ export default function _classStaticPrivateMethodSet() {
+ throw new TypeError("attempted to set read only static private field");
+ }
+`;
+helpers.decorate = helper("7.1.5")`
+ import toArray from "toArray";
+ import toPropertyKey from "toPropertyKey";
+
+ // These comments are stripped by @babel/template
+ /*::
+ type PropertyDescriptor =
+ | {
+ value: any,
+ writable: boolean,
+ configurable: boolean,
+ enumerable: boolean,
+ }
+ | {
+ get?: () => any,
+ set?: (v: any) => void,
+ configurable: boolean,
+ enumerable: boolean,
+ };
+
+ type FieldDescriptor ={
+ writable: boolean,
+ configurable: boolean,
+ enumerable: boolean,
+ };
+
+ type Placement = "static" | "prototype" | "own";
+ type Key = string | symbol; // PrivateName is not supported yet.
+
+ type ElementDescriptor =
+ | {
+ kind: "method",
+ key: Key,
+ placement: Placement,
+ descriptor: PropertyDescriptor
+ }
+ | {
+ kind: "field",
+ key: Key,
+ placement: Placement,
+ descriptor: FieldDescriptor,
+ initializer?: () => any,
+ };
+
+ // This is exposed to the user code
+ type ElementObjectInput = ElementDescriptor & {
+ [@@toStringTag]?: "Descriptor"
+ };
+
+ // This is exposed to the user code
+ type ElementObjectOutput = ElementDescriptor & {
+ [@@toStringTag]?: "Descriptor"
+ extras?: ElementDescriptor[],
+ finisher?: ClassFinisher,
+ };
+
+ // This is exposed to the user code
+ type ClassObject = {
+ [@@toStringTag]?: "Descriptor",
+ kind: "class",
+ elements: ElementDescriptor[],
+ };
+
+ type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;
+ type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;
+ type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;
+
+ // Only used by Babel in the transform output, not part of the spec.
+ type ElementDefinition =
+ | {
+ kind: "method",
+ value: any,
+ key: Key,
+ static?: boolean,
+ decorators?: ElementDecorator[],
+ }
+ | {
+ kind: "field",
+ value: () => any,
+ key: Key,
+ static?: boolean,
+ decorators?: ElementDecorator[],
+ };
+
+ declare function ClassFactory<C>(initialize: (instance: C) => void): {
+ F: Class<C>,
+ d: ElementDefinition[]
+ }
+
+ */
+
+ /*::
+ // Various combinations with/without extras and with one or many finishers
+
+ type ElementFinisherExtras = {
+ element: ElementDescriptor,
+ finisher?: ClassFinisher,
+ extras?: ElementDescriptor[],
+ };
+
+ type ElementFinishersExtras = {
+ element: ElementDescriptor,
+ finishers: ClassFinisher[],
+ extras: ElementDescriptor[],
+ };
+
+ type ElementsFinisher = {
+ elements: ElementDescriptor[],
+ finisher?: ClassFinisher,
+ };
+
+ type ElementsFinishers = {
+ elements: ElementDescriptor[],
+ finishers: ClassFinisher[],
+ };
+
+ */
+
+ /*::
+
+ type Placements = {
+ static: Key[],
+ prototype: Key[],
+ own: Key[],
+ };
+
+ */
+
+ // ClassDefinitionEvaluation (Steps 26-*)
+ export default function _decorate(
+ decorators /*: ClassDecorator[] */,
+ factory /*: ClassFactory */,
+ superClass /*: ?Class<*> */,
+ mixins /*: ?Array<Function> */,
+ ) /*: Class<*> */ {
+ var api = _getDecoratorsApi();
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ api = mixins[i](api);
+ }
+ }
+
+ var r = factory(function initialize(O) {
+ api.initializeInstanceElements(O, decorated.elements);
+ }, superClass);
+ var decorated = api.decorateClass(
+ _coalesceClassElements(r.d.map(_createElementDescriptor)),
+ decorators,
+ );
+
+ api.initializeClassElements(r.F, decorated.elements);
+
+ return api.runClassFinishers(r.F, decorated.finishers);
+ }
+
+ function _getDecoratorsApi() {
+ _getDecoratorsApi = function() {
+ return api;
+ };
+
+ var api = {
+ elementsDefinitionOrder: [["method"], ["field"]],
+
+ // InitializeInstanceElements
+ initializeInstanceElements: function(
+ /*::<C>*/ O /*: C */,
+ elements /*: ElementDescriptor[] */,
+ ) {
+ ["method", "field"].forEach(function(kind) {
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ if (element.kind === kind && element.placement === "own") {
+ this.defineClassElement(O, element);
+ }
+ }, this);
+ }, this);
+ },
+
+ // InitializeClassElements
+ initializeClassElements: function(
+ /*::<C>*/ F /*: Class<C> */,
+ elements /*: ElementDescriptor[] */,
+ ) {
+ var proto = F.prototype;
+
+ ["method", "field"].forEach(function(kind) {
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ var placement = element.placement;
+ if (
+ element.kind === kind &&
+ (placement === "static" || placement === "prototype")
+ ) {
+ var receiver = placement === "static" ? F : proto;
+ this.defineClassElement(receiver, element);
+ }
+ }, this);
+ }, this);
+ },
+
+ // DefineClassElement
+ defineClassElement: function(
+ /*::<C>*/ receiver /*: C | Class<C> */,
+ element /*: ElementDescriptor */,
+ ) {
+ var descriptor /*: PropertyDescriptor */ = element.descriptor;
+ if (element.kind === "field") {
+ var initializer = element.initializer;
+ descriptor = {
+ enumerable: descriptor.enumerable,
+ writable: descriptor.writable,
+ configurable: descriptor.configurable,
+ value: initializer === void 0 ? void 0 : initializer.call(receiver),
+ };
+ }
+ Object.defineProperty(receiver, element.key, descriptor);
+ },
+
+ // DecorateClass
+ decorateClass: function(
+ elements /*: ElementDescriptor[] */,
+ decorators /*: ClassDecorator[] */,
+ ) /*: ElementsFinishers */ {
+ var newElements /*: ElementDescriptor[] */ = [];
+ var finishers /*: ClassFinisher[] */ = [];
+ var placements /*: Placements */ = {
+ static: [],
+ prototype: [],
+ own: [],
+ };
+
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ this.addElementPlacement(element, placements);
+ }, this);
+
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ if (!_hasDecorators(element)) return newElements.push(element);
+
+ var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(
+ element,
+ placements,
+ );
+ newElements.push(elementFinishersExtras.element);
+ newElements.push.apply(newElements, elementFinishersExtras.extras);
+ finishers.push.apply(finishers, elementFinishersExtras.finishers);
+ }, this);
+
+ if (!decorators) {
+ return { elements: newElements, finishers: finishers };
+ }
+
+ var result /*: ElementsFinishers */ = this.decorateConstructor(
+ newElements,
+ decorators,
+ );
+ finishers.push.apply(finishers, result.finishers);
+ result.finishers = finishers;
+
+ return result;
+ },
+
+ // AddElementPlacement
+ addElementPlacement: function(
+ element /*: ElementDescriptor */,
+ placements /*: Placements */,
+ silent /*: boolean */,
+ ) {
+ var keys = placements[element.placement];
+ if (!silent && keys.indexOf(element.key) !== -1) {
+ throw new TypeError("Duplicated element (" + element.key + ")");
+ }
+ keys.push(element.key);
+ },
+
+ // DecorateElement
+ decorateElement: function(
+ element /*: ElementDescriptor */,
+ placements /*: Placements */,
+ ) /*: ElementFinishersExtras */ {
+ var extras /*: ElementDescriptor[] */ = [];
+ var finishers /*: ClassFinisher[] */ = [];
+
+ for (
+ var decorators = element.decorators, i = decorators.length - 1;
+ i >= 0;
+ i--
+ ) {
+ // (inlined) RemoveElementPlacement
+ var keys = placements[element.placement];
+ keys.splice(keys.indexOf(element.key), 1);
+
+ var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(
+ element,
+ );
+ var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(
+ (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||
+ elementObject,
+ );
+
+ element = elementFinisherExtras.element;
+ this.addElementPlacement(element, placements);
+
+ if (elementFinisherExtras.finisher) {
+ finishers.push(elementFinisherExtras.finisher);
+ }
+
+ var newExtras /*: ElementDescriptor[] | void */ =
+ elementFinisherExtras.extras;
+ if (newExtras) {
+ for (var j = 0; j < newExtras.length; j++) {
+ this.addElementPlacement(newExtras[j], placements);
+ }
+ extras.push.apply(extras, newExtras);
+ }
+ }
+
+ return { element: element, finishers: finishers, extras: extras };
+ },
+
+ // DecorateConstructor
+ decorateConstructor: function(
+ elements /*: ElementDescriptor[] */,
+ decorators /*: ClassDecorator[] */,
+ ) /*: ElementsFinishers */ {
+ var finishers /*: ClassFinisher[] */ = [];
+
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var obj /*: ClassObject */ = this.fromClassDescriptor(elements);
+ var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(
+ (0, decorators[i])(obj) /*: ClassObject */ || obj,
+ );
+
+ if (elementsAndFinisher.finisher !== undefined) {
+ finishers.push(elementsAndFinisher.finisher);
+ }
+
+ if (elementsAndFinisher.elements !== undefined) {
+ elements = elementsAndFinisher.elements;
+
+ for (var j = 0; j < elements.length - 1; j++) {
+ for (var k = j + 1; k < elements.length; k++) {
+ if (
+ elements[j].key === elements[k].key &&
+ elements[j].placement === elements[k].placement
+ ) {
+ throw new TypeError(
+ "Duplicated element (" + elements[j].key + ")",
+ );
+ }
+ }
+ }
+ }
+ }
+
+ return { elements: elements, finishers: finishers };
+ },
+
+ // FromElementDescriptor
+ fromElementDescriptor: function(
+ element /*: ElementDescriptor */,
+ ) /*: ElementObject */ {
+ var obj /*: ElementObject */ = {
+ kind: element.kind,
+ key: element.key,
+ placement: element.placement,
+ descriptor: element.descriptor,
+ };
+
+ var desc = {
+ value: "Descriptor",
+ configurable: true,
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+
+ if (element.kind === "field") obj.initializer = element.initializer;
+
+ return obj;
+ },
+
+ // ToElementDescriptors
+ toElementDescriptors: function(
+ elementObjects /*: ElementObject[] */,
+ ) /*: ElementDescriptor[] */ {
+ if (elementObjects === undefined) return;
+ return toArray(elementObjects).map(function(elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+ this.disallowProperty(elementObject, "finisher", "An element descriptor");
+ this.disallowProperty(elementObject, "extras", "An element descriptor");
+ return element;
+ }, this);
+ },
+
+ // ToElementDescriptor
+ toElementDescriptor: function(
+ elementObject /*: ElementObject */,
+ ) /*: ElementDescriptor */ {
+ var kind = String(elementObject.kind);
+ if (kind !== "method" && kind !== "field") {
+ throw new TypeError(
+ 'An element descriptor\\'s .kind property must be either "method" or' +
+ ' "field", but a decorator created an element descriptor with' +
+ ' .kind "' +
+ kind +
+ '"',
+ );
+ }
+
+ var key = toPropertyKey(elementObject.key);
+
+ var placement = String(elementObject.placement);
+ if (
+ placement !== "static" &&
+ placement !== "prototype" &&
+ placement !== "own"
+ ) {
+ throw new TypeError(
+ 'An element descriptor\\'s .placement property must be one of "static",' +
+ ' "prototype" or "own", but a decorator created an element descriptor' +
+ ' with .placement "' +
+ placement +
+ '"',
+ );
+ }
+
+ var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;
+
+ this.disallowProperty(elementObject, "elements", "An element descriptor");
+
+ var element /*: ElementDescriptor */ = {
+ kind: kind,
+ key: key,
+ placement: placement,
+ descriptor: Object.assign({}, descriptor),
+ };
+
+ if (kind !== "field") {
+ this.disallowProperty(elementObject, "initializer", "A method descriptor");
+ } else {
+ this.disallowProperty(
+ descriptor,
+ "get",
+ "The property descriptor of a field descriptor",
+ );
+ this.disallowProperty(
+ descriptor,
+ "set",
+ "The property descriptor of a field descriptor",
+ );
+ this.disallowProperty(
+ descriptor,
+ "value",
+ "The property descriptor of a field descriptor",
+ );
+
+ element.initializer = elementObject.initializer;
+ }
+
+ return element;
+ },
+
+ toElementFinisherExtras: function(
+ elementObject /*: ElementObject */,
+ ) /*: ElementFinisherExtras */ {
+ var element /*: ElementDescriptor */ = this.toElementDescriptor(
+ elementObject,
+ );
+ var finisher /*: ClassFinisher */ = _optionalCallableProperty(
+ elementObject,
+ "finisher",
+ );
+ var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(
+ elementObject.extras,
+ );
+
+ return { element: element, finisher: finisher, extras: extras };
+ },
+
+ // FromClassDescriptor
+ fromClassDescriptor: function(
+ elements /*: ElementDescriptor[] */,
+ ) /*: ClassObject */ {
+ var obj = {
+ kind: "class",
+ elements: elements.map(this.fromElementDescriptor, this),
+ };
+
+ var desc = { value: "Descriptor", configurable: true };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+
+ return obj;
+ },
+
+ // ToClassDescriptor
+ toClassDescriptor: function(
+ obj /*: ClassObject */,
+ ) /*: ElementsFinisher */ {
+ var kind = String(obj.kind);
+ if (kind !== "class") {
+ throw new TypeError(
+ 'A class descriptor\\'s .kind property must be "class", but a decorator' +
+ ' created a class descriptor with .kind "' +
+ kind +
+ '"',
+ );
+ }
+
+ this.disallowProperty(obj, "key", "A class descriptor");
+ this.disallowProperty(obj, "placement", "A class descriptor");
+ this.disallowProperty(obj, "descriptor", "A class descriptor");
+ this.disallowProperty(obj, "initializer", "A class descriptor");
+ this.disallowProperty(obj, "extras", "A class descriptor");
+
+ var finisher = _optionalCallableProperty(obj, "finisher");
+ var elements = this.toElementDescriptors(obj.elements);
+
+ return { elements: elements, finisher: finisher };
+ },
+
+ // RunClassFinishers
+ runClassFinishers: function(
+ constructor /*: Class<*> */,
+ finishers /*: ClassFinisher[] */,
+ ) /*: Class<*> */ {
+ for (var i = 0; i < finishers.length; i++) {
+ var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);
+ if (newConstructor !== undefined) {
+ // NOTE: This should check if IsConstructor(newConstructor) is false.
+ if (typeof newConstructor !== "function") {
+ throw new TypeError("Finishers must return a constructor.");
+ }
+ constructor = newConstructor;
+ }
+ }
+ return constructor;
+ },
+
+ disallowProperty: function(obj, name, objectType) {
+ if (obj[name] !== undefined) {
+ throw new TypeError(objectType + " can't have a ." + name + " property.");
+ }
+ }
+ };
+
+ return api;
+ }
+
+ // ClassElementEvaluation
+ function _createElementDescriptor(
+ def /*: ElementDefinition */,
+ ) /*: ElementDescriptor */ {
+ var key = toPropertyKey(def.key);
+
+ var descriptor /*: PropertyDescriptor */;
+ if (def.kind === "method") {
+ descriptor = {
+ value: def.value,
+ writable: true,
+ configurable: true,
+ enumerable: false,
+ };
+ } else if (def.kind === "get") {
+ descriptor = { get: def.value, configurable: true, enumerable: false };
+ } else if (def.kind === "set") {
+ descriptor = { set: def.value, configurable: true, enumerable: false };
+ } else if (def.kind === "field") {
+ descriptor = { configurable: true, writable: true, enumerable: true };
+ }
+
+ var element /*: ElementDescriptor */ = {
+ kind: def.kind === "field" ? "field" : "method",
+ key: key,
+ placement: def.static
+ ? "static"
+ : def.kind === "field"
+ ? "own"
+ : "prototype",
+ descriptor: descriptor,
+ };
+ if (def.decorators) element.decorators = def.decorators;
+ if (def.kind === "field") element.initializer = def.value;
+
+ return element;
+ }
+
+ // CoalesceGetterSetter
+ function _coalesceGetterSetter(
+ element /*: ElementDescriptor */,
+ other /*: ElementDescriptor */,
+ ) {
+ if (element.descriptor.get !== undefined) {
+ other.descriptor.get = element.descriptor.get;
+ } else {
+ other.descriptor.set = element.descriptor.set;
+ }
+ }
+
+ // CoalesceClassElements
+ function _coalesceClassElements(
+ elements /*: ElementDescriptor[] */,
+ ) /*: ElementDescriptor[] */ {
+ var newElements /*: ElementDescriptor[] */ = [];
+
+ var isSameElement = function(
+ other /*: ElementDescriptor */,
+ ) /*: boolean */ {
+ return (
+ other.kind === "method" &&
+ other.key === element.key &&
+ other.placement === element.placement
+ );
+ };
+
+ for (var i = 0; i < elements.length; i++) {
+ var element /*: ElementDescriptor */ = elements[i];
+ var other /*: ElementDescriptor */;
+
+ if (
+ element.kind === "method" &&
+ (other = newElements.find(isSameElement))
+ ) {
+ if (
+ _isDataDescriptor(element.descriptor) ||
+ _isDataDescriptor(other.descriptor)
+ ) {
+ if (_hasDecorators(element) || _hasDecorators(other)) {
+ throw new ReferenceError(
+ "Duplicated methods (" + element.key + ") can't be decorated.",
+ );
+ }
+ other.descriptor = element.descriptor;
+ } else {
+ if (_hasDecorators(element)) {
+ if (_hasDecorators(other)) {
+ throw new ReferenceError(
+ "Decorators can't be placed on different accessors with for " +
+ "the same property (" +
+ element.key +
+ ").",
+ );
+ }
+ other.decorators = element.decorators;
+ }
+ _coalesceGetterSetter(element, other);
+ }
+ } else {
+ newElements.push(element);
+ }
+ }
+
+ return newElements;
+ }
+
+ function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {
+ return element.decorators && element.decorators.length;
+ }
+
+ function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {
+ return (
+ desc !== undefined &&
+ !(desc.value === undefined && desc.writable === undefined)
+ );
+ }
+
+ function _optionalCallableProperty /*::<T>*/(
+ obj /*: T */,
+ name /*: $Keys<T> */,
+ ) /*: ?Function */ {
+ var value = obj[name];
+ if (value !== undefined && typeof value !== "function") {
+ throw new TypeError("Expected '" + name + "' to be a function");
+ }
+ return value;
+ }
+
+`;
+helpers.classPrivateMethodGet = helper("7.1.6")`
+ export default function _classPrivateMethodGet(receiver, privateSet, fn) {
+ if (!privateSet.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+ return fn;
+ }
+`;
+helpers.classPrivateMethodSet = helper("7.1.6")`
+ export default function _classPrivateMethodSet() {
+ throw new TypeError("attempted to reassign private method");
+ }
+`;
+helpers.wrapRegExp = helper("7.2.6")`
+ import wrapNativeSuper from "wrapNativeSuper";
+ import getPrototypeOf from "getPrototypeOf";
+ import possibleConstructorReturn from "possibleConstructorReturn";
+ import inherits from "inherits";
+
+ export default function _wrapRegExp(re, groups) {
+ _wrapRegExp = function(re, groups) {
+ return new BabelRegExp(re, undefined, groups);
+ };
+
+ var _RegExp = wrapNativeSuper(RegExp);
+ var _super = RegExp.prototype;
+ var _groups = new WeakMap();
+
+ function BabelRegExp(re, flags, groups) {
+ var _this = _RegExp.call(this, re, flags);
+ // if the regex is recreated with 'g' flag
+ _groups.set(_this, groups || _groups.get(re));
+ return _this;
+ }
+ inherits(BabelRegExp, _RegExp);
+
+ BabelRegExp.prototype.exec = function(str) {
+ var result = _super.exec.call(this, str);
+ if (result) result.groups = buildGroups(result, this);
+ return result;
+ };
+ BabelRegExp.prototype[Symbol.replace] = function(str, substitution) {
+ if (typeof substitution === "string") {
+ var groups = _groups.get(this);
+ return _super[Symbol.replace].call(
+ this,
+ str,
+ substitution.replace(/\\$<([^>]+)>/g, function(_, name) {
+ return "$" + groups[name];
+ })
+ );
+ } else if (typeof substitution === "function") {
+ var _this = this;
+ return _super[Symbol.replace].call(
+ this,
+ str,
+ function() {
+ var args = [];
+ args.push.apply(args, arguments);
+ if (typeof args[args.length - 1] !== "object") {
+ // Modern engines already pass result.groups as the last arg.
+ args.push(buildGroups(args, _this));
+ }
+ return substitution.apply(this, args);
+ }
+ );
+ } else {
+ return _super[Symbol.replace].call(this, str, substitution);
+ }
+ }
+
+ function buildGroups(result, re) {
+ // NOTE: This function should return undefined if there are no groups,
+ // but in that case Babel doesn't add the wrapper anyway.
+
+ var g = _groups.get(re);
+ return Object.keys(g).reduce(function(groups, name) {
+ groups[name] = result[g[name]];
+ return groups;
+ }, Object.create(null));
+ }
+
+ return _wrapRegExp.apply(this, arguments);
+ }
+`; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js
new file mode 100644
index 00000000000..f122ac096cc
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helpers/lib/index.js
@@ -0,0 +1,295 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.get = get;
+exports.minVersion = minVersion;
+exports.getDependencies = getDependencies;
+exports.ensure = ensure;
+exports.default = exports.list = void 0;
+
+var _traverse = _interopRequireDefault(require("@babel/traverse"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _helpers = _interopRequireDefault(require("./helpers"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function makePath(path) {
+ const parts = [];
+
+ for (; path.parentPath; path = path.parentPath) {
+ parts.push(path.key);
+ if (path.inList) parts.push(path.listKey);
+ }
+
+ return parts.reverse().join(".");
+}
+
+let fileClass = undefined;
+
+function getHelperMetadata(file) {
+ const globals = new Set();
+ const localBindingNames = new Set();
+ const dependencies = new Map();
+ let exportName;
+ let exportPath;
+ const exportBindingAssignments = [];
+ const importPaths = [];
+ const importBindingsReferences = [];
+ const dependencyVisitor = {
+ ImportDeclaration(child) {
+ const name = child.node.source.value;
+
+ if (!_helpers.default[name]) {
+ throw child.buildCodeFrameError(`Unknown helper ${name}`);
+ }
+
+ if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) {
+ throw child.buildCodeFrameError("Helpers can only import a default value");
+ }
+
+ const bindingIdentifier = child.node.specifiers[0].local;
+ dependencies.set(bindingIdentifier, name);
+ importPaths.push(makePath(child));
+ },
+
+ ExportDefaultDeclaration(child) {
+ const decl = child.get("declaration");
+
+ if (decl.isFunctionDeclaration()) {
+ if (!decl.node.id) {
+ throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration");
+ }
+
+ exportName = decl.node.id.name;
+ }
+
+ exportPath = makePath(child);
+ },
+
+ ExportAllDeclaration(child) {
+ throw child.buildCodeFrameError("Helpers can only export default");
+ },
+
+ ExportNamedDeclaration(child) {
+ throw child.buildCodeFrameError("Helpers can only export default");
+ },
+
+ Statement(child) {
+ if (child.isModuleDeclaration()) return;
+ child.skip();
+ }
+
+ };
+ const referenceVisitor = {
+ Program(path) {
+ const bindings = path.scope.getAllBindings();
+ Object.keys(bindings).forEach(name => {
+ if (name === exportName) return;
+ if (dependencies.has(bindings[name].identifier)) return;
+ localBindingNames.add(name);
+ });
+ },
+
+ ReferencedIdentifier(child) {
+ const name = child.node.name;
+ const binding = child.scope.getBinding(name, true);
+
+ if (!binding) {
+ globals.add(name);
+ } else if (dependencies.has(binding.identifier)) {
+ importBindingsReferences.push(makePath(child));
+ }
+ },
+
+ AssignmentExpression(child) {
+ const left = child.get("left");
+ if (!(exportName in left.getBindingIdentifiers())) return;
+
+ if (!left.isIdentifier()) {
+ throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");
+ }
+
+ const binding = child.scope.getBinding(exportName);
+
+ if (binding == null ? void 0 : binding.scope.path.isProgram()) {
+ exportBindingAssignments.push(makePath(child));
+ }
+ }
+
+ };
+ (0, _traverse.default)(file.ast, dependencyVisitor, file.scope);
+ (0, _traverse.default)(file.ast, referenceVisitor, file.scope);
+ if (!exportPath) throw new Error("Helpers must default-export something.");
+ exportBindingAssignments.reverse();
+ return {
+ globals: Array.from(globals),
+ localBindingNames: Array.from(localBindingNames),
+ dependencies,
+ exportBindingAssignments,
+ exportPath,
+ exportName,
+ importBindingsReferences,
+ importPaths
+ };
+}
+
+function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
+ if (localBindings && !id) {
+ throw new Error("Unexpected local bindings for module-based helpers.");
+ }
+
+ if (!id) return;
+ const {
+ localBindingNames,
+ dependencies,
+ exportBindingAssignments,
+ exportPath,
+ exportName,
+ importBindingsReferences,
+ importPaths
+ } = metadata;
+ const dependenciesRefs = {};
+ dependencies.forEach((name, id) => {
+ dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id;
+ });
+ const toRename = {};
+ const bindings = new Set(localBindings || []);
+ localBindingNames.forEach(name => {
+ let newName = name;
+
+ while (bindings.has(newName)) newName = "_" + newName;
+
+ if (newName !== name) toRename[name] = newName;
+ });
+
+ if (id.type === "Identifier" && exportName !== id.name) {
+ toRename[exportName] = id.name;
+ }
+
+ const visitor = {
+ Program(path) {
+ const exp = path.get(exportPath);
+ const imps = importPaths.map(p => path.get(p));
+ const impsBindingRefs = importBindingsReferences.map(p => path.get(p));
+ const decl = exp.get("declaration");
+
+ if (id.type === "Identifier") {
+ if (decl.isFunctionDeclaration()) {
+ exp.replaceWith(decl);
+ } else {
+ exp.replaceWith(t.variableDeclaration("var", [t.variableDeclarator(id, decl.node)]));
+ }
+ } else if (id.type === "MemberExpression") {
+ if (decl.isFunctionDeclaration()) {
+ exportBindingAssignments.forEach(assignPath => {
+ const assign = path.get(assignPath);
+ assign.replaceWith(t.assignmentExpression("=", id, assign.node));
+ });
+ exp.replaceWith(decl);
+ path.pushContainer("body", t.expressionStatement(t.assignmentExpression("=", id, t.identifier(exportName))));
+ } else {
+ exp.replaceWith(t.expressionStatement(t.assignmentExpression("=", id, decl.node)));
+ }
+ } else {
+ throw new Error("Unexpected helper format.");
+ }
+
+ Object.keys(toRename).forEach(name => {
+ path.scope.rename(name, toRename[name]);
+ });
+
+ for (const path of imps) path.remove();
+
+ for (const path of impsBindingRefs) {
+ const node = t.cloneNode(dependenciesRefs[path.node.name]);
+ path.replaceWith(node);
+ }
+
+ path.stop();
+ }
+
+ };
+ (0, _traverse.default)(file.ast, visitor, file.scope);
+}
+
+const helperData = Object.create(null);
+
+function loadHelper(name) {
+ if (!helperData[name]) {
+ const helper = _helpers.default[name];
+
+ if (!helper) {
+ throw Object.assign(new ReferenceError(`Unknown helper ${name}`), {
+ code: "BABEL_HELPER_UNKNOWN",
+ helper: name
+ });
+ }
+
+ const fn = () => {
+ const file = {
+ ast: t.file(helper.ast())
+ };
+
+ if (fileClass) {
+ return new fileClass({
+ filename: `babel-helper://${name}`
+ }, file);
+ }
+
+ return file;
+ };
+
+ const metadata = getHelperMetadata(fn());
+ helperData[name] = {
+ build(getDependency, id, localBindings) {
+ const file = fn();
+ permuteHelperAST(file, metadata, id, localBindings, getDependency);
+ return {
+ nodes: file.ast.program.body,
+ globals: metadata.globals
+ };
+ },
+
+ minVersion() {
+ return helper.minVersion;
+ },
+
+ dependencies: metadata.dependencies
+ };
+ }
+
+ return helperData[name];
+}
+
+function get(name, getDependency, id, localBindings) {
+ return loadHelper(name).build(getDependency, id, localBindings);
+}
+
+function minVersion(name) {
+ return loadHelper(name).minVersion();
+}
+
+function getDependencies(name) {
+ return Array.from(loadHelper(name).dependencies.values());
+}
+
+function ensure(name, newFileClass) {
+ if (!fileClass) {
+ fileClass = newFileClass;
+ }
+
+ loadHelper(name);
+}
+
+const list = Object.keys(_helpers.default).map(name => name.replace(/^_/, "")).filter(name => name !== "__esModule");
+exports.list = list;
+var _default = get;
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/helpers/package.json b/tools/node_modules/@babel/core/node_modules/@babel/helpers/package.json
new file mode 100644
index 00000000000..a02b06a19cc
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/helpers/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@babel/helpers",
+ "version": "7.12.5",
+ "description": "Collection of helper functions used by Babel transforms.",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helpers"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/template": "^7.10.4",
+ "@babel/traverse": "^7.12.5",
+ "@babel/types": "^7.12.5"
+ },
+ "devDependencies": {
+ "@babel/helper-plugin-test-runner": "7.10.4"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/highlight/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md b/tools/node_modules/@babel/core/node_modules/@babel/highlight/README.md
index 72dae609459..72dae609459 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/README.md
+++ b/tools/node_modules/@babel/core/node_modules/@babel/highlight/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js
new file mode 100644
index 00000000000..b0d1be7f553
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/highlight/lib/index.js
@@ -0,0 +1,107 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.shouldHighlight = shouldHighlight;
+exports.getChalk = getChalk;
+exports.default = highlight;
+
+var _jsTokens = _interopRequireWildcard(require("js-tokens"));
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _chalk = _interopRequireDefault(require("chalk"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsx_tag: chalk.yellow,
+ punctuator: chalk.yellow,
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+const JSX_TAG = /^[a-z][\w-]*$/i;
+const BRACKET = /^[()[\]{}]$/;
+
+function getTokenType(match) {
+ const [offset, text] = match.slice(-2);
+ const token = (0, _jsTokens.matchToToken)(match);
+
+ if (token.type === "name") {
+ if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isReservedWord)(token.value)) {
+ return "keyword";
+ }
+
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
+ return "jsx_tag";
+ }
+
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
+
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
+
+ if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
+ return "punctuator";
+ }
+
+ return token.type;
+}
+
+function highlightTokens(defs, text) {
+ return text.replace(_jsTokens.default, function (...args) {
+ const type = getTokenType(args);
+ const colorize = defs[type];
+
+ if (colorize) {
+ return args[0].split(NEWLINE).map(str => colorize(str)).join("\n");
+ } else {
+ return args[0];
+ }
+ });
+}
+
+function shouldHighlight(options) {
+ return _chalk.default.supportsColor || options.forceColor;
+}
+
+function getChalk(options) {
+ let chalk = _chalk.default;
+
+ if (options.forceColor) {
+ chalk = new _chalk.default.constructor({
+ enabled: true,
+ level: 1
+ });
+ }
+
+ return chalk;
+}
+
+function highlight(code, options = {}) {
+ if (shouldHighlight(options)) {
+ const chalk = getChalk(options);
+ const defs = getDefs(chalk);
+ return highlightTokens(defs, code);
+ } else {
+ return code;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/highlight/package.json b/tools/node_modules/@babel/core/node_modules/@babel/highlight/package.json
new file mode 100644
index 00000000000..9ff510e69ee
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/highlight/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "@babel/highlight",
+ "version": "7.10.4",
+ "description": "Syntax highlight JavaScript strings for output in terminals.",
+ "author": "suchipi <me@suchipi.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-highlight"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "devDependencies": {
+ "strip-ansi": "^4.0.0"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/parser/LICENSE
index d4c7fc58380..d4c7fc58380 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/@babel/parser/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/parser/README.md b/tools/node_modules/@babel/core/node_modules/@babel/parser/README.md
new file mode 100644
index 00000000000..513748c3706
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/parser/README.md
@@ -0,0 +1,19 @@
+# @babel/parser
+
+> A JavaScript parser
+
+See our website [@babel/parser](https://babeljs.io/docs/en/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%20(babylon)%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/parser
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/parser --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/parser/bin/babel-parser.js b/tools/node_modules/@babel/core/node_modules/@babel/parser/bin/babel-parser.js
new file mode 100755
index 00000000000..3aca314533b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/parser/bin/babel-parser.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+/* eslint no-var: 0 */
+
+var parser = require("..");
+var fs = require("fs");
+
+var filename = process.argv[2];
+if (!filename) {
+ console.error("no filename specified");
+} else {
+ var file = fs.readFileSync(filename, "utf8");
+ var ast = parser.parse(file);
+
+ console.log(JSON.stringify(ast, null, " "));
+}
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/parser/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/parser/lib/index.js
new file mode 100644
index 00000000000..a37d8f6a4c8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/parser/lib/index.js
@@ -0,0 +1,13493 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+const beforeExpr = true;
+const startsExpr = true;
+const isLoop = true;
+const isAssign = true;
+const prefix = true;
+const postfix = true;
+class TokenType {
+ constructor(label, conf = {}) {
+ this.label = void 0;
+ this.keyword = void 0;
+ this.beforeExpr = void 0;
+ this.startsExpr = void 0;
+ this.rightAssociative = void 0;
+ this.isLoop = void 0;
+ this.isAssign = void 0;
+ this.prefix = void 0;
+ this.postfix = void 0;
+ this.binop = void 0;
+ this.updateContext = void 0;
+ this.label = label;
+ this.keyword = conf.keyword;
+ this.beforeExpr = !!conf.beforeExpr;
+ this.startsExpr = !!conf.startsExpr;
+ this.rightAssociative = !!conf.rightAssociative;
+ this.isLoop = !!conf.isLoop;
+ this.isAssign = !!conf.isAssign;
+ this.prefix = !!conf.prefix;
+ this.postfix = !!conf.postfix;
+ this.binop = conf.binop != null ? conf.binop : null;
+ this.updateContext = null;
+ }
+
+}
+const keywords = new Map();
+
+function createKeyword(name, options = {}) {
+ options.keyword = name;
+ const token = new TokenType(name, options);
+ keywords.set(name, token);
+ return token;
+}
+
+function createBinop(name, binop) {
+ return new TokenType(name, {
+ beforeExpr,
+ binop
+ });
+}
+
+const types = {
+ num: new TokenType("num", {
+ startsExpr
+ }),
+ bigint: new TokenType("bigint", {
+ startsExpr
+ }),
+ decimal: new TokenType("decimal", {
+ startsExpr
+ }),
+ regexp: new TokenType("regexp", {
+ startsExpr
+ }),
+ string: new TokenType("string", {
+ startsExpr
+ }),
+ name: new TokenType("name", {
+ startsExpr
+ }),
+ eof: new TokenType("eof"),
+ bracketL: new TokenType("[", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketHashL: new TokenType("#[", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketBarL: new TokenType("[|", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketR: new TokenType("]"),
+ bracketBarR: new TokenType("|]"),
+ braceL: new TokenType("{", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceBarL: new TokenType("{|", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceHashL: new TokenType("#{", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceR: new TokenType("}"),
+ braceBarR: new TokenType("|}"),
+ parenL: new TokenType("(", {
+ beforeExpr,
+ startsExpr
+ }),
+ parenR: new TokenType(")"),
+ comma: new TokenType(",", {
+ beforeExpr
+ }),
+ semi: new TokenType(";", {
+ beforeExpr
+ }),
+ colon: new TokenType(":", {
+ beforeExpr
+ }),
+ doubleColon: new TokenType("::", {
+ beforeExpr
+ }),
+ dot: new TokenType("."),
+ question: new TokenType("?", {
+ beforeExpr
+ }),
+ questionDot: new TokenType("?."),
+ arrow: new TokenType("=>", {
+ beforeExpr
+ }),
+ template: new TokenType("template"),
+ ellipsis: new TokenType("...", {
+ beforeExpr
+ }),
+ backQuote: new TokenType("`", {
+ startsExpr
+ }),
+ dollarBraceL: new TokenType("${", {
+ beforeExpr,
+ startsExpr
+ }),
+ at: new TokenType("@"),
+ hash: new TokenType("#", {
+ startsExpr
+ }),
+ interpreterDirective: new TokenType("#!..."),
+ eq: new TokenType("=", {
+ beforeExpr,
+ isAssign
+ }),
+ assign: new TokenType("_=", {
+ beforeExpr,
+ isAssign
+ }),
+ incDec: new TokenType("++/--", {
+ prefix,
+ postfix,
+ startsExpr
+ }),
+ bang: new TokenType("!", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ tilde: new TokenType("~", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ pipeline: createBinop("|>", 0),
+ nullishCoalescing: createBinop("??", 1),
+ logicalOR: createBinop("||", 1),
+ logicalAND: createBinop("&&", 2),
+ bitwiseOR: createBinop("|", 3),
+ bitwiseXOR: createBinop("^", 4),
+ bitwiseAND: createBinop("&", 5),
+ equality: createBinop("==/!=/===/!==", 6),
+ relational: createBinop("</>/<=/>=", 7),
+ bitShift: createBinop("<</>>/>>>", 8),
+ plusMin: new TokenType("+/-", {
+ beforeExpr,
+ binop: 9,
+ prefix,
+ startsExpr
+ }),
+ modulo: new TokenType("%", {
+ beforeExpr,
+ binop: 10,
+ startsExpr
+ }),
+ star: new TokenType("*", {
+ binop: 10
+ }),
+ slash: createBinop("/", 10),
+ exponent: new TokenType("**", {
+ beforeExpr,
+ binop: 11,
+ rightAssociative: true
+ }),
+ _break: createKeyword("break"),
+ _case: createKeyword("case", {
+ beforeExpr
+ }),
+ _catch: createKeyword("catch"),
+ _continue: createKeyword("continue"),
+ _debugger: createKeyword("debugger"),
+ _default: createKeyword("default", {
+ beforeExpr
+ }),
+ _do: createKeyword("do", {
+ isLoop,
+ beforeExpr
+ }),
+ _else: createKeyword("else", {
+ beforeExpr
+ }),
+ _finally: createKeyword("finally"),
+ _for: createKeyword("for", {
+ isLoop
+ }),
+ _function: createKeyword("function", {
+ startsExpr
+ }),
+ _if: createKeyword("if"),
+ _return: createKeyword("return", {
+ beforeExpr
+ }),
+ _switch: createKeyword("switch"),
+ _throw: createKeyword("throw", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _try: createKeyword("try"),
+ _var: createKeyword("var"),
+ _const: createKeyword("const"),
+ _while: createKeyword("while", {
+ isLoop
+ }),
+ _with: createKeyword("with"),
+ _new: createKeyword("new", {
+ beforeExpr,
+ startsExpr
+ }),
+ _this: createKeyword("this", {
+ startsExpr
+ }),
+ _super: createKeyword("super", {
+ startsExpr
+ }),
+ _class: createKeyword("class", {
+ startsExpr
+ }),
+ _extends: createKeyword("extends", {
+ beforeExpr
+ }),
+ _export: createKeyword("export"),
+ _import: createKeyword("import", {
+ startsExpr
+ }),
+ _null: createKeyword("null", {
+ startsExpr
+ }),
+ _true: createKeyword("true", {
+ startsExpr
+ }),
+ _false: createKeyword("false", {
+ startsExpr
+ }),
+ _in: createKeyword("in", {
+ beforeExpr,
+ binop: 7
+ }),
+ _instanceof: createKeyword("instanceof", {
+ beforeExpr,
+ binop: 7
+ }),
+ _typeof: createKeyword("typeof", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _void: createKeyword("void", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _delete: createKeyword("delete", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ })
+};
+
+const lineBreak = /\r\n?|[\n\u2028\u2029]/;
+const lineBreakG = new RegExp(lineBreak.source, "g");
+function isNewLine(code) {
+ switch (code) {
+ case 10:
+ case 13:
+ case 8232:
+ case 8233:
+ return true;
+
+ default:
+ return false;
+ }
+}
+const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
+function isWhitespace(code) {
+ switch (code) {
+ case 0x0009:
+ case 0x000b:
+ case 0x000c:
+ case 32:
+ case 160:
+ case 5760:
+ case 0x2000:
+ case 0x2001:
+ case 0x2002:
+ case 0x2003:
+ case 0x2004:
+ case 0x2005:
+ case 0x2006:
+ case 0x2007:
+ case 0x2008:
+ case 0x2009:
+ case 0x200a:
+ case 0x202f:
+ case 0x205f:
+ case 0x3000:
+ case 0xfeff:
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+class Position {
+ constructor(line, col) {
+ this.line = void 0;
+ this.column = void 0;
+ this.line = line;
+ this.column = col;
+ }
+
+}
+class SourceLocation {
+ constructor(start, end) {
+ this.start = void 0;
+ this.end = void 0;
+ this.filename = void 0;
+ this.identifierName = void 0;
+ this.start = start;
+ this.end = end;
+ }
+
+}
+function getLineInfo(input, offset) {
+ let line = 1;
+ let lineStart = 0;
+ let match;
+ lineBreakG.lastIndex = 0;
+
+ while ((match = lineBreakG.exec(input)) && match.index < offset) {
+ line++;
+ lineStart = lineBreakG.lastIndex;
+ }
+
+ return new Position(line, offset - lineStart);
+}
+
+class BaseParser {
+ constructor() {
+ this.sawUnambiguousESM = false;
+ this.ambiguousScriptDifferentAst = false;
+ }
+
+ hasPlugin(name) {
+ return this.plugins.has(name);
+ }
+
+ getPluginOption(plugin, name) {
+ if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];
+ }
+
+}
+
+function last(stack) {
+ return stack[stack.length - 1];
+}
+
+class CommentsParser extends BaseParser {
+ addComment(comment) {
+ if (this.filename) comment.loc.filename = this.filename;
+ this.state.trailingComments.push(comment);
+ this.state.leadingComments.push(comment);
+ }
+
+ adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
+ if (this.state.leadingComments.length === 0) {
+ return;
+ }
+
+ let lastElement = null;
+ let i = elements.length;
+
+ while (lastElement === null && i > 0) {
+ lastElement = elements[--i];
+ }
+
+ if (lastElement === null) {
+ return;
+ }
+
+ for (let j = 0; j < this.state.leadingComments.length; j++) {
+ if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
+ this.state.leadingComments.splice(j, 1);
+ j--;
+ }
+ }
+
+ const newTrailingComments = [];
+
+ for (let i = 0; i < this.state.leadingComments.length; i++) {
+ const leadingComment = this.state.leadingComments[i];
+
+ if (leadingComment.end < node.end) {
+ newTrailingComments.push(leadingComment);
+
+ if (!takeAllComments) {
+ this.state.leadingComments.splice(i, 1);
+ i--;
+ }
+ } else {
+ if (node.trailingComments === undefined) {
+ node.trailingComments = [];
+ }
+
+ node.trailingComments.push(leadingComment);
+ }
+ }
+
+ if (takeAllComments) this.state.leadingComments = [];
+
+ if (newTrailingComments.length > 0) {
+ lastElement.trailingComments = newTrailingComments;
+ } else if (lastElement.trailingComments !== undefined) {
+ lastElement.trailingComments = [];
+ }
+ }
+
+ processComment(node) {
+ if (node.type === "Program" && node.body.length > 0) return;
+ const stack = this.state.commentStack;
+ let firstChild, lastChild, trailingComments, i, j;
+
+ if (this.state.trailingComments.length > 0) {
+ if (this.state.trailingComments[0].start >= node.end) {
+ trailingComments = this.state.trailingComments;
+ this.state.trailingComments = [];
+ } else {
+ this.state.trailingComments.length = 0;
+ }
+ } else if (stack.length > 0) {
+ const lastInStack = last(stack);
+
+ if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
+ trailingComments = lastInStack.trailingComments;
+ delete lastInStack.trailingComments;
+ }
+ }
+
+ if (stack.length > 0 && last(stack).start >= node.start) {
+ firstChild = stack.pop();
+ }
+
+ while (stack.length > 0 && last(stack).start >= node.start) {
+ lastChild = stack.pop();
+ }
+
+ if (!lastChild && firstChild) lastChild = firstChild;
+
+ if (firstChild) {
+ switch (node.type) {
+ case "ObjectExpression":
+ this.adjustCommentsAfterTrailingComma(node, node.properties);
+ break;
+
+ case "ObjectPattern":
+ this.adjustCommentsAfterTrailingComma(node, node.properties, true);
+ break;
+
+ case "CallExpression":
+ this.adjustCommentsAfterTrailingComma(node, node.arguments);
+ break;
+
+ case "ArrayExpression":
+ this.adjustCommentsAfterTrailingComma(node, node.elements);
+ break;
+
+ case "ArrayPattern":
+ this.adjustCommentsAfterTrailingComma(node, node.elements, true);
+ break;
+ }
+ } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
+ this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
+ }
+
+ if (lastChild) {
+ if (lastChild.leadingComments) {
+ if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
+ node.leadingComments = lastChild.leadingComments;
+ delete lastChild.leadingComments;
+ } else {
+ for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
+ if (lastChild.leadingComments[i].end <= node.start) {
+ node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
+ break;
+ }
+ }
+ }
+ }
+ } else if (this.state.leadingComments.length > 0) {
+ if (last(this.state.leadingComments).end <= node.start) {
+ if (this.state.commentPreviousNode) {
+ for (j = 0; j < this.state.leadingComments.length; j++) {
+ if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
+ this.state.leadingComments.splice(j, 1);
+ j--;
+ }
+ }
+ }
+
+ if (this.state.leadingComments.length > 0) {
+ node.leadingComments = this.state.leadingComments;
+ this.state.leadingComments = [];
+ }
+ } else {
+ for (i = 0; i < this.state.leadingComments.length; i++) {
+ if (this.state.leadingComments[i].end > node.start) {
+ break;
+ }
+ }
+
+ const leadingComments = this.state.leadingComments.slice(0, i);
+
+ if (leadingComments.length) {
+ node.leadingComments = leadingComments;
+ }
+
+ trailingComments = this.state.leadingComments.slice(i);
+
+ if (trailingComments.length === 0) {
+ trailingComments = null;
+ }
+ }
+ }
+
+ this.state.commentPreviousNode = node;
+
+ if (trailingComments) {
+ if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
+ node.innerComments = trailingComments;
+ } else {
+ const firstTrailingCommentIndex = trailingComments.findIndex(comment => comment.end >= node.end);
+
+ if (firstTrailingCommentIndex > 0) {
+ node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
+ node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
+ } else {
+ node.trailingComments = trailingComments;
+ }
+ }
+ }
+
+ stack.push(node);
+ }
+
+}
+
+const ErrorMessages = Object.freeze({
+ AccessorIsGenerator: "A %0ter cannot be a generator",
+ ArgumentsInClass: "'arguments' is only allowed in functions and class methods",
+ AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block",
+ AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function",
+ AwaitExpressionFormalParameter: "await is not allowed in async function parameters",
+ AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules",
+ AwaitNotInAsyncFunction: "'await' is only allowed within async functions",
+ 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",
+ ConstructorClassField: "Classes may not have a field named 'constructor'",
+ ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'",
+ ConstructorIsAccessor: "Class constructor may not be an accessor",
+ ConstructorIsAsync: "Constructor can't be an async function",
+ ConstructorIsGenerator: "Constructor can't be a generator",
+ DeclarationMissingInitializer: "%0 require an initialization value",
+ DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax",
+ DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
+ DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
+ DecoratorSemicolon: "Decorators must not be followed by a semicolon",
+ DecoratorStaticBlock: "Decorators can't be used with a static block",
+ DeletePrivateField: "Deleting a private field is not allowed",
+ DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
+ DuplicateConstructor: "Duplicate constructor in the same class",
+ DuplicateDefaultExport: "Only one default export allowed per module.",
+ DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
+ DuplicateProto: "Redefinition of __proto__ property",
+ DuplicateRegExpFlags: "Duplicate regular expression flag",
+ DuplicateStaticBlock: "Duplicate static block in the same class",
+ ElementAfterRest: "Rest element must be last element",
+ EscapedCharNotAnIdentifier: "Invalid Unicode escape",
+ ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { %0 as '%1' } from 'some-module'`?",
+ ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'",
+ ForInOfLoopInitializer: "%0 loop variable declaration may not have an initializer",
+ GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block",
+ IllegalBreakContinue: "Unsyntactic %0",
+ IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list",
+ IllegalReturn: "'return' outside of function",
+ ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
+ ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments",
+ ImportCallArity: "import() requires exactly %0",
+ ImportCallNotNewExpression: "Cannot use new with import(...)",
+ ImportCallSpreadArgument: "... is not allowed in import()",
+ ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
+ ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`,
+ InvalidBigIntLiteral: "Invalid BigIntLiteral",
+ InvalidCodePoint: "Code point out of bounds",
+ InvalidDecimal: "Invalid decimal",
+ InvalidDigit: "Expected number in radix %0",
+ InvalidEscapeSequence: "Bad character escape sequence",
+ InvalidEscapeSequenceTemplate: "Invalid escape sequence in template",
+ InvalidEscapedReservedWord: "Escape sequence in keyword %0",
+ InvalidIdentifier: "Invalid identifier %0",
+ InvalidLhs: "Invalid left-hand side in %0",
+ InvalidLhsBinding: "Binding invalid left-hand side in %0",
+ InvalidNumber: "Invalid number",
+ InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'",
+ InvalidOrUnexpectedToken: "Unexpected character '%0'",
+ InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern",
+ InvalidPrivateFieldResolution: "Private name #%0 is not defined",
+ InvalidPropertyBindingPattern: "Binding member expression",
+ InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions",
+ InvalidRestAssignmentPattern: "Invalid rest operator's argument",
+ LabelRedeclaration: "Label '%0' is already declared",
+ LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
+ LineTerminatorBeforeArrow: "No line break is allowed before '=>'",
+ MalformedRegExpFlags: "Invalid regular expression flag",
+ MissingClassName: "A class name is required",
+ MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
+ MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX",
+ MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators",
+ ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`",
+ ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values",
+ ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes',
+ ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'",
+ ModuleExportUndefined: "Export '%0' is not defined",
+ MultipleDefaultsInSwitch: "Multiple default clauses",
+ NewlineAfterThrow: "Illegal newline after throw",
+ NoCatchOrFinally: "Missing catch or finally clause",
+ NumberIdentifier: "Identifier directly after number",
+ NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences",
+ ObsoleteAwaitStar: "await* has been removed from the async functions proposal. Use Promise.all() instead.",
+ OptionalChainingNoNew: "constructors in/after an Optional Chain are not allowed",
+ OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain",
+ ParamDupe: "Argument name clash",
+ PatternHasAccessor: "Object pattern can't contain getter or setter",
+ PatternHasMethod: "Object pattern can't contain methods",
+ PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized',
+ PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression",
+ PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression",
+ PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference",
+ PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding",
+ PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
+ PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`)",
+ PrivateNameRedeclaration: "Duplicate private name #%0",
+ RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
+ RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
+ RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",
+ RecordNoProto: "'__proto__' is not allowed in Record expressions",
+ RestTrailingComma: "Unexpected trailing comma after rest element",
+ SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",
+ StaticPrototype: "Classes may not have static property named prototype",
+ StrictDelete: "Deleting local variable in strict mode",
+ StrictEvalArguments: "Assigning to '%0' in strict mode",
+ StrictEvalArgumentsBinding: "Binding '%0' in strict mode",
+ StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block",
+ StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'",
+ StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode",
+ StrictWith: "'with' in strict mode",
+ SuperNotAllowed: "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
+ SuperPrivateField: "Private fields can't be accessed on super",
+ TrailingDecorator: "Decorators must be attached to a class element",
+ TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
+ TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'",
+ TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'",
+ UnexpectedArgumentPlaceholder: "Unexpected argument placeholder",
+ UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal',
+ UnexpectedDigitAfterHash: "Unexpected digit after hash token",
+ UnexpectedImportExport: "'import' and 'export' may only appear at the top level",
+ UnexpectedKeyword: "Unexpected keyword '%0'",
+ UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration",
+ UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context",
+ UnexpectedNewTarget: "new.target can only be used in functions",
+ UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits",
+ UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
+ UnexpectedReservedWord: "Unexpected reserved word '%0'",
+ UnexpectedSuper: "super is only allowed in object methods and classes",
+ UnexpectedToken: "Unexpected token '%0'",
+ UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
+ UnsupportedBind: "Binding should be performed on object property.",
+ UnsupportedDecoratorExport: "A decorated export must export a class declaration",
+ UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
+ UnsupportedImport: "import can only be used in import() or import.meta",
+ UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1",
+ UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters",
+ UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties",
+ UnsupportedSuper: "super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])",
+ UnterminatedComment: "Unterminated comment",
+ UnterminatedRegExp: "Unterminated regular expression",
+ UnterminatedString: "Unterminated string constant",
+ UnterminatedTemplate: "Unterminated template",
+ VarRedeclaration: "Identifier '%0' has already been declared",
+ YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator",
+ YieldInParameter: "Yield expression is not allowed in formal parameters",
+ ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0"
+});
+
+class ParserError extends CommentsParser {
+ getLocationForPosition(pos) {
+ let loc;
+ if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos);
+ return loc;
+ }
+
+ raise(pos, errorTemplate, ...params) {
+ return this.raiseWithData(pos, undefined, errorTemplate, ...params);
+ }
+
+ raiseWithData(pos, data, errorTemplate, ...params) {
+ const loc = this.getLocationForPosition(pos);
+ const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
+ return this._raise(Object.assign({
+ loc,
+ pos
+ }, data), message);
+ }
+
+ _raise(errorContext, message) {
+ const err = new SyntaxError(message);
+ Object.assign(err, errorContext);
+
+ if (this.options.errorRecovery) {
+ if (!this.isLookahead) this.state.errors.push(err);
+ return err;
+ } else {
+ throw err;
+ }
+ }
+
+}
+
+function isSimpleProperty(node) {
+ return node != null && node.type === "Property" && node.kind === "init" && node.method === false;
+}
+
+var estree = (superClass => class extends superClass {
+ estreeParseRegExpLiteral({
+ pattern,
+ flags
+ }) {
+ let regex = null;
+
+ try {
+ regex = new RegExp(pattern, flags);
+ } catch (e) {}
+
+ const node = this.estreeParseLiteral(regex);
+ node.regex = {
+ pattern,
+ flags
+ };
+ return node;
+ }
+
+ estreeParseBigIntLiteral(value) {
+ const bigInt = typeof BigInt !== "undefined" ? BigInt(value) : null;
+ const node = this.estreeParseLiteral(bigInt);
+ node.bigint = String(node.value || value);
+ return node;
+ }
+
+ estreeParseDecimalLiteral(value) {
+ const decimal = null;
+ const node = this.estreeParseLiteral(decimal);
+ node.decimal = String(node.value || value);
+ return node;
+ }
+
+ estreeParseLiteral(value) {
+ return this.parseLiteral(value, "Literal");
+ }
+
+ directiveToStmt(directive) {
+ const directiveLiteral = directive.value;
+ const stmt = this.startNodeAt(directive.start, directive.loc.start);
+ const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
+ expression.value = directiveLiteral.value;
+ expression.raw = directiveLiteral.extra.raw;
+ stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
+ stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
+ return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
+ }
+
+ initFunction(node, isAsync) {
+ super.initFunction(node, isAsync);
+ node.expression = false;
+ }
+
+ checkDeclaration(node) {
+ if (isSimpleProperty(node)) {
+ this.checkDeclaration(node.value);
+ } else {
+ super.checkDeclaration(node);
+ }
+ }
+
+ getObjectOrClassMethodParams(method) {
+ return method.value.params;
+ }
+
+ checkLVal(expr, contextDescription, ...args) {
+ switch (expr.type) {
+ case "ObjectPattern":
+ expr.properties.forEach(prop => {
+ this.checkLVal(prop.type === "Property" ? prop.value : prop, "object destructuring pattern", ...args);
+ });
+ break;
+
+ default:
+ super.checkLVal(expr, contextDescription, ...args);
+ }
+ }
+
+ checkProto(prop, isRecord, protoRef, refExpressionErrors) {
+ if (prop.method) {
+ return;
+ }
+
+ super.checkProto(prop, isRecord, protoRef, refExpressionErrors);
+ }
+
+ isValidDirective(stmt) {
+ var _stmt$expression$extr;
+
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) == null ? void 0 : _stmt$expression$extr.parenthesized);
+ }
+
+ stmtToDirective(stmt) {
+ const directive = super.stmtToDirective(stmt);
+ const value = stmt.expression.value;
+ directive.value.value = value;
+ return directive;
+ }
+
+ parseBlockBody(node, allowDirectives, topLevel, end) {
+ super.parseBlockBody(node, allowDirectives, topLevel, end);
+ const directiveStatements = node.directives.map(d => this.directiveToStmt(d));
+ node.body = directiveStatements.concat(node.body);
+ delete node.directives;
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
+
+ if (method.typeParameters) {
+ method.value.typeParameters = method.typeParameters;
+ delete method.typeParameters;
+ }
+
+ classBody.body.push(method);
+ }
+
+ parseExprAtom(refExpressionErrors) {
+ switch (this.state.type) {
+ case types.num:
+ case types.string:
+ return this.estreeParseLiteral(this.state.value);
+
+ case types.regexp:
+ return this.estreeParseRegExpLiteral(this.state.value);
+
+ case types.bigint:
+ return this.estreeParseBigIntLiteral(this.state.value);
+
+ case types.decimal:
+ return this.estreeParseDecimalLiteral(this.state.value);
+
+ case types._null:
+ return this.estreeParseLiteral(null);
+
+ case types._true:
+ return this.estreeParseLiteral(true);
+
+ case types._false:
+ return this.estreeParseLiteral(false);
+
+ default:
+ return super.parseExprAtom(refExpressionErrors);
+ }
+ }
+
+ parseLiteral(value, type, startPos, startLoc) {
+ const node = super.parseLiteral(value, type, startPos, startLoc);
+ node.raw = node.extra.raw;
+ delete node.extra;
+ return node;
+ }
+
+ parseFunctionBody(node, allowExpression, isMethod = false) {
+ super.parseFunctionBody(node, allowExpression, isMethod);
+ node.expression = node.body.type !== "BlockStatement";
+ }
+
+ parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
+ let funcNode = this.startNode();
+ funcNode.kind = node.kind;
+ funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
+ funcNode.type = "FunctionExpression";
+ delete funcNode.kind;
+ node.value = funcNode;
+ type = type === "ClassMethod" ? "MethodDefinition" : type;
+ return this.finishNode(node, type);
+ }
+
+ parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
+ const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
+
+ if (node) {
+ node.type = "Property";
+ if (node.kind === "method") node.kind = "init";
+ node.shorthand = false;
+ }
+
+ return node;
+ }
+
+ parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
+ const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
+
+ if (node) {
+ node.kind = "init";
+ node.type = "Property";
+ }
+
+ return node;
+ }
+
+ toAssignable(node, isLHS = false) {
+ if (isSimpleProperty(node)) {
+ this.toAssignable(node.value);
+ return node;
+ }
+
+ return super.toAssignable(node, isLHS);
+ }
+
+ toAssignableObjectExpressionProp(prop, ...args) {
+ if (prop.kind === "get" || prop.kind === "set") {
+ throw this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
+ } else if (prop.method) {
+ throw this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
+ } else {
+ super.toAssignableObjectExpressionProp(prop, ...args);
+ }
+ }
+
+ finishCallExpression(node, optional) {
+ super.finishCallExpression(node, optional);
+
+ if (node.callee.type === "Import") {
+ node.type = "ImportExpression";
+ node.source = node.arguments[0];
+ delete node.arguments;
+ delete node.callee;
+ }
+
+ return node;
+ }
+
+ toReferencedArguments(node) {
+ if (node.type === "ImportExpression") {
+ return;
+ }
+
+ super.toReferencedArguments(node);
+ }
+
+ parseExport(node) {
+ super.parseExport(node);
+
+ switch (node.type) {
+ case "ExportAllDeclaration":
+ node.exported = null;
+ break;
+
+ case "ExportNamedDeclaration":
+ if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
+ node.type = "ExportAllDeclaration";
+ node.exported = node.specifiers[0].exported;
+ delete node.specifiers;
+ }
+
+ break;
+ }
+
+ return node;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ const node = super.parseSubscript(base, startPos, startLoc, noCalls, state);
+
+ if (state.optionalChainMember) {
+ if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
+ node.type = node.type.substring(8);
+ }
+
+ if (state.stop) {
+ const chain = this.startNodeAtNode(node);
+ chain.expression = node;
+ return this.finishNode(chain, "ChainExpression");
+ }
+ } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
+ node.optional = false;
+ }
+
+ return node;
+ }
+
+});
+
+class TokContext {
+ constructor(token, isExpr, preserveSpace, override) {
+ this.token = void 0;
+ this.isExpr = void 0;
+ this.preserveSpace = void 0;
+ this.override = void 0;
+ this.token = token;
+ this.isExpr = !!isExpr;
+ this.preserveSpace = !!preserveSpace;
+ this.override = override;
+ }
+
+}
+const types$1 = {
+ braceStatement: new TokContext("{", false),
+ braceExpression: new TokContext("{", true),
+ recordExpression: new TokContext("#{", true),
+ templateQuasi: new TokContext("${", false),
+ parenStatement: new TokContext("(", false),
+ parenExpression: new TokContext("(", true),
+ template: new TokContext("`", true, true, p => p.readTmplToken()),
+ functionExpression: new TokContext("function", true),
+ functionStatement: new TokContext("function", false)
+};
+
+types.parenR.updateContext = types.braceR.updateContext = function () {
+ if (this.state.context.length === 1) {
+ this.state.exprAllowed = true;
+ return;
+ }
+
+ let out = this.state.context.pop();
+
+ if (out === types$1.braceStatement && this.curContext().token === "function") {
+ out = this.state.context.pop();
+ }
+
+ this.state.exprAllowed = !out.isExpr;
+};
+
+types.name.updateContext = function (prevType) {
+ let allowed = false;
+
+ if (prevType !== types.dot) {
+ if (this.state.value === "of" && !this.state.exprAllowed && prevType !== types._function && prevType !== types._class) {
+ allowed = true;
+ }
+ }
+
+ this.state.exprAllowed = allowed;
+
+ if (this.state.isIterator) {
+ this.state.isIterator = false;
+ }
+};
+
+types.braceL.updateContext = function (prevType) {
+ this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);
+ this.state.exprAllowed = true;
+};
+
+types.dollarBraceL.updateContext = function () {
+ this.state.context.push(types$1.templateQuasi);
+ this.state.exprAllowed = true;
+};
+
+types.parenL.updateContext = function (prevType) {
+ const statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
+ this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);
+ this.state.exprAllowed = true;
+};
+
+types.incDec.updateContext = function () {};
+
+types._function.updateContext = types._class.updateContext = function (prevType) {
+ if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && this.hasPrecedingLineBreak()) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) {
+ this.state.context.push(types$1.functionExpression);
+ } else {
+ this.state.context.push(types$1.functionStatement);
+ }
+
+ this.state.exprAllowed = false;
+};
+
+types.backQuote.updateContext = function () {
+ if (this.curContext() === types$1.template) {
+ this.state.context.pop();
+ } else {
+ this.state.context.push(types$1.template);
+ }
+
+ this.state.exprAllowed = false;
+};
+
+types.braceHashL.updateContext = function () {
+ this.state.context.push(types$1.recordExpression);
+ this.state.exprAllowed = true;
+};
+
+let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\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";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+
+ return false;
+}
+
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+
+const reservedWords = {
+ keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords$1 = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+function isStrictReservedWord(word, inModule) {
+ return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
+function isStrictBindOnlyReservedWord(word) {
+ return reservedWordsStrictBindSet.has(word);
+}
+function isStrictBindReservedWord(word, inModule) {
+ return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
+function isKeyword(word) {
+ return keywords$1.has(word);
+}
+
+const keywordRelationalOperator = /^in(stanceof)?$/;
+function isIteratorStart(current, next) {
+ return current === 64 && next === 64;
+}
+
+const SCOPE_OTHER = 0b00000000,
+ SCOPE_PROGRAM = 0b00000001,
+ SCOPE_FUNCTION = 0b00000010,
+ SCOPE_ARROW = 0b00000100,
+ SCOPE_SIMPLE_CATCH = 0b00001000,
+ SCOPE_SUPER = 0b00010000,
+ SCOPE_DIRECT_SUPER = 0b00100000,
+ SCOPE_CLASS = 0b01000000,
+ SCOPE_TS_MODULE = 0b10000000,
+ SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;
+const BIND_KIND_VALUE = 0b00000000001,
+ BIND_KIND_TYPE = 0b00000000010,
+ BIND_SCOPE_VAR = 0b00000000100,
+ BIND_SCOPE_LEXICAL = 0b00000001000,
+ BIND_SCOPE_FUNCTION = 0b00000010000,
+ BIND_FLAGS_NONE = 0b00001000000,
+ BIND_FLAGS_CLASS = 0b00010000000,
+ BIND_FLAGS_TS_ENUM = 0b00100000000,
+ BIND_FLAGS_TS_CONST_ENUM = 0b01000000000,
+ BIND_FLAGS_TS_EXPORT_ONLY = 0b10000000000;
+const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
+ BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
+ BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
+ BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
+ BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
+ BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
+ BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
+ BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
+ BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
+ BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
+ BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
+ BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY;
+const CLASS_ELEMENT_FLAG_STATIC = 0b100,
+ CLASS_ELEMENT_KIND_GETTER = 0b010,
+ CLASS_ELEMENT_KIND_SETTER = 0b001,
+ CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
+const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,
+ CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,
+ CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,
+ CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,
+ CLASS_ELEMENT_OTHER = 0;
+
+const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
+const FlowErrors = Object.freeze({
+ AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
+ AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module",
+ AssignReservedType: "Cannot overwrite reserved type %0",
+ DeclareClassElement: "The `declare` modifier can only appear on class fields.",
+ DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
+ DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement",
+ EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
+ EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
+ EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
+ EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
+ EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
+ EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
+ EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
+ EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
+ EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
+ EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
+ EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
+ ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements",
+ InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type",
+ InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions",
+ InexactVariance: "Explicit inexact syntax cannot have variance",
+ InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`",
+ MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
+ NestedDeclareModule: "`declare module` cannot be used inside another `declare module`",
+ NestedFlowComment: "Cannot have a flow comment inside another flow comment",
+ OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
+ SpreadVariance: "Spread properties cannot have variance",
+ TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",
+ TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis",
+ UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object",
+ UnexpectedReservedType: "Unexpected reserved type %0",
+ UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new",
+ UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
+ UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions",
+ UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint"',
+ UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration",
+ UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`",
+ UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead",
+ UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module",
+ UnterminatedFlowComment: "Unterminated flow-comment"
+});
+
+function isEsModuleType(bodyElement) {
+ return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
+}
+
+function hasTypeImportKind(node) {
+ return node.importKind === "type" || node.importKind === "typeof";
+}
+
+function isMaybeDefaultImport(state) {
+ return (state.type === types.name || !!state.type.keyword) && state.value !== "from";
+}
+
+const exportSuggestions = {
+ const: "declare export var",
+ let: "declare export var",
+ type: "export type",
+ interface: "export interface"
+};
+
+function partition(list, test) {
+ const list1 = [];
+ const list2 = [];
+
+ for (let i = 0; i < list.length; i++) {
+ (test(list[i], i, list) ? list1 : list2).push(list[i]);
+ }
+
+ return [list1, list2];
+}
+
+const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
+var flow = (superClass => {
+ var _temp;
+
+ return _temp = class extends superClass {
+ constructor(options, input) {
+ super(options, input);
+ this.flowPragma = void 0;
+ this.flowPragma = undefined;
+ }
+
+ shouldParseTypes() {
+ return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
+ }
+
+ shouldParseEnums() {
+ return !!this.getPluginOption("flow", "enums");
+ }
+
+ finishToken(type, val) {
+ if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) {
+ if (this.flowPragma === undefined) {
+ this.flowPragma = null;
+ }
+ }
+
+ return super.finishToken(type, val);
+ }
+
+ addComment(comment) {
+ if (this.flowPragma === undefined) {
+ const matches = FLOW_PRAGMA_REGEX.exec(comment.value);
+
+ if (!matches) ; else if (matches[1] === "flow") {
+ this.flowPragma = "flow";
+ } else if (matches[1] === "noflow") {
+ this.flowPragma = "noflow";
+ } else {
+ throw new Error("Unexpected flow pragma");
+ }
+ }
+
+ return super.addComment(comment);
+ }
+
+ flowParseTypeInitialiser(tok) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(tok || types.colon);
+ const type = this.flowParseType();
+ this.state.inType = oldInType;
+ return type;
+ }
+
+ flowParsePredicate() {
+ const node = this.startNode();
+ const moduloLoc = this.state.startLoc;
+ const moduloPos = this.state.start;
+ this.expect(types.modulo);
+ const checksLoc = this.state.startLoc;
+ this.expectContextual("checks");
+
+ if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
+ this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
+ }
+
+ if (this.eat(types.parenL)) {
+ node.value = this.parseExpression();
+ this.expect(types.parenR);
+ return this.finishNode(node, "DeclaredPredicate");
+ } else {
+ return this.finishNode(node, "InferredPredicate");
+ }
+ }
+
+ flowParseTypeAndPredicateInitialiser() {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(types.colon);
+ let type = null;
+ let predicate = null;
+
+ if (this.match(types.modulo)) {
+ this.state.inType = oldInType;
+ predicate = this.flowParsePredicate();
+ } else {
+ type = this.flowParseType();
+ this.state.inType = oldInType;
+
+ if (this.match(types.modulo)) {
+ predicate = this.flowParsePredicate();
+ }
+ }
+
+ return [type, predicate];
+ }
+
+ flowParseDeclareClass(node) {
+ this.next();
+ this.flowParseInterfaceish(node, true);
+ return this.finishNode(node, "DeclareClass");
+ }
+
+ flowParseDeclareFunction(node) {
+ this.next();
+ const id = node.id = this.parseIdentifier();
+ const typeNode = this.startNode();
+ const typeContainer = this.startNode();
+
+ if (this.isRelational("<")) {
+ typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ typeNode.typeParameters = null;
+ }
+
+ this.expect(types.parenL);
+ const tmp = this.flowParseFunctionTypeParams();
+ typeNode.params = tmp.params;
+ typeNode.rest = tmp.rest;
+ this.expect(types.parenR);
+ [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
+ id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
+ this.resetEndLocation(id);
+ this.semicolon();
+ return this.finishNode(node, "DeclareFunction");
+ }
+
+ flowParseDeclare(node, insideModule) {
+ if (this.match(types._class)) {
+ return this.flowParseDeclareClass(node);
+ } else if (this.match(types._function)) {
+ return this.flowParseDeclareFunction(node);
+ } else if (this.match(types._var)) {
+ return this.flowParseDeclareVariable(node);
+ } else if (this.eatContextual("module")) {
+ if (this.match(types.dot)) {
+ return this.flowParseDeclareModuleExports(node);
+ } else {
+ if (insideModule) {
+ this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
+ }
+
+ return this.flowParseDeclareModule(node);
+ }
+ } else if (this.isContextual("type")) {
+ return this.flowParseDeclareTypeAlias(node);
+ } else if (this.isContextual("opaque")) {
+ return this.flowParseDeclareOpaqueType(node);
+ } else if (this.isContextual("interface")) {
+ return this.flowParseDeclareInterface(node);
+ } else if (this.match(types._export)) {
+ return this.flowParseDeclareExportDeclaration(node, insideModule);
+ } else {
+ throw this.unexpected();
+ }
+ }
+
+ flowParseDeclareVariable(node) {
+ this.next();
+ node.id = this.flowParseTypeAnnotatableIdentifier(true);
+ this.scope.declareName(node.id.name, BIND_VAR, node.id.start);
+ this.semicolon();
+ return this.finishNode(node, "DeclareVariable");
+ }
+
+ flowParseDeclareModule(node) {
+ this.scope.enter(SCOPE_OTHER);
+
+ if (this.match(types.string)) {
+ node.id = this.parseExprAtom();
+ } else {
+ node.id = this.parseIdentifier();
+ }
+
+ const bodyNode = node.body = this.startNode();
+ const body = bodyNode.body = [];
+ this.expect(types.braceL);
+
+ while (!this.match(types.braceR)) {
+ let bodyNode = this.startNode();
+
+ if (this.match(types._import)) {
+ this.next();
+
+ if (!this.isContextual("type") && !this.match(types._typeof)) {
+ this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
+ }
+
+ this.parseImport(bodyNode);
+ } else {
+ this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
+ bodyNode = this.flowParseDeclare(bodyNode, true);
+ }
+
+ body.push(bodyNode);
+ }
+
+ this.scope.exit();
+ this.expect(types.braceR);
+ this.finishNode(bodyNode, "BlockStatement");
+ let kind = null;
+ let hasModuleExport = false;
+ body.forEach(bodyElement => {
+ if (isEsModuleType(bodyElement)) {
+ if (kind === "CommonJS") {
+ this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
+ }
+
+ kind = "ES";
+ } else if (bodyElement.type === "DeclareModuleExports") {
+ if (hasModuleExport) {
+ this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
+ }
+
+ if (kind === "ES") {
+ this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
+ }
+
+ kind = "CommonJS";
+ hasModuleExport = true;
+ }
+ });
+ node.kind = kind || "CommonJS";
+ return this.finishNode(node, "DeclareModule");
+ }
+
+ flowParseDeclareExportDeclaration(node, insideModule) {
+ this.expect(types._export);
+
+ if (this.eat(types._default)) {
+ if (this.match(types._function) || this.match(types._class)) {
+ node.declaration = this.flowParseDeclare(this.startNode());
+ } else {
+ node.declaration = this.flowParseType();
+ this.semicolon();
+ }
+
+ node.default = true;
+ return this.finishNode(node, "DeclareExportDeclaration");
+ } else {
+ if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
+ const label = this.state.value;
+ const suggestion = exportSuggestions[label];
+ throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
+ }
+
+ if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) {
+ node.declaration = this.flowParseDeclare(this.startNode());
+ node.default = false;
+ return this.finishNode(node, "DeclareExportDeclaration");
+ } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
+ node = this.parseExport(node);
+
+ if (node.type === "ExportNamedDeclaration") {
+ node.type = "ExportDeclaration";
+ node.default = false;
+ delete node.exportKind;
+ }
+
+ node.type = "Declare" + node.type;
+ return node;
+ }
+ }
+
+ throw this.unexpected();
+ }
+
+ flowParseDeclareModuleExports(node) {
+ this.next();
+ this.expectContextual("exports");
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ this.semicolon();
+ return this.finishNode(node, "DeclareModuleExports");
+ }
+
+ flowParseDeclareTypeAlias(node) {
+ this.next();
+ this.flowParseTypeAlias(node);
+ node.type = "DeclareTypeAlias";
+ return node;
+ }
+
+ flowParseDeclareOpaqueType(node) {
+ this.next();
+ this.flowParseOpaqueType(node, true);
+ node.type = "DeclareOpaqueType";
+ return node;
+ }
+
+ flowParseDeclareInterface(node) {
+ this.next();
+ this.flowParseInterfaceish(node);
+ return this.finishNode(node, "DeclareInterface");
+ }
+
+ flowParseInterfaceish(node, isClass = false) {
+ node.id = this.flowParseRestrictedIdentifier(!isClass, true);
+ this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.start);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.extends = [];
+ node.implements = [];
+ node.mixins = [];
+
+ if (this.eat(types._extends)) {
+ do {
+ node.extends.push(this.flowParseInterfaceExtends());
+ } while (!isClass && this.eat(types.comma));
+ }
+
+ if (this.isContextual("mixins")) {
+ this.next();
+
+ do {
+ node.mixins.push(this.flowParseInterfaceExtends());
+ } while (this.eat(types.comma));
+ }
+
+ if (this.isContextual("implements")) {
+ this.next();
+
+ do {
+ node.implements.push(this.flowParseInterfaceExtends());
+ } while (this.eat(types.comma));
+ }
+
+ node.body = this.flowParseObjectType({
+ allowStatic: isClass,
+ allowExact: false,
+ allowSpread: false,
+ allowProto: isClass,
+ allowInexact: false
+ });
+ }
+
+ flowParseInterfaceExtends() {
+ const node = this.startNode();
+ node.id = this.flowParseQualifiedTypeIdentifier();
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+
+ return this.finishNode(node, "InterfaceExtends");
+ }
+
+ flowParseInterface(node) {
+ this.flowParseInterfaceish(node);
+ return this.finishNode(node, "InterfaceDeclaration");
+ }
+
+ checkNotUnderscore(word) {
+ if (word === "_") {
+ this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
+ }
+ }
+
+ checkReservedType(word, startLoc, declaration) {
+ if (!reservedTypes.has(word)) return;
+ this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
+ }
+
+ flowParseRestrictedIdentifier(liberal, declaration) {
+ this.checkReservedType(this.state.value, this.state.start, declaration);
+ return this.parseIdentifier(liberal);
+ }
+
+ flowParseTypeAlias(node) {
+ node.id = this.flowParseRestrictedIdentifier(false, true);
+ this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.right = this.flowParseTypeInitialiser(types.eq);
+ this.semicolon();
+ return this.finishNode(node, "TypeAlias");
+ }
+
+ flowParseOpaqueType(node, declare) {
+ this.expectContextual("type");
+ node.id = this.flowParseRestrictedIdentifier(true, true);
+ this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.supertype = null;
+
+ if (this.match(types.colon)) {
+ node.supertype = this.flowParseTypeInitialiser(types.colon);
+ }
+
+ node.impltype = null;
+
+ if (!declare) {
+ node.impltype = this.flowParseTypeInitialiser(types.eq);
+ }
+
+ this.semicolon();
+ return this.finishNode(node, "OpaqueType");
+ }
+
+ flowParseTypeParameter(requireDefault = false) {
+ const nodeStart = this.state.start;
+ const node = this.startNode();
+ const variance = this.flowParseVariance();
+ const ident = this.flowParseTypeAnnotatableIdentifier();
+ node.name = ident.name;
+ node.variance = variance;
+ node.bound = ident.typeAnnotation;
+
+ if (this.match(types.eq)) {
+ this.eat(types.eq);
+ node.default = this.flowParseType();
+ } else {
+ if (requireDefault) {
+ this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
+ }
+ }
+
+ return this.finishNode(node, "TypeParameter");
+ }
+
+ flowParseTypeParameterDeclaration() {
+ const oldInType = this.state.inType;
+ const node = this.startNode();
+ node.params = [];
+ this.state.inType = true;
+
+ if (this.isRelational("<") || this.match(types.jsxTagStart)) {
+ this.next();
+ } else {
+ this.unexpected();
+ }
+
+ let defaultRequired = false;
+
+ do {
+ const typeParameter = this.flowParseTypeParameter(defaultRequired);
+ node.params.push(typeParameter);
+
+ if (typeParameter.default) {
+ defaultRequired = true;
+ }
+
+ if (!this.isRelational(">")) {
+ this.expect(types.comma);
+ }
+ } while (!this.isRelational(">"));
+
+ this.expectRelational(">");
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterDeclaration");
+ }
+
+ flowParseTypeParameterInstantiation() {
+ const node = this.startNode();
+ const oldInType = this.state.inType;
+ node.params = [];
+ this.state.inType = true;
+ this.expectRelational("<");
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = false;
+
+ while (!this.isRelational(">")) {
+ node.params.push(this.flowParseType());
+
+ if (!this.isRelational(">")) {
+ this.expect(types.comma);
+ }
+ }
+
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ this.expectRelational(">");
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterInstantiation");
+ }
+
+ flowParseTypeParameterInstantiationCallOrNew() {
+ const node = this.startNode();
+ const oldInType = this.state.inType;
+ node.params = [];
+ this.state.inType = true;
+ this.expectRelational("<");
+
+ while (!this.isRelational(">")) {
+ node.params.push(this.flowParseTypeOrImplicitInstantiation());
+
+ if (!this.isRelational(">")) {
+ this.expect(types.comma);
+ }
+ }
+
+ this.expectRelational(">");
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterInstantiation");
+ }
+
+ flowParseInterfaceType() {
+ const node = this.startNode();
+ this.expectContextual("interface");
+ node.extends = [];
+
+ if (this.eat(types._extends)) {
+ do {
+ node.extends.push(this.flowParseInterfaceExtends());
+ } while (this.eat(types.comma));
+ }
+
+ node.body = this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: false,
+ allowSpread: false,
+ allowProto: false,
+ allowInexact: false
+ });
+ return this.finishNode(node, "InterfaceTypeAnnotation");
+ }
+
+ flowParseObjectPropertyKey() {
+ return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+ }
+
+ flowParseObjectTypeIndexer(node, isStatic, variance) {
+ node.static = isStatic;
+
+ if (this.lookahead().type === types.colon) {
+ node.id = this.flowParseObjectPropertyKey();
+ node.key = this.flowParseTypeInitialiser();
+ } else {
+ node.id = null;
+ node.key = this.flowParseType();
+ }
+
+ this.expect(types.bracketR);
+ node.value = this.flowParseTypeInitialiser();
+ node.variance = variance;
+ return this.finishNode(node, "ObjectTypeIndexer");
+ }
+
+ flowParseObjectTypeInternalSlot(node, isStatic) {
+ node.static = isStatic;
+ node.id = this.flowParseObjectPropertyKey();
+ this.expect(types.bracketR);
+ this.expect(types.bracketR);
+
+ if (this.isRelational("<") || this.match(types.parenL)) {
+ node.method = true;
+ node.optional = false;
+ node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
+ } else {
+ node.method = false;
+
+ if (this.eat(types.question)) {
+ node.optional = true;
+ }
+
+ node.value = this.flowParseTypeInitialiser();
+ }
+
+ return this.finishNode(node, "ObjectTypeInternalSlot");
+ }
+
+ flowParseObjectTypeMethodish(node) {
+ node.params = [];
+ node.rest = null;
+ node.typeParameters = null;
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ this.expect(types.parenL);
+
+ while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
+ node.params.push(this.flowParseFunctionTypeParam());
+
+ if (!this.match(types.parenR)) {
+ this.expect(types.comma);
+ }
+ }
+
+ if (this.eat(types.ellipsis)) {
+ node.rest = this.flowParseFunctionTypeParam();
+ }
+
+ this.expect(types.parenR);
+ node.returnType = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ flowParseObjectTypeCallProperty(node, isStatic) {
+ const valueNode = this.startNode();
+ node.static = isStatic;
+ node.value = this.flowParseObjectTypeMethodish(valueNode);
+ return this.finishNode(node, "ObjectTypeCallProperty");
+ }
+
+ flowParseObjectType({
+ allowStatic,
+ allowExact,
+ allowSpread,
+ allowProto,
+ allowInexact
+ }) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ const nodeStart = this.startNode();
+ nodeStart.callProperties = [];
+ nodeStart.properties = [];
+ nodeStart.indexers = [];
+ nodeStart.internalSlots = [];
+ let endDelim;
+ let exact;
+ let inexact = false;
+
+ if (allowExact && this.match(types.braceBarL)) {
+ this.expect(types.braceBarL);
+ endDelim = types.braceBarR;
+ exact = true;
+ } else {
+ this.expect(types.braceL);
+ endDelim = types.braceR;
+ exact = false;
+ }
+
+ nodeStart.exact = exact;
+
+ while (!this.match(endDelim)) {
+ let isStatic = false;
+ let protoStart = null;
+ let inexactStart = null;
+ const node = this.startNode();
+
+ if (allowProto && this.isContextual("proto")) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type !== types.colon && lookahead.type !== types.question) {
+ this.next();
+ protoStart = this.state.start;
+ allowStatic = false;
+ }
+ }
+
+ if (allowStatic && this.isContextual("static")) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type !== types.colon && lookahead.type !== types.question) {
+ this.next();
+ isStatic = true;
+ }
+ }
+
+ const variance = this.flowParseVariance();
+
+ if (this.eat(types.bracketL)) {
+ if (protoStart != null) {
+ this.unexpected(protoStart);
+ }
+
+ if (this.eat(types.bracketL)) {
+ if (variance) {
+ this.unexpected(variance.start);
+ }
+
+ nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
+ } else {
+ nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
+ }
+ } else if (this.match(types.parenL) || this.isRelational("<")) {
+ if (protoStart != null) {
+ this.unexpected(protoStart);
+ }
+
+ if (variance) {
+ this.unexpected(variance.start);
+ }
+
+ nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
+ } else {
+ let kind = "init";
+
+ if (this.isContextual("get") || this.isContextual("set")) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) {
+ kind = this.state.value;
+ this.next();
+ }
+ }
+
+ const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
+
+ if (propOrInexact === null) {
+ inexact = true;
+ inexactStart = this.state.lastTokStart;
+ } else {
+ nodeStart.properties.push(propOrInexact);
+ }
+ }
+
+ this.flowObjectTypeSemicolon();
+
+ if (inexactStart && !this.match(types.braceR) && !this.match(types.braceBarR)) {
+ this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
+ }
+ }
+
+ this.expect(endDelim);
+
+ if (allowSpread) {
+ nodeStart.inexact = inexact;
+ }
+
+ const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
+ this.state.inType = oldInType;
+ return out;
+ }
+
+ flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
+ if (this.eat(types.ellipsis)) {
+ const isInexactToken = this.match(types.comma) || this.match(types.semi) || this.match(types.braceR) || this.match(types.braceBarR);
+
+ if (isInexactToken) {
+ if (!allowSpread) {
+ this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
+ } else if (!allowInexact) {
+ this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
+ }
+
+ if (variance) {
+ this.raise(variance.start, FlowErrors.InexactVariance);
+ }
+
+ return null;
+ }
+
+ if (!allowSpread) {
+ this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
+ }
+
+ if (protoStart != null) {
+ this.unexpected(protoStart);
+ }
+
+ if (variance) {
+ this.raise(variance.start, FlowErrors.SpreadVariance);
+ }
+
+ node.argument = this.flowParseType();
+ return this.finishNode(node, "ObjectTypeSpreadProperty");
+ } else {
+ node.key = this.flowParseObjectPropertyKey();
+ node.static = isStatic;
+ node.proto = protoStart != null;
+ node.kind = kind;
+ let optional = false;
+
+ if (this.isRelational("<") || this.match(types.parenL)) {
+ node.method = true;
+
+ if (protoStart != null) {
+ this.unexpected(protoStart);
+ }
+
+ if (variance) {
+ this.unexpected(variance.start);
+ }
+
+ node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
+
+ if (kind === "get" || kind === "set") {
+ this.flowCheckGetterSetterParams(node);
+ }
+ } else {
+ if (kind !== "init") this.unexpected();
+ node.method = false;
+
+ if (this.eat(types.question)) {
+ optional = true;
+ }
+
+ node.value = this.flowParseTypeInitialiser();
+ node.variance = variance;
+ }
+
+ node.optional = optional;
+ return this.finishNode(node, "ObjectTypeProperty");
+ }
+ }
+
+ flowCheckGetterSetterParams(property) {
+ const paramCount = property.kind === "get" ? 0 : 1;
+ const start = property.start;
+ const length = property.value.params.length + (property.value.rest ? 1 : 0);
+
+ if (length !== paramCount) {
+ if (property.kind === "get") {
+ this.raise(start, ErrorMessages.BadGetterArity);
+ } else {
+ this.raise(start, ErrorMessages.BadSetterArity);
+ }
+ }
+
+ if (property.kind === "set" && property.value.rest) {
+ this.raise(start, ErrorMessages.BadSetterRestParameter);
+ }
+ }
+
+ flowObjectTypeSemicolon() {
+ if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
+ this.unexpected();
+ }
+ }
+
+ flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+ let node = id || this.flowParseRestrictedIdentifier(true);
+
+ while (this.eat(types.dot)) {
+ const node2 = this.startNodeAt(startPos, startLoc);
+ node2.qualification = node;
+ node2.id = this.flowParseRestrictedIdentifier(true);
+ node = this.finishNode(node2, "QualifiedTypeIdentifier");
+ }
+
+ return node;
+ }
+
+ flowParseGenericType(startPos, startLoc, id) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.typeParameters = null;
+ node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ }
+
+ return this.finishNode(node, "GenericTypeAnnotation");
+ }
+
+ flowParseTypeofType() {
+ const node = this.startNode();
+ this.expect(types._typeof);
+ node.argument = this.flowParsePrimaryType();
+ return this.finishNode(node, "TypeofTypeAnnotation");
+ }
+
+ flowParseTupleType() {
+ const node = this.startNode();
+ node.types = [];
+ this.expect(types.bracketL);
+
+ while (this.state.pos < this.length && !this.match(types.bracketR)) {
+ node.types.push(this.flowParseType());
+ if (this.match(types.bracketR)) break;
+ this.expect(types.comma);
+ }
+
+ this.expect(types.bracketR);
+ return this.finishNode(node, "TupleTypeAnnotation");
+ }
+
+ flowParseFunctionTypeParam() {
+ let name = null;
+ let optional = false;
+ let typeAnnotation = null;
+ const node = this.startNode();
+ const lh = this.lookahead();
+
+ if (lh.type === types.colon || lh.type === types.question) {
+ name = this.parseIdentifier();
+
+ if (this.eat(types.question)) {
+ optional = true;
+ }
+
+ typeAnnotation = this.flowParseTypeInitialiser();
+ } else {
+ typeAnnotation = this.flowParseType();
+ }
+
+ node.name = name;
+ node.optional = optional;
+ node.typeAnnotation = typeAnnotation;
+ return this.finishNode(node, "FunctionTypeParam");
+ }
+
+ reinterpretTypeAsFunctionTypeParam(type) {
+ const node = this.startNodeAt(type.start, type.loc.start);
+ node.name = null;
+ node.optional = false;
+ node.typeAnnotation = type;
+ return this.finishNode(node, "FunctionTypeParam");
+ }
+
+ flowParseFunctionTypeParams(params = []) {
+ let rest = null;
+
+ while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
+ params.push(this.flowParseFunctionTypeParam());
+
+ if (!this.match(types.parenR)) {
+ this.expect(types.comma);
+ }
+ }
+
+ if (this.eat(types.ellipsis)) {
+ rest = this.flowParseFunctionTypeParam();
+ }
+
+ return {
+ params,
+ rest
+ };
+ }
+
+ flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
+ switch (id.name) {
+ case "any":
+ return this.finishNode(node, "AnyTypeAnnotation");
+
+ case "bool":
+ case "boolean":
+ return this.finishNode(node, "BooleanTypeAnnotation");
+
+ case "mixed":
+ return this.finishNode(node, "MixedTypeAnnotation");
+
+ case "empty":
+ return this.finishNode(node, "EmptyTypeAnnotation");
+
+ case "number":
+ return this.finishNode(node, "NumberTypeAnnotation");
+
+ case "string":
+ return this.finishNode(node, "StringTypeAnnotation");
+
+ case "symbol":
+ return this.finishNode(node, "SymbolTypeAnnotation");
+
+ default:
+ this.checkNotUnderscore(id.name);
+ return this.flowParseGenericType(startPos, startLoc, id);
+ }
+ }
+
+ flowParsePrimaryType() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const node = this.startNode();
+ let tmp;
+ let type;
+ let isGroupedType = false;
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+
+ switch (this.state.type) {
+ case types.name:
+ if (this.isContextual("interface")) {
+ return this.flowParseInterfaceType();
+ }
+
+ return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
+
+ case types.braceL:
+ return this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: false,
+ allowSpread: true,
+ allowProto: false,
+ allowInexact: true
+ });
+
+ case types.braceBarL:
+ return this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: true,
+ allowSpread: true,
+ allowProto: false,
+ allowInexact: false
+ });
+
+ case types.bracketL:
+ this.state.noAnonFunctionType = false;
+ type = this.flowParseTupleType();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ return type;
+
+ case types.relational:
+ if (this.state.value === "<") {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ this.expect(types.parenL);
+ tmp = this.flowParseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ this.expect(types.parenR);
+ this.expect(types.arrow);
+ node.returnType = this.flowParseType();
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ break;
+
+ case types.parenL:
+ this.next();
+
+ if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
+ if (this.match(types.name)) {
+ const token = this.lookahead().type;
+ isGroupedType = token !== types.question && token !== types.colon;
+ } else {
+ isGroupedType = true;
+ }
+ }
+
+ if (isGroupedType) {
+ this.state.noAnonFunctionType = false;
+ type = this.flowParseType();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+
+ if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
+ this.expect(types.parenR);
+ return type;
+ } else {
+ this.eat(types.comma);
+ }
+ }
+
+ if (type) {
+ tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
+ } else {
+ tmp = this.flowParseFunctionTypeParams();
+ }
+
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ this.expect(types.parenR);
+ this.expect(types.arrow);
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+ return this.finishNode(node, "FunctionTypeAnnotation");
+
+ case types.string:
+ return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
+
+ case types._true:
+ case types._false:
+ node.value = this.match(types._true);
+ this.next();
+ return this.finishNode(node, "BooleanLiteralTypeAnnotation");
+
+ case types.plusMin:
+ if (this.state.value === "-") {
+ this.next();
+
+ if (this.match(types.num)) {
+ return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
+ }
+
+ if (this.match(types.bigint)) {
+ return this.parseLiteral(-this.state.value, "BigIntLiteralTypeAnnotation", node.start, node.loc.start);
+ }
+
+ throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
+ }
+
+ throw this.unexpected();
+
+ case types.num:
+ return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
+
+ case types.bigint:
+ return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
+
+ case types._void:
+ this.next();
+ return this.finishNode(node, "VoidTypeAnnotation");
+
+ case types._null:
+ this.next();
+ return this.finishNode(node, "NullLiteralTypeAnnotation");
+
+ case types._this:
+ this.next();
+ return this.finishNode(node, "ThisTypeAnnotation");
+
+ case types.star:
+ this.next();
+ return this.finishNode(node, "ExistsTypeAnnotation");
+
+ default:
+ if (this.state.type.keyword === "typeof") {
+ return this.flowParseTypeofType();
+ } else if (this.state.type.keyword) {
+ const label = this.state.type.label;
+ this.next();
+ return super.createIdentifier(node, label);
+ }
+
+ }
+
+ throw this.unexpected();
+ }
+
+ flowParsePostfixType() {
+ const startPos = this.state.start,
+ startLoc = this.state.startLoc;
+ let type = this.flowParsePrimaryType();
+
+ while (this.match(types.bracketL) && !this.canInsertSemicolon()) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.elementType = type;
+ this.expect(types.bracketL);
+ this.expect(types.bracketR);
+ type = this.finishNode(node, "ArrayTypeAnnotation");
+ }
+
+ return type;
+ }
+
+ flowParsePrefixType() {
+ const node = this.startNode();
+
+ if (this.eat(types.question)) {
+ node.typeAnnotation = this.flowParsePrefixType();
+ return this.finishNode(node, "NullableTypeAnnotation");
+ } else {
+ return this.flowParsePostfixType();
+ }
+ }
+
+ flowParseAnonFunctionWithoutParens() {
+ const param = this.flowParsePrefixType();
+
+ if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
+ const node = this.startNodeAt(param.start, param.loc.start);
+ node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
+ node.rest = null;
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ return param;
+ }
+
+ flowParseIntersectionType() {
+ const node = this.startNode();
+ this.eat(types.bitwiseAND);
+ const type = this.flowParseAnonFunctionWithoutParens();
+ node.types = [type];
+
+ while (this.eat(types.bitwiseAND)) {
+ node.types.push(this.flowParseAnonFunctionWithoutParens());
+ }
+
+ return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
+ }
+
+ flowParseUnionType() {
+ const node = this.startNode();
+ this.eat(types.bitwiseOR);
+ const type = this.flowParseIntersectionType();
+ node.types = [type];
+
+ while (this.eat(types.bitwiseOR)) {
+ node.types.push(this.flowParseIntersectionType());
+ }
+
+ return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
+ }
+
+ flowParseType() {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ const type = this.flowParseUnionType();
+ this.state.inType = oldInType;
+ this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
+ return type;
+ }
+
+ flowParseTypeOrImplicitInstantiation() {
+ if (this.state.type === types.name && this.state.value === "_") {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const node = this.parseIdentifier();
+ return this.flowParseGenericType(startPos, startLoc, node);
+ } else {
+ return this.flowParseType();
+ }
+ }
+
+ flowParseTypeAnnotation() {
+ const node = this.startNode();
+ node.typeAnnotation = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "TypeAnnotation");
+ }
+
+ flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
+ const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
+
+ if (this.match(types.colon)) {
+ ident.typeAnnotation = this.flowParseTypeAnnotation();
+ this.resetEndLocation(ident);
+ }
+
+ return ident;
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
+ return node.expression;
+ }
+
+ flowParseVariance() {
+ let variance = null;
+
+ if (this.match(types.plusMin)) {
+ variance = this.startNode();
+
+ if (this.state.value === "+") {
+ variance.kind = "plus";
+ } else {
+ variance.kind = "minus";
+ }
+
+ this.next();
+ this.finishNode(variance, "Variance");
+ }
+
+ return variance;
+ }
+
+ parseFunctionBody(node, allowExpressionBody, isMethod = false) {
+ if (allowExpressionBody) {
+ return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
+ }
+
+ return super.parseFunctionBody(node, false, isMethod);
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ if (this.match(types.colon)) {
+ const typeNode = this.startNode();
+ [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
+ }
+
+ super.parseFunctionBodyAndFinish(node, type, isMethod);
+ }
+
+ parseStatement(context, topLevel) {
+ if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type === types.name || isKeyword(lookahead.value)) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseInterface(node);
+ }
+ } else if (this.shouldParseEnums() && this.isContextual("enum")) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(node);
+ }
+
+ const stmt = super.parseStatement(context, topLevel);
+
+ if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {
+ this.flowPragma = null;
+ }
+
+ return stmt;
+ }
+
+ parseExpressionStatement(node, expr) {
+ if (expr.type === "Identifier") {
+ if (expr.name === "declare") {
+ if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) {
+ return this.flowParseDeclare(node);
+ }
+ } else if (this.match(types.name)) {
+ if (expr.name === "interface") {
+ return this.flowParseInterface(node);
+ } else if (expr.name === "type") {
+ return this.flowParseTypeAlias(node);
+ } else if (expr.name === "opaque") {
+ return this.flowParseOpaqueType(node, false);
+ }
+ }
+ }
+
+ return super.parseExpressionStatement(node, expr);
+ }
+
+ shouldParseExportDeclaration() {
+ return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || super.shouldParseExportDeclaration();
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
+ return false;
+ }
+
+ return super.isExportDefaultSpecifier();
+ }
+
+ parseExportDefaultExpression() {
+ if (this.shouldParseEnums() && this.isContextual("enum")) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(node);
+ }
+
+ return super.parseExportDefaultExpression();
+ }
+
+ parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
+ if (!this.match(types.question)) return expr;
+
+ if (refNeedsArrowPos) {
+ const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
+
+ if (!result.node) {
+ refNeedsArrowPos.start = result.error.pos || this.state.start;
+ return expr;
+ }
+
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+
+ this.expect(types.question);
+ const state = this.state.clone();
+ const originalNoArrowAt = this.state.noArrowAt;
+ const node = this.startNodeAt(startPos, startLoc);
+ let {
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent();
+ let [valid, invalid] = this.getArrowLikeExpressions(consequent);
+
+ if (failed || invalid.length > 0) {
+ const noArrowAt = [...originalNoArrowAt];
+
+ if (invalid.length > 0) {
+ this.state = state;
+ this.state.noArrowAt = noArrowAt;
+
+ for (let i = 0; i < invalid.length; i++) {
+ noArrowAt.push(invalid[i].start);
+ }
+
+ ({
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent());
+ [valid, invalid] = this.getArrowLikeExpressions(consequent);
+ }
+
+ if (failed && valid.length > 1) {
+ this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
+ }
+
+ if (failed && valid.length === 1) {
+ this.state = state;
+ this.state.noArrowAt = noArrowAt.concat(valid[0].start);
+ ({
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent());
+ }
+ }
+
+ this.getArrowLikeExpressions(consequent, true);
+ this.state.noArrowAt = originalNoArrowAt;
+ this.expect(types.colon);
+ node.test = expr;
+ node.consequent = consequent;
+ node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined, undefined));
+ return this.finishNode(node, "ConditionalExpression");
+ }
+
+ tryParseConditionalConsequent() {
+ this.state.noArrowParamsConversionAt.push(this.state.start);
+ const consequent = this.parseMaybeAssignAllowIn();
+ const failed = !this.match(types.colon);
+ this.state.noArrowParamsConversionAt.pop();
+ return {
+ consequent,
+ failed
+ };
+ }
+
+ getArrowLikeExpressions(node, disallowInvalid) {
+ const stack = [node];
+ const arrows = [];
+
+ while (stack.length !== 0) {
+ const node = stack.pop();
+
+ if (node.type === "ArrowFunctionExpression") {
+ if (node.typeParameters || !node.returnType) {
+ this.finishArrowValidation(node);
+ } else {
+ arrows.push(node);
+ }
+
+ stack.push(node.body);
+ } else if (node.type === "ConditionalExpression") {
+ stack.push(node.consequent);
+ stack.push(node.alternate);
+ }
+ }
+
+ if (disallowInvalid) {
+ arrows.forEach(node => this.finishArrowValidation(node));
+ return [arrows, []];
+ }
+
+ return partition(arrows, node => node.params.every(param => this.isAssignable(param, true)));
+ }
+
+ finishArrowValidation(node) {
+ var _node$extra;
+
+ this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
+ super.checkParams(node, false, true);
+ this.scope.exit();
+ }
+
+ forwardNoArrowParamsConversionAt(node, parse) {
+ let result;
+
+ if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ this.state.noArrowParamsConversionAt.push(this.state.start);
+ result = parse();
+ this.state.noArrowParamsConversionAt.pop();
+ } else {
+ result = parse();
+ }
+
+ return result;
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ node = super.parseParenItem(node, startPos, startLoc);
+
+ if (this.eat(types.question)) {
+ node.optional = true;
+ this.resetEndLocation(node);
+ }
+
+ if (this.match(types.colon)) {
+ const typeCastNode = this.startNodeAt(startPos, startLoc);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TypeCastExpression");
+ }
+
+ return node;
+ }
+
+ assertModuleNodeAllowed(node) {
+ if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
+ return;
+ }
+
+ super.assertModuleNodeAllowed(node);
+ }
+
+ parseExport(node) {
+ const decl = super.parseExport(node);
+
+ if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
+ decl.exportKind = decl.exportKind || "value";
+ }
+
+ return decl;
+ }
+
+ parseExportDeclaration(node) {
+ if (this.isContextual("type")) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+
+ if (this.match(types.braceL)) {
+ node.specifiers = this.parseExportSpecifiers();
+ this.parseExportFrom(node);
+ return null;
+ } else {
+ return this.flowParseTypeAlias(declarationNode);
+ }
+ } else if (this.isContextual("opaque")) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseOpaqueType(declarationNode, false);
+ } else if (this.isContextual("interface")) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseInterface(declarationNode);
+ } else if (this.shouldParseEnums() && this.isContextual("enum")) {
+ node.exportKind = "value";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(declarationNode);
+ } else {
+ return super.parseExportDeclaration(node);
+ }
+ }
+
+ eatExportStar(node) {
+ if (super.eatExportStar(...arguments)) return true;
+
+ if (this.isContextual("type") && this.lookahead().type === types.star) {
+ node.exportKind = "type";
+ this.next();
+ this.next();
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamespaceSpecifier(node) {
+ const pos = this.state.start;
+ const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
+
+ if (hasNamespace && node.exportKind === "type") {
+ this.unexpected(pos);
+ }
+
+ return hasNamespace;
+ }
+
+ parseClassId(node, isStatement, optionalId) {
+ super.parseClassId(node, isStatement, optionalId);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+ }
+
+ parseClassMember(classBody, member, state) {
+ const pos = this.state.start;
+
+ if (this.isContextual("declare")) {
+ if (this.parseClassMemberFromModifier(classBody, member)) {
+ return;
+ }
+
+ member.declare = true;
+ }
+
+ super.parseClassMember(classBody, member, state);
+
+ if (member.declare) {
+ if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty") {
+ this.raise(pos, FlowErrors.DeclareClassElement);
+ } else if (member.value) {
+ this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
+ }
+ }
+ }
+
+ getTokenFromCode(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 123 && next === 124) {
+ return this.finishOp(types.braceBarL, 2);
+ } else if (this.state.inType && (code === 62 || code === 60)) {
+ return this.finishOp(types.relational, 1);
+ } else if (this.state.inType && code === 63) {
+ return this.finishOp(types.question, 1);
+ } else if (isIteratorStart(code, next)) {
+ this.state.isIterator = true;
+ return super.readWord();
+ } else {
+ return super.getTokenFromCode(code);
+ }
+ }
+
+ isAssignable(node, isBinding) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ return true;
+
+ case "ObjectExpression":
+ {
+ const last = node.properties.length - 1;
+ return node.properties.every((prop, i) => {
+ return prop.type !== "ObjectMethod" && (i === last || prop.type === "SpreadElement") && this.isAssignable(prop);
+ });
+ }
+
+ case "ObjectProperty":
+ return this.isAssignable(node.value);
+
+ case "SpreadElement":
+ return this.isAssignable(node.argument);
+
+ case "ArrayExpression":
+ return node.elements.every(element => this.isAssignable(element));
+
+ case "AssignmentExpression":
+ return node.operator === "=";
+
+ case "ParenthesizedExpression":
+ case "TypeCastExpression":
+ return this.isAssignable(node.expression);
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return !isBinding;
+
+ default:
+ return false;
+ }
+ }
+
+ toAssignable(node, isLHS = false) {
+ if (node.type === "TypeCastExpression") {
+ return super.toAssignable(this.typeCastToParameter(node), isLHS);
+ } else {
+ return super.toAssignable(node, isLHS);
+ }
+ }
+
+ toAssignableList(exprList, trailingCommaPos, isLHS) {
+ for (let i = 0; i < exprList.length; i++) {
+ const expr = exprList[i];
+
+ if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
+ exprList[i] = this.typeCastToParameter(expr);
+ }
+ }
+
+ return super.toAssignableList(exprList, trailingCommaPos, isLHS);
+ }
+
+ toReferencedList(exprList, isParenthesizedExpr) {
+ for (let i = 0; i < exprList.length; i++) {
+ var _expr$extra;
+
+ const expr = exprList[i];
+
+ if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) == null ? void 0 : _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
+ this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
+ }
+ }
+
+ return exprList;
+ }
+
+ parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
+ const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
+
+ if (canBePattern && !this.state.maybeInArrowParameters) {
+ this.toReferencedList(node.elements);
+ }
+
+ return node;
+ }
+
+ checkLVal(expr, ...args) {
+ if (expr.type !== "TypeCastExpression") {
+ return super.checkLVal(expr, ...args);
+ }
+ }
+
+ parseClassProperty(node) {
+ if (this.match(types.colon)) {
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+
+ return super.parseClassProperty(node);
+ }
+
+ parseClassPrivateProperty(node) {
+ if (this.match(types.colon)) {
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+
+ return super.parseClassPrivateProperty(node);
+ }
+
+ isClassMethod() {
+ return this.isRelational("<") || super.isClassMethod();
+ }
+
+ isClassProperty() {
+ return this.match(types.colon) || super.isClassProperty();
+ }
+
+ isNonstaticConstructor(method) {
+ return !this.match(types.colon) && super.isNonstaticConstructor(method);
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ if (method.variance) {
+ this.unexpected(method.variance.start);
+ }
+
+ delete method.variance;
+
+ if (this.isRelational("<")) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ if (method.variance) {
+ this.unexpected(method.variance.start);
+ }
+
+ delete method.variance;
+
+ if (this.isRelational("<")) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
+ }
+
+ parseClassSuper(node) {
+ super.parseClassSuper(node);
+
+ if (node.superClass && this.isRelational("<")) {
+ node.superTypeParameters = this.flowParseTypeParameterInstantiation();
+ }
+
+ if (this.isContextual("implements")) {
+ this.next();
+ const implemented = node.implements = [];
+
+ do {
+ const node = this.startNode();
+ node.id = this.flowParseRestrictedIdentifier(true);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+
+ implemented.push(this.finishNode(node, "ClassImplements"));
+ } while (this.eat(types.comma));
+ }
+ }
+
+ parsePropertyName(node, isPrivateNameAllowed) {
+ const variance = this.flowParseVariance();
+ const key = super.parsePropertyName(node, isPrivateNameAllowed);
+ node.variance = variance;
+ return key;
+ }
+
+ parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
+ if (prop.variance) {
+ this.unexpected(prop.variance.start);
+ }
+
+ delete prop.variance;
+ let typeParameters;
+
+ if (this.isRelational("<") && !isAccessor) {
+ typeParameters = this.flowParseTypeParameterDeclaration();
+ if (!this.match(types.parenL)) this.unexpected();
+ }
+
+ super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
+
+ if (typeParameters) {
+ (prop.value || prop).typeParameters = typeParameters;
+ }
+ }
+
+ parseAssignableListItemTypes(param) {
+ if (this.eat(types.question)) {
+ if (param.type !== "Identifier") {
+ this.raise(param.start, FlowErrors.OptionalBindingPattern);
+ }
+
+ param.optional = true;
+ }
+
+ if (this.match(types.colon)) {
+ param.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+
+ this.resetEndLocation(param);
+ return param;
+ }
+
+ parseMaybeDefault(startPos, startLoc, left) {
+ const node = super.parseMaybeDefault(startPos, startLoc, left);
+
+ if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
+ this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
+ }
+
+ return node;
+ }
+
+ shouldParseDefaultImport(node) {
+ if (!hasTypeImportKind(node)) {
+ return super.shouldParseDefaultImport(node);
+ }
+
+ return isMaybeDefaultImport(this.state);
+ }
+
+ parseImportSpecifierLocal(node, specifier, type, contextDescription) {
+ specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
+ this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, type));
+ }
+
+ maybeParseDefaultImportSpecifier(node) {
+ node.importKind = "value";
+ let kind = null;
+
+ if (this.match(types._typeof)) {
+ kind = "typeof";
+ } else if (this.isContextual("type")) {
+ kind = "type";
+ }
+
+ if (kind) {
+ const lh = this.lookahead();
+
+ if (kind === "type" && lh.type === types.star) {
+ this.unexpected(lh.start);
+ }
+
+ if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) {
+ this.next();
+ node.importKind = kind;
+ }
+ }
+
+ return super.maybeParseDefaultImportSpecifier(node);
+ }
+
+ parseImportSpecifier(node) {
+ const specifier = this.startNode();
+ const firstIdentLoc = this.state.start;
+ const firstIdent = this.parseModuleExportName();
+ let specifierTypeKind = null;
+
+ if (firstIdent.type === "Identifier") {
+ if (firstIdent.name === "type") {
+ specifierTypeKind = "type";
+ } else if (firstIdent.name === "typeof") {
+ specifierTypeKind = "typeof";
+ }
+ }
+
+ let isBinding = false;
+
+ if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
+ const as_ident = this.parseIdentifier(true);
+
+ if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
+ specifier.imported = as_ident;
+ specifier.importKind = specifierTypeKind;
+ specifier.local = as_ident.__clone();
+ } else {
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ specifier.local = this.parseIdentifier();
+ }
+ } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
+ specifier.imported = this.parseIdentifier(true);
+ specifier.importKind = specifierTypeKind;
+
+ if (this.eatContextual("as")) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ isBinding = true;
+ specifier.local = specifier.imported.__clone();
+ }
+ } else {
+ if (firstIdent.type === "StringLiteral") {
+ throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
+ }
+
+ isBinding = true;
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ specifier.local = specifier.imported.__clone();
+ }
+
+ const nodeIsTypeImport = hasTypeImportKind(node);
+ const specifierIsTypeImport = hasTypeImportKind(specifier);
+
+ if (nodeIsTypeImport && specifierIsTypeImport) {
+ this.raise(firstIdentLoc, FlowErrors.ImportTypeShorthandOnlyInPureImport);
+ }
+
+ if (nodeIsTypeImport || specifierIsTypeImport) {
+ this.checkReservedType(specifier.local.name, specifier.local.start, true);
+ }
+
+ if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
+ this.checkReservedWord(specifier.local.name, specifier.start, true, true);
+ }
+
+ this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ const kind = node.kind;
+
+ if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.parseFunctionParams(node, allowModifiers);
+ }
+
+ parseVarId(decl, kind) {
+ super.parseVarId(decl, kind);
+
+ if (this.match(types.colon)) {
+ decl.id.typeAnnotation = this.flowParseTypeAnnotation();
+ this.resetEndLocation(decl.id);
+ }
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ if (this.match(types.colon)) {
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
+ node.returnType = this.flowParseTypeAnnotation();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ }
+
+ return super.parseAsyncArrowFromCallExpression(node, call);
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(types.colon) || super.shouldParseAsyncArrow();
+ }
+
+ parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
+ var _jsx;
+
+ let state = null;
+ let jsx;
+
+ if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) {
+ state = this.state.clone();
+ jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos), state);
+ if (!jsx.error) return jsx.node;
+ const {
+ context
+ } = this.state;
+
+ if (context[context.length - 1] === types$1.j_oTag) {
+ context.length -= 2;
+ } else if (context[context.length - 1] === types$1.j_expr) {
+ context.length -= 1;
+ }
+ }
+
+ if (((_jsx = jsx) == null ? void 0 : _jsx.error) || this.isRelational("<")) {
+ var _jsx2, _jsx3;
+
+ state = state || this.state.clone();
+ let typeParameters;
+ const arrow = this.tryParse(abort => {
+ var _arrowExpression$extr;
+
+ typeParameters = this.flowParseTypeParameterDeclaration();
+ const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
+ const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
+ this.resetStartLocationFromNode(result, typeParameters);
+ return result;
+ });
+
+ if (arrowExpression.type !== "ArrowFunctionExpression" && ((_arrowExpression$extr = arrowExpression.extra) == null ? void 0 : _arrowExpression$extr.parenthesized)) {
+ abort();
+ }
+
+ const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);
+ expr.typeParameters = typeParameters;
+ this.resetStartLocationFromNode(expr, typeParameters);
+ return arrowExpression;
+ }, state);
+ let arrowExpression = null;
+
+ if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
+ if (!arrow.error && !arrow.aborted) {
+ if (arrow.node.async) {
+ this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
+ }
+
+ return arrow.node;
+ }
+
+ arrowExpression = arrow.node;
+ }
+
+ if ((_jsx2 = jsx) == null ? void 0 : _jsx2.node) {
+ this.state = jsx.failState;
+ return jsx.node;
+ }
+
+ if (arrowExpression) {
+ this.state = arrow.failState;
+ return arrowExpression;
+ }
+
+ if ((_jsx3 = jsx) == null ? void 0 : _jsx3.thrown) throw jsx.error;
+ if (arrow.thrown) throw arrow.error;
+ throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
+ }
+
+ return super.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos);
+ }
+
+ parseArrow(node) {
+ if (this.match(types.colon)) {
+ const result = this.tryParse(() => {
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
+ const typeNode = this.startNode();
+ [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ if (this.canInsertSemicolon()) this.unexpected();
+ if (!this.match(types.arrow)) this.unexpected();
+ return typeNode;
+ });
+ if (result.thrown) return null;
+ if (result.error) this.state = result.failState;
+ node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
+ }
+
+ return super.parseArrow(node);
+ }
+
+ shouldParseArrow() {
+ return this.match(types.colon) || super.shouldParseArrow();
+ }
+
+ setArrowFunctionParameters(node, params) {
+ if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ node.params = params;
+ } else {
+ super.setArrowFunctionParameters(node, params);
+ }
+ }
+
+ checkParams(node, allowDuplicates, isArrowFunction) {
+ if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ return;
+ }
+
+ return super.checkParams(...arguments);
+ }
+
+ parseParenAndDistinguishExpression(canBeArrow) {
+ return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
+ }
+
+ parseSubscripts(base, startPos, startLoc, noCalls) {
+ if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
+ this.next();
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ base = this.finishNode(node, "CallExpression");
+ } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) {
+ const state = this.state.clone();
+ const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
+ if (!arrow.error && !arrow.aborted) return arrow.node;
+ const result = this.tryParse(() => super.parseSubscripts(base, startPos, startLoc, noCalls), state);
+ if (result.node && !result.error) return result.node;
+
+ if (arrow.node) {
+ this.state = arrow.failState;
+ return arrow.node;
+ }
+
+ if (result.node) {
+ this.state = result.failState;
+ return result.node;
+ }
+
+ throw arrow.error || result.error;
+ }
+
+ return super.parseSubscripts(base, startPos, startLoc, noCalls);
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, subscriptState) {
+ if (this.match(types.questionDot) && this.isLookaheadToken_lt()) {
+ subscriptState.optionalChainMember = true;
+
+ if (noCalls) {
+ subscriptState.stop = true;
+ return base;
+ }
+
+ this.next();
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ node.typeArguments = this.flowParseTypeParameterInstantiation();
+ this.expect(types.parenL);
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ node.optional = true;
+ return this.finishCallExpression(node, true);
+ } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ const result = this.tryParse(() => {
+ node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
+ this.expect(types.parenL);
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ if (subscriptState.optionalChainMember) node.optional = false;
+ return this.finishCallExpression(node, subscriptState.optionalChainMember);
+ });
+
+ if (result.node) {
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+ }
+
+ return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState);
+ }
+
+ parseNewArguments(node) {
+ let targs = null;
+
+ if (this.shouldParseTypes() && this.isRelational("<")) {
+ targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
+ }
+
+ node.typeArguments = targs;
+ super.parseNewArguments(node);
+ }
+
+ parseAsyncArrowWithTypeParameters(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+ this.parseFunctionParams(node);
+ if (!this.parseArrow(node)) return;
+ return this.parseArrowExpression(node, undefined, true);
+ }
+
+ readToken_mult_modulo(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 42 && next === 47 && this.state.hasFlowComment) {
+ this.state.hasFlowComment = false;
+ this.state.pos += 2;
+ this.nextToken();
+ return;
+ }
+
+ super.readToken_mult_modulo(code);
+ }
+
+ readToken_pipe_amp(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 124 && next === 125) {
+ this.finishOp(types.braceBarR, 2);
+ return;
+ }
+
+ super.readToken_pipe_amp(code);
+ }
+
+ parseTopLevel(file, program) {
+ const fileNode = super.parseTopLevel(file, program);
+
+ if (this.state.hasFlowComment) {
+ this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
+ }
+
+ return fileNode;
+ }
+
+ skipBlockComment() {
+ if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
+ if (this.state.hasFlowComment) {
+ this.unexpected(null, FlowErrors.NestedFlowComment);
+ }
+
+ this.hasFlowCommentCompletion();
+ this.state.pos += this.skipFlowComment();
+ this.state.hasFlowComment = true;
+ return;
+ }
+
+ if (this.state.hasFlowComment) {
+ const end = this.input.indexOf("*-/", this.state.pos += 2);
+
+ if (end === -1) {
+ throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
+ }
+
+ this.state.pos = end + 3;
+ return;
+ }
+
+ super.skipBlockComment();
+ }
+
+ skipFlowComment() {
+ const {
+ pos
+ } = this.state;
+ let shiftToFirstNonWhiteSpace = 2;
+
+ while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
+ shiftToFirstNonWhiteSpace++;
+ }
+
+ const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
+ const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
+
+ if (ch2 === 58 && ch3 === 58) {
+ return shiftToFirstNonWhiteSpace + 2;
+ }
+
+ if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
+ return shiftToFirstNonWhiteSpace + 12;
+ }
+
+ if (ch2 === 58 && ch3 !== 58) {
+ return shiftToFirstNonWhiteSpace;
+ }
+
+ return false;
+ }
+
+ hasFlowCommentCompletion() {
+ const end = this.input.indexOf("*/", this.state.pos);
+
+ if (end === -1) {
+ throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
+ }
+ }
+
+ flowEnumErrorBooleanMemberNotInitialized(pos, {
+ enumName,
+ memberName
+ }) {
+ this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
+ }
+
+ flowEnumErrorInvalidMemberName(pos, {
+ enumName,
+ memberName
+ }) {
+ const suggestion = memberName[0].toUpperCase() + memberName.slice(1);
+ this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
+ }
+
+ flowEnumErrorDuplicateMemberName(pos, {
+ enumName,
+ memberName
+ }) {
+ this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
+ }
+
+ flowEnumErrorInconsistentMemberValues(pos, {
+ enumName
+ }) {
+ this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
+ }
+
+ flowEnumErrorInvalidExplicitType(pos, {
+ enumName,
+ suppliedType
+ }) {
+ return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
+ }
+
+ flowEnumErrorInvalidMemberInitializer(pos, {
+ enumName,
+ explicitType,
+ memberName
+ }) {
+ let message = null;
+
+ switch (explicitType) {
+ case "boolean":
+ case "number":
+ case "string":
+ message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
+ break;
+
+ case "symbol":
+ message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
+ break;
+
+ default:
+ message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
+ }
+
+ return this.raise(pos, message, enumName, memberName, explicitType);
+ }
+
+ flowEnumErrorNumberMemberNotInitialized(pos, {
+ enumName,
+ memberName
+ }) {
+ this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
+ }
+
+ flowEnumErrorStringMemberInconsistentlyInitailized(pos, {
+ enumName
+ }) {
+ this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
+ }
+
+ flowEnumMemberInit() {
+ const startPos = this.state.start;
+
+ const endOfInit = () => this.match(types.comma) || this.match(types.braceR);
+
+ switch (this.state.type) {
+ case types.num:
+ {
+ const literal = this.parseLiteral(this.state.value, "NumericLiteral");
+
+ if (endOfInit()) {
+ return {
+ type: "number",
+ pos: literal.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ pos: startPos
+ };
+ }
+
+ case types.string:
+ {
+ const literal = this.parseLiteral(this.state.value, "StringLiteral");
+
+ if (endOfInit()) {
+ return {
+ type: "string",
+ pos: literal.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ pos: startPos
+ };
+ }
+
+ case types._true:
+ case types._false:
+ {
+ const literal = this.parseBooleanLiteral();
+
+ if (endOfInit()) {
+ return {
+ type: "boolean",
+ pos: literal.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ pos: startPos
+ };
+ }
+
+ default:
+ return {
+ type: "invalid",
+ pos: startPos
+ };
+ }
+ }
+
+ flowEnumMemberRaw() {
+ const pos = this.state.start;
+ const id = this.parseIdentifier(true);
+ const init = this.eat(types.eq) ? this.flowEnumMemberInit() : {
+ type: "none",
+ pos
+ };
+ return {
+ id,
+ init
+ };
+ }
+
+ flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
+ const {
+ explicitType
+ } = context;
+
+ if (explicitType === null) {
+ return;
+ }
+
+ if (explicitType !== expectedType) {
+ this.flowEnumErrorInvalidMemberInitializer(pos, context);
+ }
+ }
+
+ flowEnumMembers({
+ enumName,
+ explicitType
+ }) {
+ const seenNames = new Set();
+ const members = {
+ booleanMembers: [],
+ numberMembers: [],
+ stringMembers: [],
+ defaultedMembers: []
+ };
+
+ while (!this.match(types.braceR)) {
+ const memberNode = this.startNode();
+ const {
+ id,
+ init
+ } = this.flowEnumMemberRaw();
+ const memberName = id.name;
+
+ if (memberName === "") {
+ continue;
+ }
+
+ if (/^[a-z]/.test(memberName)) {
+ this.flowEnumErrorInvalidMemberName(id.start, {
+ enumName,
+ memberName
+ });
+ }
+
+ if (seenNames.has(memberName)) {
+ this.flowEnumErrorDuplicateMemberName(id.start, {
+ enumName,
+ memberName
+ });
+ }
+
+ seenNames.add(memberName);
+ const context = {
+ enumName,
+ explicitType,
+ memberName
+ };
+ memberNode.id = id;
+
+ switch (init.type) {
+ case "boolean":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
+ memberNode.init = init.value;
+ members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
+ break;
+ }
+
+ case "number":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
+ memberNode.init = init.value;
+ members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
+ break;
+ }
+
+ case "string":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
+ memberNode.init = init.value;
+ members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
+ break;
+ }
+
+ case "invalid":
+ {
+ throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
+ }
+
+ case "none":
+ {
+ switch (explicitType) {
+ case "boolean":
+ this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
+ break;
+
+ case "number":
+ this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
+ break;
+
+ default:
+ members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
+ }
+ }
+ }
+
+ if (!this.match(types.braceR)) {
+ this.expect(types.comma);
+ }
+ }
+
+ return members;
+ }
+
+ flowEnumStringMembers(initializedMembers, defaultedMembers, {
+ enumName
+ }) {
+ if (initializedMembers.length === 0) {
+ return defaultedMembers;
+ } else if (defaultedMembers.length === 0) {
+ return initializedMembers;
+ } else if (defaultedMembers.length > initializedMembers.length) {
+ for (let _i = 0; _i < initializedMembers.length; _i++) {
+ const member = initializedMembers[_i];
+ this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
+ enumName
+ });
+ }
+
+ return defaultedMembers;
+ } else {
+ for (let _i2 = 0; _i2 < defaultedMembers.length; _i2++) {
+ const member = defaultedMembers[_i2];
+ this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
+ enumName
+ });
+ }
+
+ return initializedMembers;
+ }
+ }
+
+ flowEnumParseExplicitType({
+ enumName
+ }) {
+ if (this.eatContextual("of")) {
+ if (!this.match(types.name)) {
+ throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
+ enumName,
+ suppliedType: null
+ });
+ }
+
+ const {
+ value
+ } = this.state;
+ this.next();
+
+ if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
+ this.flowEnumErrorInvalidExplicitType(this.state.start, {
+ enumName,
+ suppliedType: value
+ });
+ }
+
+ return value;
+ }
+
+ return null;
+ }
+
+ flowEnumBody(node, {
+ enumName,
+ nameLoc
+ }) {
+ const explicitType = this.flowEnumParseExplicitType({
+ enumName
+ });
+ this.expect(types.braceL);
+ const members = this.flowEnumMembers({
+ enumName,
+ explicitType
+ });
+
+ switch (explicitType) {
+ case "boolean":
+ node.explicitType = true;
+ node.members = members.booleanMembers;
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumBooleanBody");
+
+ case "number":
+ node.explicitType = true;
+ node.members = members.numberMembers;
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumNumberBody");
+
+ case "string":
+ node.explicitType = true;
+ node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
+ enumName
+ });
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumStringBody");
+
+ case "symbol":
+ node.members = members.defaultedMembers;
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumSymbolBody");
+
+ default:
+ {
+ const empty = () => {
+ node.members = [];
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumStringBody");
+ };
+
+ node.explicitType = false;
+ const boolsLen = members.booleanMembers.length;
+ const numsLen = members.numberMembers.length;
+ const strsLen = members.stringMembers.length;
+ const defaultedLen = members.defaultedMembers.length;
+
+ if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
+ return empty();
+ } else if (!boolsLen && !numsLen) {
+ node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
+ enumName
+ });
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumStringBody");
+ } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
+ for (let _i3 = 0, _members$defaultedMem = members.defaultedMembers; _i3 < _members$defaultedMem.length; _i3++) {
+ const member = _members$defaultedMem[_i3];
+ this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
+ enumName,
+ memberName: member.id.name
+ });
+ }
+
+ node.members = members.booleanMembers;
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumBooleanBody");
+ } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
+ for (let _i4 = 0, _members$defaultedMem2 = members.defaultedMembers; _i4 < _members$defaultedMem2.length; _i4++) {
+ const member = _members$defaultedMem2[_i4];
+ this.flowEnumErrorNumberMemberNotInitialized(member.start, {
+ enumName,
+ memberName: member.id.name
+ });
+ }
+
+ node.members = members.numberMembers;
+ this.expect(types.braceR);
+ return this.finishNode(node, "EnumNumberBody");
+ } else {
+ this.flowEnumErrorInconsistentMemberValues(nameLoc, {
+ enumName
+ });
+ return empty();
+ }
+ }
+ }
+ }
+
+ flowParseEnumDeclaration(node) {
+ const id = this.parseIdentifier();
+ node.id = id;
+ node.body = this.flowEnumBody(this.startNode(), {
+ enumName: id.name,
+ nameLoc: id.start
+ });
+ return this.finishNode(node, "EnumDeclaration");
+ }
+
+ updateContext(prevType) {
+ if (this.match(types.name) && this.state.value === "of" && prevType === types.name && this.input.slice(this.state.lastTokStart, this.state.lastTokEnd) === "interface") {
+ this.state.exprAllowed = false;
+ } else {
+ super.updateContext(prevType);
+ }
+ }
+
+ isLookaheadToken_lt() {
+ const next = this.nextTokenStart();
+
+ if (this.input.charCodeAt(next) === 60) {
+ const afterNext = this.input.charCodeAt(next + 1);
+ return afterNext !== 60 && afterNext !== 61;
+ }
+
+ return false;
+ }
+
+ maybeUnwrapTypeCastExpression(node) {
+ return node.type === "TypeCastExpression" ? node.expression : node;
+ }
+
+ }, _temp;
+});
+
+const entities = {
+ quot: "\u0022",
+ amp: "&",
+ apos: "\u0027",
+ lt: "<",
+ gt: ">",
+ nbsp: "\u00A0",
+ iexcl: "\u00A1",
+ cent: "\u00A2",
+ pound: "\u00A3",
+ curren: "\u00A4",
+ yen: "\u00A5",
+ brvbar: "\u00A6",
+ sect: "\u00A7",
+ uml: "\u00A8",
+ copy: "\u00A9",
+ ordf: "\u00AA",
+ laquo: "\u00AB",
+ not: "\u00AC",
+ shy: "\u00AD",
+ reg: "\u00AE",
+ macr: "\u00AF",
+ deg: "\u00B0",
+ plusmn: "\u00B1",
+ sup2: "\u00B2",
+ sup3: "\u00B3",
+ acute: "\u00B4",
+ micro: "\u00B5",
+ para: "\u00B6",
+ middot: "\u00B7",
+ cedil: "\u00B8",
+ sup1: "\u00B9",
+ ordm: "\u00BA",
+ raquo: "\u00BB",
+ frac14: "\u00BC",
+ frac12: "\u00BD",
+ frac34: "\u00BE",
+ iquest: "\u00BF",
+ Agrave: "\u00C0",
+ Aacute: "\u00C1",
+ Acirc: "\u00C2",
+ Atilde: "\u00C3",
+ Auml: "\u00C4",
+ Aring: "\u00C5",
+ AElig: "\u00C6",
+ Ccedil: "\u00C7",
+ Egrave: "\u00C8",
+ Eacute: "\u00C9",
+ Ecirc: "\u00CA",
+ Euml: "\u00CB",
+ Igrave: "\u00CC",
+ Iacute: "\u00CD",
+ Icirc: "\u00CE",
+ Iuml: "\u00CF",
+ ETH: "\u00D0",
+ Ntilde: "\u00D1",
+ Ograve: "\u00D2",
+ Oacute: "\u00D3",
+ Ocirc: "\u00D4",
+ Otilde: "\u00D5",
+ Ouml: "\u00D6",
+ times: "\u00D7",
+ Oslash: "\u00D8",
+ Ugrave: "\u00D9",
+ Uacute: "\u00DA",
+ Ucirc: "\u00DB",
+ Uuml: "\u00DC",
+ Yacute: "\u00DD",
+ THORN: "\u00DE",
+ szlig: "\u00DF",
+ agrave: "\u00E0",
+ aacute: "\u00E1",
+ acirc: "\u00E2",
+ atilde: "\u00E3",
+ auml: "\u00E4",
+ aring: "\u00E5",
+ aelig: "\u00E6",
+ ccedil: "\u00E7",
+ egrave: "\u00E8",
+ eacute: "\u00E9",
+ ecirc: "\u00EA",
+ euml: "\u00EB",
+ igrave: "\u00EC",
+ iacute: "\u00ED",
+ icirc: "\u00EE",
+ iuml: "\u00EF",
+ eth: "\u00F0",
+ ntilde: "\u00F1",
+ ograve: "\u00F2",
+ oacute: "\u00F3",
+ ocirc: "\u00F4",
+ otilde: "\u00F5",
+ ouml: "\u00F6",
+ divide: "\u00F7",
+ oslash: "\u00F8",
+ ugrave: "\u00F9",
+ uacute: "\u00FA",
+ ucirc: "\u00FB",
+ uuml: "\u00FC",
+ yacute: "\u00FD",
+ thorn: "\u00FE",
+ yuml: "\u00FF",
+ OElig: "\u0152",
+ oelig: "\u0153",
+ Scaron: "\u0160",
+ scaron: "\u0161",
+ Yuml: "\u0178",
+ fnof: "\u0192",
+ circ: "\u02C6",
+ tilde: "\u02DC",
+ Alpha: "\u0391",
+ Beta: "\u0392",
+ Gamma: "\u0393",
+ Delta: "\u0394",
+ Epsilon: "\u0395",
+ Zeta: "\u0396",
+ Eta: "\u0397",
+ Theta: "\u0398",
+ Iota: "\u0399",
+ Kappa: "\u039A",
+ Lambda: "\u039B",
+ Mu: "\u039C",
+ Nu: "\u039D",
+ Xi: "\u039E",
+ Omicron: "\u039F",
+ Pi: "\u03A0",
+ Rho: "\u03A1",
+ Sigma: "\u03A3",
+ Tau: "\u03A4",
+ Upsilon: "\u03A5",
+ Phi: "\u03A6",
+ Chi: "\u03A7",
+ Psi: "\u03A8",
+ Omega: "\u03A9",
+ alpha: "\u03B1",
+ beta: "\u03B2",
+ gamma: "\u03B3",
+ delta: "\u03B4",
+ epsilon: "\u03B5",
+ zeta: "\u03B6",
+ eta: "\u03B7",
+ theta: "\u03B8",
+ iota: "\u03B9",
+ kappa: "\u03BA",
+ lambda: "\u03BB",
+ mu: "\u03BC",
+ nu: "\u03BD",
+ xi: "\u03BE",
+ omicron: "\u03BF",
+ pi: "\u03C0",
+ rho: "\u03C1",
+ sigmaf: "\u03C2",
+ sigma: "\u03C3",
+ tau: "\u03C4",
+ upsilon: "\u03C5",
+ phi: "\u03C6",
+ chi: "\u03C7",
+ psi: "\u03C8",
+ omega: "\u03C9",
+ thetasym: "\u03D1",
+ upsih: "\u03D2",
+ piv: "\u03D6",
+ ensp: "\u2002",
+ emsp: "\u2003",
+ thinsp: "\u2009",
+ zwnj: "\u200C",
+ zwj: "\u200D",
+ lrm: "\u200E",
+ rlm: "\u200F",
+ ndash: "\u2013",
+ mdash: "\u2014",
+ lsquo: "\u2018",
+ rsquo: "\u2019",
+ sbquo: "\u201A",
+ ldquo: "\u201C",
+ rdquo: "\u201D",
+ bdquo: "\u201E",
+ dagger: "\u2020",
+ Dagger: "\u2021",
+ bull: "\u2022",
+ hellip: "\u2026",
+ permil: "\u2030",
+ prime: "\u2032",
+ Prime: "\u2033",
+ lsaquo: "\u2039",
+ rsaquo: "\u203A",
+ oline: "\u203E",
+ frasl: "\u2044",
+ euro: "\u20AC",
+ image: "\u2111",
+ weierp: "\u2118",
+ real: "\u211C",
+ trade: "\u2122",
+ alefsym: "\u2135",
+ larr: "\u2190",
+ uarr: "\u2191",
+ rarr: "\u2192",
+ darr: "\u2193",
+ harr: "\u2194",
+ crarr: "\u21B5",
+ lArr: "\u21D0",
+ uArr: "\u21D1",
+ rArr: "\u21D2",
+ dArr: "\u21D3",
+ hArr: "\u21D4",
+ forall: "\u2200",
+ part: "\u2202",
+ exist: "\u2203",
+ empty: "\u2205",
+ nabla: "\u2207",
+ isin: "\u2208",
+ notin: "\u2209",
+ ni: "\u220B",
+ prod: "\u220F",
+ sum: "\u2211",
+ minus: "\u2212",
+ lowast: "\u2217",
+ radic: "\u221A",
+ prop: "\u221D",
+ infin: "\u221E",
+ ang: "\u2220",
+ and: "\u2227",
+ or: "\u2228",
+ cap: "\u2229",
+ cup: "\u222A",
+ int: "\u222B",
+ there4: "\u2234",
+ sim: "\u223C",
+ cong: "\u2245",
+ asymp: "\u2248",
+ ne: "\u2260",
+ equiv: "\u2261",
+ le: "\u2264",
+ ge: "\u2265",
+ sub: "\u2282",
+ sup: "\u2283",
+ nsub: "\u2284",
+ sube: "\u2286",
+ supe: "\u2287",
+ oplus: "\u2295",
+ otimes: "\u2297",
+ perp: "\u22A5",
+ sdot: "\u22C5",
+ lceil: "\u2308",
+ rceil: "\u2309",
+ lfloor: "\u230A",
+ rfloor: "\u230B",
+ lang: "\u2329",
+ rang: "\u232A",
+ loz: "\u25CA",
+ spades: "\u2660",
+ clubs: "\u2663",
+ hearts: "\u2665",
+ diams: "\u2666"
+};
+
+const HEX_NUMBER = /^[\da-fA-F]+$/;
+const DECIMAL_NUMBER = /^\d+$/;
+const JsxErrors = Object.freeze({
+ AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression",
+ MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>",
+ MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>",
+ UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text",
+ UnterminatedJsxContent: "Unterminated JSX contents",
+ UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
+});
+types$1.j_oTag = new TokContext("<tag", false);
+types$1.j_cTag = new TokContext("</tag", false);
+types$1.j_expr = new TokContext("<tag>...</tag>", true, true);
+types.jsxName = new TokenType("jsxName");
+types.jsxText = new TokenType("jsxText", {
+ beforeExpr: true
+});
+types.jsxTagStart = new TokenType("jsxTagStart", {
+ startsExpr: true
+});
+types.jsxTagEnd = new TokenType("jsxTagEnd");
+
+types.jsxTagStart.updateContext = function () {
+ this.state.context.push(types$1.j_expr);
+ this.state.context.push(types$1.j_oTag);
+ this.state.exprAllowed = false;
+};
+
+types.jsxTagEnd.updateContext = function (prevType) {
+ const out = this.state.context.pop();
+
+ if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {
+ this.state.context.pop();
+ this.state.exprAllowed = this.curContext() === types$1.j_expr;
+ } else {
+ this.state.exprAllowed = true;
+ }
+};
+
+function isFragment(object) {
+ return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
+}
+
+function getQualifiedJSXName(object) {
+ if (object.type === "JSXIdentifier") {
+ return object.name;
+ }
+
+ if (object.type === "JSXNamespacedName") {
+ return object.namespace.name + ":" + object.name.name;
+ }
+
+ if (object.type === "JSXMemberExpression") {
+ return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
+ }
+
+ throw new Error("Node had unexpected type: " + object.type);
+}
+
+var jsx = (superClass => class extends superClass {
+ jsxReadToken() {
+ let out = "";
+ let chunkStart = this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 60:
+ case 123:
+ if (this.state.pos === this.state.start) {
+ if (ch === 60 && this.state.exprAllowed) {
+ ++this.state.pos;
+ return this.finishToken(types.jsxTagStart);
+ }
+
+ return super.getTokenFromCode(ch);
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos);
+ return this.finishToken(types.jsxText, out);
+
+ case 38:
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ break;
+
+ default:
+ if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(true);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+
+ }
+ }
+ }
+
+ jsxReadNewLine(normalizeCRLF) {
+ const ch = this.input.charCodeAt(this.state.pos);
+ let out;
+ ++this.state.pos;
+
+ if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ out = normalizeCRLF ? "\n" : "\r\n";
+ } else {
+ out = String.fromCharCode(ch);
+ }
+
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ return out;
+ }
+
+ jsxReadString(quote) {
+ let out = "";
+ let chunkStart = ++this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 38) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(false);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos++);
+ return this.finishToken(types.string, out);
+ }
+
+ jsxReadEntity() {
+ let str = "";
+ let count = 0;
+ let entity;
+ let ch = this.input[this.state.pos];
+ const startPos = ++this.state.pos;
+
+ while (this.state.pos < this.length && count++ < 10) {
+ ch = this.input[this.state.pos++];
+
+ if (ch === ";") {
+ if (str[0] === "#") {
+ if (str[1] === "x") {
+ str = str.substr(2);
+
+ if (HEX_NUMBER.test(str)) {
+ entity = String.fromCodePoint(parseInt(str, 16));
+ }
+ } else {
+ str = str.substr(1);
+
+ if (DECIMAL_NUMBER.test(str)) {
+ entity = String.fromCodePoint(parseInt(str, 10));
+ }
+ }
+ } else {
+ entity = entities[str];
+ }
+
+ break;
+ }
+
+ str += ch;
+ }
+
+ if (!entity) {
+ this.state.pos = startPos;
+ return "&";
+ }
+
+ return entity;
+ }
+
+ jsxReadWord() {
+ let ch;
+ const start = this.state.pos;
+
+ do {
+ ch = this.input.charCodeAt(++this.state.pos);
+ } while (isIdentifierChar(ch) || ch === 45);
+
+ return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));
+ }
+
+ jsxParseIdentifier() {
+ const node = this.startNode();
+
+ if (this.match(types.jsxName)) {
+ node.name = this.state.value;
+ } else if (this.state.type.keyword) {
+ node.name = this.state.type.keyword;
+ } else {
+ this.unexpected();
+ }
+
+ this.next();
+ return this.finishNode(node, "JSXIdentifier");
+ }
+
+ jsxParseNamespacedName() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const name = this.jsxParseIdentifier();
+ if (!this.eat(types.colon)) return name;
+ const node = this.startNodeAt(startPos, startLoc);
+ node.namespace = name;
+ node.name = this.jsxParseIdentifier();
+ return this.finishNode(node, "JSXNamespacedName");
+ }
+
+ jsxParseElementName() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let node = this.jsxParseNamespacedName();
+
+ if (node.type === "JSXNamespacedName") {
+ return node;
+ }
+
+ while (this.eat(types.dot)) {
+ const newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node;
+ newNode.property = this.jsxParseIdentifier();
+ node = this.finishNode(newNode, "JSXMemberExpression");
+ }
+
+ return node;
+ }
+
+ jsxParseAttributeValue() {
+ let node;
+
+ switch (this.state.type) {
+ case types.braceL:
+ node = this.startNode();
+ this.next();
+ node = this.jsxParseExpressionContainer(node);
+
+ if (node.expression.type === "JSXEmptyExpression") {
+ this.raise(node.start, JsxErrors.AttributeIsEmpty);
+ }
+
+ return node;
+
+ case types.jsxTagStart:
+ case types.string:
+ return this.parseExprAtom();
+
+ default:
+ throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
+ }
+ }
+
+ jsxParseEmptyExpression() {
+ const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
+ return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
+ }
+
+ jsxParseSpreadChild(node) {
+ this.next();
+ node.expression = this.parseExpression();
+ this.expect(types.braceR);
+ return this.finishNode(node, "JSXSpreadChild");
+ }
+
+ jsxParseExpressionContainer(node) {
+ if (this.match(types.braceR)) {
+ node.expression = this.jsxParseEmptyExpression();
+ } else {
+ node.expression = this.parseExpression();
+ }
+
+ this.expect(types.braceR);
+ return this.finishNode(node, "JSXExpressionContainer");
+ }
+
+ jsxParseAttribute() {
+ const node = this.startNode();
+
+ if (this.eat(types.braceL)) {
+ this.expect(types.ellipsis);
+ node.argument = this.parseMaybeAssignAllowIn();
+ this.expect(types.braceR);
+ return this.finishNode(node, "JSXSpreadAttribute");
+ }
+
+ node.name = this.jsxParseNamespacedName();
+ node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;
+ return this.finishNode(node, "JSXAttribute");
+ }
+
+ jsxParseOpeningElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+
+ if (this.match(types.jsxTagEnd)) {
+ this.expect(types.jsxTagEnd);
+ return this.finishNode(node, "JSXOpeningFragment");
+ }
+
+ node.name = this.jsxParseElementName();
+ return this.jsxParseOpeningElementAfterName(node);
+ }
+
+ jsxParseOpeningElementAfterName(node) {
+ const attributes = [];
+
+ while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
+ attributes.push(this.jsxParseAttribute());
+ }
+
+ node.attributes = attributes;
+ node.selfClosing = this.eat(types.slash);
+ this.expect(types.jsxTagEnd);
+ return this.finishNode(node, "JSXOpeningElement");
+ }
+
+ jsxParseClosingElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+
+ if (this.match(types.jsxTagEnd)) {
+ this.expect(types.jsxTagEnd);
+ return this.finishNode(node, "JSXClosingFragment");
+ }
+
+ node.name = this.jsxParseElementName();
+ this.expect(types.jsxTagEnd);
+ return this.finishNode(node, "JSXClosingElement");
+ }
+
+ jsxParseElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const children = [];
+ const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
+ let closingElement = null;
+
+ if (!openingElement.selfClosing) {
+ contents: for (;;) {
+ switch (this.state.type) {
+ case types.jsxTagStart:
+ startPos = this.state.start;
+ startLoc = this.state.startLoc;
+ this.next();
+
+ if (this.eat(types.slash)) {
+ closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+
+ children.push(this.jsxParseElementAt(startPos, startLoc));
+ break;
+
+ case types.jsxText:
+ children.push(this.parseExprAtom());
+ break;
+
+ case types.braceL:
+ {
+ const node = this.startNode();
+ this.next();
+
+ if (this.match(types.ellipsis)) {
+ children.push(this.jsxParseSpreadChild(node));
+ } else {
+ children.push(this.jsxParseExpressionContainer(node));
+ }
+
+ break;
+ }
+
+ default:
+ throw this.unexpected();
+ }
+ }
+
+ if (isFragment(openingElement) && !isFragment(closingElement)) {
+ this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
+ } else if (!isFragment(openingElement) && isFragment(closingElement)) {
+ this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
+ } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
+ if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
+ this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
+ }
+ }
+ }
+
+ if (isFragment(openingElement)) {
+ node.openingFragment = openingElement;
+ node.closingFragment = closingElement;
+ } else {
+ node.openingElement = openingElement;
+ node.closingElement = closingElement;
+ }
+
+ node.children = children;
+
+ if (this.isRelational("<")) {
+ throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
+ }
+
+ return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
+ }
+
+ jsxParseElement() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ this.next();
+ return this.jsxParseElementAt(startPos, startLoc);
+ }
+
+ parseExprAtom(refExpressionErrors) {
+ if (this.match(types.jsxText)) {
+ return this.parseLiteral(this.state.value, "JSXText");
+ } else if (this.match(types.jsxTagStart)) {
+ return this.jsxParseElement();
+ } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
+ this.finishToken(types.jsxTagStart);
+ return this.jsxParseElement();
+ } else {
+ return super.parseExprAtom(refExpressionErrors);
+ }
+ }
+
+ getTokenFromCode(code) {
+ if (this.state.inPropertyName) return super.getTokenFromCode(code);
+ const context = this.curContext();
+
+ if (context === types$1.j_expr) {
+ return this.jsxReadToken();
+ }
+
+ if (context === types$1.j_oTag || context === types$1.j_cTag) {
+ if (isIdentifierStart(code)) {
+ return this.jsxReadWord();
+ }
+
+ if (code === 62) {
+ ++this.state.pos;
+ return this.finishToken(types.jsxTagEnd);
+ }
+
+ if ((code === 34 || code === 39) && context === types$1.j_oTag) {
+ return this.jsxReadString(code);
+ }
+ }
+
+ if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
+ ++this.state.pos;
+ return this.finishToken(types.jsxTagStart);
+ }
+
+ return super.getTokenFromCode(code);
+ }
+
+ updateContext(prevType) {
+ if (this.match(types.braceL)) {
+ const curContext = this.curContext();
+
+ if (curContext === types$1.j_oTag) {
+ this.state.context.push(types$1.braceExpression);
+ } else if (curContext === types$1.j_expr) {
+ this.state.context.push(types$1.templateQuasi);
+ } else {
+ super.updateContext(prevType);
+ }
+
+ this.state.exprAllowed = true;
+ } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
+ this.state.context.length -= 2;
+ this.state.context.push(types$1.j_cTag);
+ this.state.exprAllowed = false;
+ } else {
+ return super.updateContext(prevType);
+ }
+ }
+
+});
+
+class Scope {
+ constructor(flags) {
+ this.flags = void 0;
+ this.var = [];
+ this.lexical = [];
+ this.functions = [];
+ this.flags = flags;
+ }
+
+}
+class ScopeHandler {
+ constructor(raise, inModule) {
+ this.scopeStack = [];
+ this.undefinedExports = new Map();
+ this.undefinedPrivateNames = new Map();
+ this.raise = raise;
+ this.inModule = inModule;
+ }
+
+ get inFunction() {
+ return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
+ }
+
+ get allowSuper() {
+ return (this.currentThisScope().flags & SCOPE_SUPER) > 0;
+ }
+
+ get allowDirectSuper() {
+ return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
+ }
+
+ get inClass() {
+ return (this.currentThisScope().flags & SCOPE_CLASS) > 0;
+ }
+
+ get inNonArrowFunction() {
+ return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;
+ }
+
+ get treatFunctionsAsVar() {
+ return this.treatFunctionsAsVarInScope(this.currentScope());
+ }
+
+ createScope(flags) {
+ return new Scope(flags);
+ }
+
+ enter(flags) {
+ this.scopeStack.push(this.createScope(flags));
+ }
+
+ exit() {
+ this.scopeStack.pop();
+ }
+
+ treatFunctionsAsVarInScope(scope) {
+ return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM);
+ }
+
+ declareName(name, bindingType, pos) {
+ let scope = this.currentScope();
+
+ if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
+ this.checkRedeclarationInScope(scope, name, bindingType, pos);
+
+ if (bindingType & BIND_SCOPE_FUNCTION) {
+ scope.functions.push(name);
+ } else {
+ scope.lexical.push(name);
+ }
+
+ if (bindingType & BIND_SCOPE_LEXICAL) {
+ this.maybeExportDefined(scope, name);
+ }
+ } else if (bindingType & BIND_SCOPE_VAR) {
+ for (let i = this.scopeStack.length - 1; i >= 0; --i) {
+ scope = this.scopeStack[i];
+ this.checkRedeclarationInScope(scope, name, bindingType, pos);
+ scope.var.push(name);
+ this.maybeExportDefined(scope, name);
+ if (scope.flags & SCOPE_VAR) break;
+ }
+ }
+
+ if (this.inModule && scope.flags & SCOPE_PROGRAM) {
+ this.undefinedExports.delete(name);
+ }
+ }
+
+ maybeExportDefined(scope, name) {
+ if (this.inModule && scope.flags & SCOPE_PROGRAM) {
+ this.undefinedExports.delete(name);
+ }
+ }
+
+ checkRedeclarationInScope(scope, name, bindingType, pos) {
+ if (this.isRedeclaredInScope(scope, name, bindingType)) {
+ this.raise(pos, ErrorMessages.VarRedeclaration, name);
+ }
+ }
+
+ isRedeclaredInScope(scope, name, bindingType) {
+ if (!(bindingType & BIND_KIND_VALUE)) return false;
+
+ if (bindingType & BIND_SCOPE_LEXICAL) {
+ return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
+ }
+
+ if (bindingType & BIND_SCOPE_FUNCTION) {
+ return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name) > -1;
+ }
+
+ return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1;
+ }
+
+ checkLocalExport(id) {
+ if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) {
+ this.undefinedExports.set(id.name, id.start);
+ }
+ }
+
+ currentScope() {
+ return this.scopeStack[this.scopeStack.length - 1];
+ }
+
+ currentVarScope() {
+ for (let i = this.scopeStack.length - 1;; i--) {
+ const scope = this.scopeStack[i];
+
+ if (scope.flags & SCOPE_VAR) {
+ return scope;
+ }
+ }
+ }
+
+ currentThisScope() {
+ for (let i = this.scopeStack.length - 1;; i--) {
+ const scope = this.scopeStack[i];
+
+ if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) {
+ return scope;
+ }
+ }
+ }
+
+}
+
+class TypeScriptScope extends Scope {
+ constructor(...args) {
+ super(...args);
+ this.types = [];
+ this.enums = [];
+ this.constEnums = [];
+ this.classes = [];
+ this.exportOnlyBindings = [];
+ }
+
+}
+
+class TypeScriptScopeHandler extends ScopeHandler {
+ createScope(flags) {
+ return new TypeScriptScope(flags);
+ }
+
+ declareName(name, bindingType, pos) {
+ const scope = this.currentScope();
+
+ if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
+ this.maybeExportDefined(scope, name);
+ scope.exportOnlyBindings.push(name);
+ return;
+ }
+
+ super.declareName(...arguments);
+
+ if (bindingType & BIND_KIND_TYPE) {
+ if (!(bindingType & BIND_KIND_VALUE)) {
+ this.checkRedeclarationInScope(scope, name, bindingType, pos);
+ this.maybeExportDefined(scope, name);
+ }
+
+ scope.types.push(name);
+ }
+
+ if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name);
+ if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name);
+ if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name);
+ }
+
+ isRedeclaredInScope(scope, name, bindingType) {
+ if (scope.enums.indexOf(name) > -1) {
+ if (bindingType & BIND_FLAGS_TS_ENUM) {
+ const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
+ const wasConst = scope.constEnums.indexOf(name) > -1;
+ return isConst !== wasConst;
+ }
+
+ return true;
+ }
+
+ if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) {
+ if (scope.lexical.indexOf(name) > -1) {
+ return !!(bindingType & BIND_KIND_VALUE);
+ } else {
+ return false;
+ }
+ }
+
+ if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) {
+ return true;
+ }
+
+ return super.isRedeclaredInScope(...arguments);
+ }
+
+ checkLocalExport(id) {
+ if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) {
+ super.checkLocalExport(id);
+ }
+ }
+
+}
+
+const PARAM = 0b0000,
+ PARAM_YIELD = 0b0001,
+ PARAM_AWAIT = 0b0010,
+ PARAM_RETURN = 0b0100,
+ PARAM_IN = 0b1000;
+class ProductionParameterHandler {
+ constructor() {
+ this.stacks = [];
+ }
+
+ enter(flags) {
+ this.stacks.push(flags);
+ }
+
+ exit() {
+ this.stacks.pop();
+ }
+
+ currentFlags() {
+ return this.stacks[this.stacks.length - 1];
+ }
+
+ get hasAwait() {
+ return (this.currentFlags() & PARAM_AWAIT) > 0;
+ }
+
+ get hasYield() {
+ return (this.currentFlags() & PARAM_YIELD) > 0;
+ }
+
+ get hasReturn() {
+ return (this.currentFlags() & PARAM_RETURN) > 0;
+ }
+
+ get hasIn() {
+ return (this.currentFlags() & PARAM_IN) > 0;
+ }
+
+}
+function functionFlags(isAsync, isGenerator) {
+ return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
+}
+
+function nonNull(x) {
+ if (x == null) {
+ throw new Error(`Unexpected ${x} value.`);
+ }
+
+ return x;
+}
+
+function assert(x) {
+ if (!x) {
+ throw new Error("Assert fail");
+ }
+}
+
+const TSErrors = Object.freeze({
+ ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier",
+ ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier",
+ ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
+ DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
+ DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
+ DuplicateModifier: "Duplicate modifier: '%0'",
+ EmptyHeritageClauseType: "'%0' list cannot be empty.",
+ EmptyTypeArguments: "Type argument list cannot be empty.",
+ EmptyTypeParameters: "Type parameter list cannot be empty.",
+ IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier",
+ IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0')",
+ IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier",
+ IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier",
+ InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
+ MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
+ OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
+ PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
+ PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
+ PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0')",
+ TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`",
+ UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
+ UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
+ UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
+ UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
+ UnsupportedImportTypeArgument: "Argument in a type import must be a string literal",
+ UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
+ UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0"
+});
+
+function keywordTypeFromName(value) {
+ switch (value) {
+ case "any":
+ return "TSAnyKeyword";
+
+ case "boolean":
+ return "TSBooleanKeyword";
+
+ case "bigint":
+ return "TSBigIntKeyword";
+
+ case "never":
+ return "TSNeverKeyword";
+
+ case "number":
+ return "TSNumberKeyword";
+
+ case "object":
+ return "TSObjectKeyword";
+
+ case "string":
+ return "TSStringKeyword";
+
+ case "symbol":
+ return "TSSymbolKeyword";
+
+ case "undefined":
+ return "TSUndefinedKeyword";
+
+ case "unknown":
+ return "TSUnknownKeyword";
+
+ default:
+ return undefined;
+ }
+}
+
+var typescript = (superClass => class extends superClass {
+ getScopeHandler() {
+ return TypeScriptScopeHandler;
+ }
+
+ tsIsIdentifier() {
+ return this.match(types.name);
+ }
+
+ tsNextTokenCanFollowModifier() {
+ this.next();
+ return (this.match(types.bracketL) || this.match(types.braceL) || this.match(types.star) || this.match(types.ellipsis) || this.match(types.hash) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
+ }
+
+ tsParseModifier(allowedModifiers) {
+ if (!this.match(types.name)) {
+ return undefined;
+ }
+
+ const modifier = this.state.value;
+
+ if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
+ return modifier;
+ }
+
+ return undefined;
+ }
+
+ tsParseModifiers(modified, allowedModifiers) {
+ for (;;) {
+ const startPos = this.state.start;
+ const modifier = this.tsParseModifier(allowedModifiers);
+ if (!modifier) break;
+
+ if (Object.hasOwnProperty.call(modified, modifier)) {
+ this.raise(startPos, TSErrors.DuplicateModifier, modifier);
+ }
+
+ modified[modifier] = true;
+ }
+ }
+
+ tsIsListTerminator(kind) {
+ switch (kind) {
+ case "EnumMembers":
+ case "TypeMembers":
+ return this.match(types.braceR);
+
+ case "HeritageClauseElement":
+ return this.match(types.braceL);
+
+ case "TupleElementTypes":
+ return this.match(types.bracketR);
+
+ case "TypeParametersOrArguments":
+ return this.isRelational(">");
+ }
+
+ throw new Error("Unreachable");
+ }
+
+ tsParseList(kind, parseElement) {
+ const result = [];
+
+ while (!this.tsIsListTerminator(kind)) {
+ result.push(parseElement());
+ }
+
+ return result;
+ }
+
+ tsParseDelimitedList(kind, parseElement) {
+ return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
+ }
+
+ tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
+ const result = [];
+
+ for (;;) {
+ if (this.tsIsListTerminator(kind)) {
+ break;
+ }
+
+ const element = parseElement();
+
+ if (element == null) {
+ return undefined;
+ }
+
+ result.push(element);
+
+ if (this.eat(types.comma)) {
+ continue;
+ }
+
+ if (this.tsIsListTerminator(kind)) {
+ break;
+ }
+
+ if (expectSuccess) {
+ this.expect(types.comma);
+ }
+
+ return undefined;
+ }
+
+ return result;
+ }
+
+ tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
+ if (!skipFirstToken) {
+ if (bracket) {
+ this.expect(types.bracketL);
+ } else {
+ this.expectRelational("<");
+ }
+ }
+
+ const result = this.tsParseDelimitedList(kind, parseElement);
+
+ if (bracket) {
+ this.expect(types.bracketR);
+ } else {
+ this.expectRelational(">");
+ }
+
+ return result;
+ }
+
+ tsParseImportType() {
+ const node = this.startNode();
+ this.expect(types._import);
+ this.expect(types.parenL);
+
+ if (!this.match(types.string)) {
+ this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
+ }
+
+ node.argument = this.parseExprAtom();
+ this.expect(types.parenR);
+
+ if (this.eat(types.dot)) {
+ node.qualifier = this.tsParseEntityName(true);
+ }
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSImportType");
+ }
+
+ tsParseEntityName(allowReservedWords) {
+ let entity = this.parseIdentifier();
+
+ while (this.eat(types.dot)) {
+ const node = this.startNodeAtNode(entity);
+ node.left = entity;
+ node.right = this.parseIdentifier(allowReservedWords);
+ entity = this.finishNode(node, "TSQualifiedName");
+ }
+
+ return entity;
+ }
+
+ tsParseTypeReference() {
+ const node = this.startNode();
+ node.typeName = this.tsParseEntityName(false);
+
+ if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSTypeReference");
+ }
+
+ tsParseThisTypePredicate(lhs) {
+ this.next();
+ const node = this.startNodeAtNode(lhs);
+ node.parameterName = lhs;
+ node.typeAnnotation = this.tsParseTypeAnnotation(false);
+ node.asserts = false;
+ return this.finishNode(node, "TSTypePredicate");
+ }
+
+ tsParseThisTypeNode() {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, "TSThisType");
+ }
+
+ tsParseTypeQuery() {
+ const node = this.startNode();
+ this.expect(types._typeof);
+
+ if (this.match(types._import)) {
+ node.exprName = this.tsParseImportType();
+ } else {
+ node.exprName = this.tsParseEntityName(true);
+ }
+
+ return this.finishNode(node, "TSTypeQuery");
+ }
+
+ tsParseTypeParameter() {
+ const node = this.startNode();
+ node.name = this.parseIdentifierName(node.start);
+ node.constraint = this.tsEatThenParseType(types._extends);
+ node.default = this.tsEatThenParseType(types.eq);
+ return this.finishNode(node, "TSTypeParameter");
+ }
+
+ tsTryParseTypeParameters() {
+ if (this.isRelational("<")) {
+ return this.tsParseTypeParameters();
+ }
+ }
+
+ tsParseTypeParameters() {
+ const node = this.startNode();
+
+ if (this.isRelational("<") || this.match(types.jsxTagStart)) {
+ this.next();
+ } else {
+ this.unexpected();
+ }
+
+ node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
+
+ if (node.params.length === 0) {
+ this.raise(node.start, TSErrors.EmptyTypeParameters);
+ }
+
+ return this.finishNode(node, "TSTypeParameterDeclaration");
+ }
+
+ tsTryNextParseConstantContext() {
+ if (this.lookahead().type === types._const) {
+ this.next();
+ return this.tsParseTypeReference();
+ }
+
+ return null;
+ }
+
+ tsFillSignature(returnToken, signature) {
+ const returnTokenRequired = returnToken === types.arrow;
+ signature.typeParameters = this.tsTryParseTypeParameters();
+ this.expect(types.parenL);
+ signature.parameters = this.tsParseBindingListForSignature();
+
+ if (returnTokenRequired) {
+ signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
+ } else if (this.match(returnToken)) {
+ signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
+ }
+ }
+
+ tsParseBindingListForSignature() {
+ return this.parseBindingList(types.parenR, 41).map(pattern => {
+ if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
+ this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
+ }
+
+ return pattern;
+ });
+ }
+
+ tsParseTypeMemberSemicolon() {
+ if (!this.eat(types.comma)) {
+ this.semicolon();
+ }
+ }
+
+ tsParseSignatureMember(kind, node) {
+ this.tsFillSignature(types.colon, node);
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(node, kind);
+ }
+
+ tsIsUnambiguouslyIndexSignature() {
+ this.next();
+ return this.eat(types.name) && this.match(types.colon);
+ }
+
+ tsTryParseIndexSignature(node) {
+ if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
+ return undefined;
+ }
+
+ this.expect(types.bracketL);
+ const id = this.parseIdentifier();
+ id.typeAnnotation = this.tsParseTypeAnnotation();
+ this.resetEndLocation(id);
+ this.expect(types.bracketR);
+ node.parameters = [id];
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) node.typeAnnotation = type;
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(node, "TSIndexSignature");
+ }
+
+ tsParsePropertyOrMethodSignature(node, readonly) {
+ if (this.eat(types.question)) node.optional = true;
+ const nodeAny = node;
+
+ if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) {
+ const method = nodeAny;
+ this.tsFillSignature(types.colon, method);
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(method, "TSMethodSignature");
+ } else {
+ const property = nodeAny;
+ if (readonly) property.readonly = true;
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) property.typeAnnotation = type;
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(property, "TSPropertySignature");
+ }
+ }
+
+ tsParseTypeMember() {
+ const node = this.startNode();
+
+ if (this.match(types.parenL) || this.isRelational("<")) {
+ return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
+ }
+
+ if (this.match(types._new)) {
+ const id = this.startNode();
+ this.next();
+
+ if (this.match(types.parenL) || this.isRelational("<")) {
+ return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
+ } else {
+ node.key = this.createIdentifier(id, "new");
+ return this.tsParsePropertyOrMethodSignature(node, false);
+ }
+ }
+
+ const readonly = !!this.tsParseModifier(["readonly"]);
+ const idx = this.tsTryParseIndexSignature(node);
+
+ if (idx) {
+ if (readonly) node.readonly = true;
+ return idx;
+ }
+
+ this.parsePropertyName(node, false);
+ return this.tsParsePropertyOrMethodSignature(node, readonly);
+ }
+
+ tsParseTypeLiteral() {
+ const node = this.startNode();
+ node.members = this.tsParseObjectTypeMembers();
+ return this.finishNode(node, "TSTypeLiteral");
+ }
+
+ tsParseObjectTypeMembers() {
+ this.expect(types.braceL);
+ const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
+ this.expect(types.braceR);
+ return members;
+ }
+
+ tsIsStartOfMappedType() {
+ this.next();
+
+ if (this.eat(types.plusMin)) {
+ return this.isContextual("readonly");
+ }
+
+ if (this.isContextual("readonly")) {
+ this.next();
+ }
+
+ if (!this.match(types.bracketL)) {
+ return false;
+ }
+
+ this.next();
+
+ if (!this.tsIsIdentifier()) {
+ return false;
+ }
+
+ this.next();
+ return this.match(types._in);
+ }
+
+ tsParseMappedTypeParameter() {
+ const node = this.startNode();
+ node.name = this.parseIdentifierName(node.start);
+ node.constraint = this.tsExpectThenParseType(types._in);
+ return this.finishNode(node, "TSTypeParameter");
+ }
+
+ tsParseMappedType() {
+ const node = this.startNode();
+ this.expect(types.braceL);
+
+ if (this.match(types.plusMin)) {
+ node.readonly = this.state.value;
+ this.next();
+ this.expectContextual("readonly");
+ } else if (this.eatContextual("readonly")) {
+ node.readonly = true;
+ }
+
+ this.expect(types.bracketL);
+ node.typeParameter = this.tsParseMappedTypeParameter();
+ node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
+ this.expect(types.bracketR);
+
+ if (this.match(types.plusMin)) {
+ node.optional = this.state.value;
+ this.next();
+ this.expect(types.question);
+ } else if (this.eat(types.question)) {
+ node.optional = true;
+ }
+
+ node.typeAnnotation = this.tsTryParseType();
+ this.semicolon();
+ this.expect(types.braceR);
+ return this.finishNode(node, "TSMappedType");
+ }
+
+ tsParseTupleType() {
+ const node = this.startNode();
+ node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
+ let seenOptionalElement = false;
+ let labeledElements = null;
+ node.elementTypes.forEach(elementNode => {
+ var _labeledElements;
+
+ let {
+ type
+ } = elementNode;
+
+ if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
+ this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
+ }
+
+ seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
+
+ if (type === "TSRestType") {
+ elementNode = elementNode.typeAnnotation;
+ type = elementNode.type;
+ }
+
+ const isLabeled = type === "TSNamedTupleMember";
+ labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
+
+ if (labeledElements !== isLabeled) {
+ this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
+ }
+ });
+ return this.finishNode(node, "TSTupleType");
+ }
+
+ tsParseTupleElementType() {
+ const {
+ start: startPos,
+ startLoc
+ } = this.state;
+ const rest = this.eat(types.ellipsis);
+ let type = this.tsParseType();
+ const optional = this.eat(types.question);
+ const labeled = this.eat(types.colon);
+
+ if (labeled) {
+ const labeledNode = this.startNodeAtNode(type);
+ labeledNode.optional = optional;
+
+ if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
+ labeledNode.label = type.typeName;
+ } else {
+ this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
+ labeledNode.label = type;
+ }
+
+ labeledNode.elementType = this.tsParseType();
+ type = this.finishNode(labeledNode, "TSNamedTupleMember");
+ } else if (optional) {
+ const optionalTypeNode = this.startNodeAtNode(type);
+ optionalTypeNode.typeAnnotation = type;
+ type = this.finishNode(optionalTypeNode, "TSOptionalType");
+ }
+
+ if (rest) {
+ const restNode = this.startNodeAt(startPos, startLoc);
+ restNode.typeAnnotation = type;
+ type = this.finishNode(restNode, "TSRestType");
+ }
+
+ return type;
+ }
+
+ tsParseParenthesizedType() {
+ const node = this.startNode();
+ this.expect(types.parenL);
+ node.typeAnnotation = this.tsParseType();
+ this.expect(types.parenR);
+ return this.finishNode(node, "TSParenthesizedType");
+ }
+
+ tsParseFunctionOrConstructorType(type) {
+ const node = this.startNode();
+
+ if (type === "TSConstructorType") {
+ this.expect(types._new);
+ }
+
+ this.tsFillSignature(types.arrow, node);
+ return this.finishNode(node, type);
+ }
+
+ tsParseLiteralTypeNode() {
+ const node = this.startNode();
+
+ node.literal = (() => {
+ switch (this.state.type) {
+ case types.num:
+ case types.bigint:
+ case types.string:
+ case types._true:
+ case types._false:
+ return this.parseExprAtom();
+
+ default:
+ throw this.unexpected();
+ }
+ })();
+
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ tsParseTemplateLiteralType() {
+ const node = this.startNode();
+ node.literal = this.parseTemplate(false);
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ parseTemplateSubstitution() {
+ if (this.state.inType) return this.tsParseType();
+ return super.parseTemplateSubstitution();
+ }
+
+ tsParseThisTypeOrThisTypePredicate() {
+ const thisKeyword = this.tsParseThisTypeNode();
+
+ if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
+ return this.tsParseThisTypePredicate(thisKeyword);
+ } else {
+ return thisKeyword;
+ }
+ }
+
+ tsParseNonArrayType() {
+ switch (this.state.type) {
+ case types.name:
+ case types._void:
+ case types._null:
+ {
+ const type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
+
+ if (type !== undefined && this.lookaheadCharCode() !== 46) {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, type);
+ }
+
+ return this.tsParseTypeReference();
+ }
+
+ case types.string:
+ case types.num:
+ case types.bigint:
+ case types._true:
+ case types._false:
+ return this.tsParseLiteralTypeNode();
+
+ case types.plusMin:
+ if (this.state.value === "-") {
+ const node = this.startNode();
+ const nextToken = this.lookahead();
+
+ if (nextToken.type !== types.num && nextToken.type !== types.bigint) {
+ throw this.unexpected();
+ }
+
+ node.literal = this.parseMaybeUnary();
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ break;
+
+ case types._this:
+ return this.tsParseThisTypeOrThisTypePredicate();
+
+ case types._typeof:
+ return this.tsParseTypeQuery();
+
+ case types._import:
+ return this.tsParseImportType();
+
+ case types.braceL:
+ return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
+
+ case types.bracketL:
+ return this.tsParseTupleType();
+
+ case types.parenL:
+ return this.tsParseParenthesizedType();
+
+ case types.backQuote:
+ return this.tsParseTemplateLiteralType();
+ }
+
+ throw this.unexpected();
+ }
+
+ tsParseArrayTypeOrHigher() {
+ let type = this.tsParseNonArrayType();
+
+ while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) {
+ if (this.match(types.bracketR)) {
+ const node = this.startNodeAtNode(type);
+ node.elementType = type;
+ this.expect(types.bracketR);
+ type = this.finishNode(node, "TSArrayType");
+ } else {
+ const node = this.startNodeAtNode(type);
+ node.objectType = type;
+ node.indexType = this.tsParseType();
+ this.expect(types.bracketR);
+ type = this.finishNode(node, "TSIndexedAccessType");
+ }
+ }
+
+ return type;
+ }
+
+ tsParseTypeOperator(operator) {
+ const node = this.startNode();
+ this.expectContextual(operator);
+ node.operator = operator;
+ node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
+
+ if (operator === "readonly") {
+ this.tsCheckTypeAnnotationForReadOnly(node);
+ }
+
+ return this.finishNode(node, "TSTypeOperator");
+ }
+
+ tsCheckTypeAnnotationForReadOnly(node) {
+ switch (node.typeAnnotation.type) {
+ case "TSTupleType":
+ case "TSArrayType":
+ return;
+
+ default:
+ this.raise(node.start, TSErrors.UnexpectedReadonly);
+ }
+ }
+
+ tsParseInferType() {
+ const node = this.startNode();
+ this.expectContextual("infer");
+ const typeParameter = this.startNode();
+ typeParameter.name = this.parseIdentifierName(typeParameter.start);
+ node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
+ return this.finishNode(node, "TSInferType");
+ }
+
+ tsParseTypeOperatorOrHigher() {
+ const operator = ["keyof", "unique", "readonly"].find(kw => this.isContextual(kw));
+ return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
+ }
+
+ tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ this.eat(operator);
+ let type = parseConstituentType();
+
+ if (this.match(operator)) {
+ const types = [type];
+
+ while (this.eat(operator)) {
+ types.push(parseConstituentType());
+ }
+
+ const node = this.startNodeAtNode(type);
+ node.types = types;
+ type = this.finishNode(node, kind);
+ }
+
+ return type;
+ }
+
+ tsParseIntersectionTypeOrHigher() {
+ return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND);
+ }
+
+ tsParseUnionTypeOrHigher() {
+ return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR);
+ }
+
+ tsIsStartOfFunctionType() {
+ if (this.isRelational("<")) {
+ return true;
+ }
+
+ return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
+ }
+
+ tsSkipParameterStart() {
+ if (this.match(types.name) || this.match(types._this)) {
+ this.next();
+ return true;
+ }
+
+ if (this.match(types.braceL)) {
+ let braceStackCounter = 1;
+ this.next();
+
+ while (braceStackCounter > 0) {
+ if (this.match(types.braceL)) {
+ ++braceStackCounter;
+ } else if (this.match(types.braceR)) {
+ --braceStackCounter;
+ }
+
+ this.next();
+ }
+
+ return true;
+ }
+
+ if (this.match(types.bracketL)) {
+ let braceStackCounter = 1;
+ this.next();
+
+ while (braceStackCounter > 0) {
+ if (this.match(types.bracketL)) {
+ ++braceStackCounter;
+ } else if (this.match(types.bracketR)) {
+ --braceStackCounter;
+ }
+
+ this.next();
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ tsIsUnambiguouslyStartOfFunctionType() {
+ this.next();
+
+ if (this.match(types.parenR) || this.match(types.ellipsis)) {
+ return true;
+ }
+
+ if (this.tsSkipParameterStart()) {
+ if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) {
+ return true;
+ }
+
+ if (this.match(types.parenR)) {
+ this.next();
+
+ if (this.match(types.arrow)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ tsParseTypeOrTypePredicateAnnotation(returnToken) {
+ return this.tsInType(() => {
+ const t = this.startNode();
+ this.expect(returnToken);
+ const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
+
+ if (asserts && this.match(types._this)) {
+ let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
+
+ if (thisTypePredicate.type === "TSThisType") {
+ const node = this.startNodeAtNode(t);
+ node.parameterName = thisTypePredicate;
+ node.asserts = true;
+ thisTypePredicate = this.finishNode(node, "TSTypePredicate");
+ } else {
+ thisTypePredicate.asserts = true;
+ }
+
+ t.typeAnnotation = thisTypePredicate;
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
+
+ if (!typePredicateVariable) {
+ if (!asserts) {
+ return this.tsParseTypeAnnotation(false, t);
+ }
+
+ const node = this.startNodeAtNode(t);
+ node.parameterName = this.parseIdentifier();
+ node.asserts = asserts;
+ t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ const type = this.tsParseTypeAnnotation(false);
+ const node = this.startNodeAtNode(t);
+ node.parameterName = typePredicateVariable;
+ node.typeAnnotation = type;
+ node.asserts = asserts;
+ t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
+ return this.finishNode(t, "TSTypeAnnotation");
+ });
+ }
+
+ tsTryParseTypeOrTypePredicateAnnotation() {
+ return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined;
+ }
+
+ tsTryParseTypeAnnotation() {
+ return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined;
+ }
+
+ tsTryParseType() {
+ return this.tsEatThenParseType(types.colon);
+ }
+
+ tsParseTypePredicatePrefix() {
+ const id = this.parseIdentifier();
+
+ if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
+ this.next();
+ return id;
+ }
+ }
+
+ tsParseTypePredicateAsserts() {
+ if (!this.match(types.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
+ return false;
+ }
+
+ const containsEsc = this.state.containsEsc;
+ this.next();
+
+ if (!this.match(types.name) && !this.match(types._this)) {
+ return false;
+ }
+
+ if (containsEsc) {
+ this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
+ }
+
+ return true;
+ }
+
+ tsParseTypeAnnotation(eatColon = true, t = this.startNode()) {
+ this.tsInType(() => {
+ if (eatColon) this.expect(types.colon);
+ t.typeAnnotation = this.tsParseType();
+ });
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ tsParseType() {
+ assert(this.state.inType);
+ const type = this.tsParseNonConditionalType();
+
+ if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) {
+ return type;
+ }
+
+ const node = this.startNodeAtNode(type);
+ node.checkType = type;
+ node.extendsType = this.tsParseNonConditionalType();
+ this.expect(types.question);
+ node.trueType = this.tsParseType();
+ this.expect(types.colon);
+ node.falseType = this.tsParseType();
+ return this.finishNode(node, "TSConditionalType");
+ }
+
+ tsParseNonConditionalType() {
+ if (this.tsIsStartOfFunctionType()) {
+ return this.tsParseFunctionOrConstructorType("TSFunctionType");
+ }
+
+ if (this.match(types._new)) {
+ return this.tsParseFunctionOrConstructorType("TSConstructorType");
+ }
+
+ return this.tsParseUnionTypeOrHigher();
+ }
+
+ tsParseTypeAssertion() {
+ const node = this.startNode();
+
+ const _const = this.tsTryNextParseConstantContext();
+
+ node.typeAnnotation = _const || this.tsNextThenParseType();
+ this.expectRelational(">");
+ node.expression = this.parseMaybeUnary();
+ return this.finishNode(node, "TSTypeAssertion");
+ }
+
+ tsParseHeritageClause(descriptor) {
+ const originalStart = this.state.start;
+ const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
+
+ if (!delimitedList.length) {
+ this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
+ }
+
+ return delimitedList;
+ }
+
+ tsParseExpressionWithTypeArguments() {
+ const node = this.startNode();
+ node.expression = this.tsParseEntityName(false);
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSExpressionWithTypeArguments");
+ }
+
+ tsParseInterfaceDeclaration(node) {
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
+ node.typeParameters = this.tsTryParseTypeParameters();
+
+ if (this.eat(types._extends)) {
+ node.extends = this.tsParseHeritageClause("extends");
+ }
+
+ const body = this.startNode();
+ body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
+ node.body = this.finishNode(body, "TSInterfaceBody");
+ return this.finishNode(node, "TSInterfaceDeclaration");
+ }
+
+ tsParseTypeAliasDeclaration(node) {
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
+ node.typeParameters = this.tsTryParseTypeParameters();
+ node.typeAnnotation = this.tsInType(() => {
+ this.expect(types.eq);
+
+ if (this.isContextual("intrinsic") && this.lookahead().type !== types.dot) {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, "TSIntrinsicKeyword");
+ }
+
+ return this.tsParseType();
+ });
+ this.semicolon();
+ return this.finishNode(node, "TSTypeAliasDeclaration");
+ }
+
+ tsInNoContext(cb) {
+ const oldContext = this.state.context;
+ this.state.context = [oldContext[0]];
+
+ try {
+ return cb();
+ } finally {
+ this.state.context = oldContext;
+ }
+ }
+
+ tsInType(cb) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+
+ try {
+ return cb();
+ } finally {
+ this.state.inType = oldInType;
+ }
+ }
+
+ tsEatThenParseType(token) {
+ return !this.match(token) ? undefined : this.tsNextThenParseType();
+ }
+
+ tsExpectThenParseType(token) {
+ return this.tsDoThenParseType(() => this.expect(token));
+ }
+
+ tsNextThenParseType() {
+ return this.tsDoThenParseType(() => this.next());
+ }
+
+ tsDoThenParseType(cb) {
+ return this.tsInType(() => {
+ cb();
+ return this.tsParseType();
+ });
+ }
+
+ tsParseEnumMember() {
+ const node = this.startNode();
+ node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
+
+ if (this.eat(types.eq)) {
+ node.initializer = this.parseMaybeAssignAllowIn();
+ }
+
+ return this.finishNode(node, "TSEnumMember");
+ }
+
+ tsParseEnumDeclaration(node, isConst) {
+ if (isConst) node.const = true;
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
+ this.expect(types.braceL);
+ node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
+ this.expect(types.braceR);
+ return this.finishNode(node, "TSEnumDeclaration");
+ }
+
+ tsParseModuleBlock() {
+ const node = this.startNode();
+ this.scope.enter(SCOPE_OTHER);
+ this.expect(types.braceL);
+ this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR);
+ this.scope.exit();
+ return this.finishNode(node, "TSModuleBlock");
+ }
+
+ tsParseModuleOrNamespaceDeclaration(node, nested = false) {
+ node.id = this.parseIdentifier();
+
+ if (!nested) {
+ this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
+ }
+
+ if (this.eat(types.dot)) {
+ const inner = this.startNode();
+ this.tsParseModuleOrNamespaceDeclaration(inner, true);
+ node.body = inner;
+ } else {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ node.body = this.tsParseModuleBlock();
+ this.prodParam.exit();
+ this.scope.exit();
+ }
+
+ return this.finishNode(node, "TSModuleDeclaration");
+ }
+
+ tsParseAmbientExternalModuleDeclaration(node) {
+ if (this.isContextual("global")) {
+ node.global = true;
+ node.id = this.parseIdentifier();
+ } else if (this.match(types.string)) {
+ node.id = this.parseExprAtom();
+ } else {
+ this.unexpected();
+ }
+
+ if (this.match(types.braceL)) {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ node.body = this.tsParseModuleBlock();
+ this.prodParam.exit();
+ this.scope.exit();
+ } else {
+ this.semicolon();
+ }
+
+ return this.finishNode(node, "TSModuleDeclaration");
+ }
+
+ tsParseImportEqualsDeclaration(node, isExport) {
+ node.isExport = isExport || false;
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL);
+ this.expect(types.eq);
+ node.moduleReference = this.tsParseModuleReference();
+ this.semicolon();
+ return this.finishNode(node, "TSImportEqualsDeclaration");
+ }
+
+ tsIsExternalModuleReference() {
+ return this.isContextual("require") && this.lookaheadCharCode() === 40;
+ }
+
+ tsParseModuleReference() {
+ return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
+ }
+
+ tsParseExternalModuleReference() {
+ const node = this.startNode();
+ this.expectContextual("require");
+ this.expect(types.parenL);
+
+ if (!this.match(types.string)) {
+ throw this.unexpected();
+ }
+
+ node.expression = this.parseExprAtom();
+ this.expect(types.parenR);
+ return this.finishNode(node, "TSExternalModuleReference");
+ }
+
+ tsLookAhead(f) {
+ const state = this.state.clone();
+ const res = f();
+ this.state = state;
+ return res;
+ }
+
+ tsTryParseAndCatch(f) {
+ const result = this.tryParse(abort => f() || abort());
+ if (result.aborted || !result.node) return undefined;
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+
+ tsTryParse(f) {
+ const state = this.state.clone();
+ const result = f();
+
+ if (result !== undefined && result !== false) {
+ return result;
+ } else {
+ this.state = state;
+ return undefined;
+ }
+ }
+
+ tsTryParseDeclare(nany) {
+ if (this.isLineTerminator()) {
+ return;
+ }
+
+ let starttype = this.state.type;
+ let kind;
+
+ if (this.isContextual("let")) {
+ starttype = types._var;
+ kind = "let";
+ }
+
+ return this.tsInDeclareContext(() => {
+ switch (starttype) {
+ case types._function:
+ nany.declare = true;
+ return this.parseFunctionStatement(nany, false, true);
+
+ case types._class:
+ nany.declare = true;
+ return this.parseClass(nany, true, false);
+
+ case types._const:
+ if (this.match(types._const) && this.isLookaheadContextual("enum")) {
+ this.expect(types._const);
+ this.expectContextual("enum");
+ return this.tsParseEnumDeclaration(nany, true);
+ }
+
+ case types._var:
+ kind = kind || this.state.value;
+ return this.parseVarStatement(nany, kind);
+
+ case types.name:
+ {
+ const value = this.state.value;
+
+ if (value === "global") {
+ return this.tsParseAmbientExternalModuleDeclaration(nany);
+ } else {
+ return this.tsParseDeclaration(nany, value, true);
+ }
+ }
+ }
+ });
+ }
+
+ tsTryParseExportDeclaration() {
+ return this.tsParseDeclaration(this.startNode(), this.state.value, true);
+ }
+
+ tsParseExpressionStatement(node, expr) {
+ switch (expr.name) {
+ case "declare":
+ {
+ const declaration = this.tsTryParseDeclare(node);
+
+ if (declaration) {
+ declaration.declare = true;
+ return declaration;
+ }
+
+ break;
+ }
+
+ case "global":
+ if (this.match(types.braceL)) {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ const mod = node;
+ mod.global = true;
+ mod.id = expr;
+ mod.body = this.tsParseModuleBlock();
+ this.scope.exit();
+ this.prodParam.exit();
+ return this.finishNode(mod, "TSModuleDeclaration");
+ }
+
+ break;
+
+ default:
+ return this.tsParseDeclaration(node, expr.name, false);
+ }
+ }
+
+ tsParseDeclaration(node, value, next) {
+ switch (value) {
+ case "abstract":
+ if (this.tsCheckLineTerminatorAndMatch(types._class, next)) {
+ const cls = node;
+ cls.abstract = true;
+
+ if (next) {
+ this.next();
+
+ if (!this.match(types._class)) {
+ this.unexpected(null, types._class);
+ }
+ }
+
+ return this.parseClass(cls, true, false);
+ }
+
+ break;
+
+ case "enum":
+ if (next || this.match(types.name)) {
+ if (next) this.next();
+ return this.tsParseEnumDeclaration(node, false);
+ }
+
+ break;
+
+ case "interface":
+ if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
+ if (next) this.next();
+ return this.tsParseInterfaceDeclaration(node);
+ }
+
+ break;
+
+ case "module":
+ if (next) this.next();
+
+ if (this.match(types.string)) {
+ return this.tsParseAmbientExternalModuleDeclaration(node);
+ } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
+ return this.tsParseModuleOrNamespaceDeclaration(node);
+ }
+
+ break;
+
+ case "namespace":
+ if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
+ if (next) this.next();
+ return this.tsParseModuleOrNamespaceDeclaration(node);
+ }
+
+ break;
+
+ case "type":
+ if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
+ if (next) this.next();
+ return this.tsParseTypeAliasDeclaration(node);
+ }
+
+ break;
+ }
+ }
+
+ tsCheckLineTerminatorAndMatch(tokenType, next) {
+ return (next || this.match(tokenType)) && !this.isLineTerminator();
+ }
+
+ tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
+ if (!this.isRelational("<")) {
+ return undefined;
+ }
+
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ this.state.maybeInArrowParameters = true;
+ const res = this.tsTryParseAndCatch(() => {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.typeParameters = this.tsParseTypeParameters();
+ super.parseFunctionParams(node);
+ node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
+ this.expect(types.arrow);
+ return node;
+ });
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+
+ if (!res) {
+ return undefined;
+ }
+
+ return this.parseArrowExpression(res, null, true);
+ }
+
+ tsParseTypeArguments() {
+ const node = this.startNode();
+ node.params = this.tsInType(() => this.tsInNoContext(() => {
+ this.expectRelational("<");
+ return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
+ }));
+
+ if (node.params.length === 0) {
+ this.raise(node.start, TSErrors.EmptyTypeArguments);
+ }
+
+ this.state.exprAllowed = false;
+ this.expectRelational(">");
+ return this.finishNode(node, "TSTypeParameterInstantiation");
+ }
+
+ tsIsDeclarationStart() {
+ if (this.match(types.name)) {
+ switch (this.state.value) {
+ case "abstract":
+ case "declare":
+ case "enum":
+ case "interface":
+ case "module":
+ case "namespace":
+ case "type":
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.tsIsDeclarationStart()) return false;
+ return super.isExportDefaultSpecifier();
+ }
+
+ parseAssignableListItem(allowModifiers, decorators) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let accessibility;
+ let readonly = false;
+
+ if (allowModifiers !== undefined) {
+ accessibility = this.parseAccessModifier();
+ readonly = !!this.tsParseModifier(["readonly"]);
+
+ if (allowModifiers === false && (accessibility || readonly)) {
+ this.raise(startPos, TSErrors.UnexpectedParameterModifier);
+ }
+ }
+
+ const left = this.parseMaybeDefault();
+ this.parseAssignableListItemTypes(left);
+ const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
+
+ if (accessibility || readonly) {
+ const pp = this.startNodeAt(startPos, startLoc);
+
+ if (decorators.length) {
+ pp.decorators = decorators;
+ }
+
+ if (accessibility) pp.accessibility = accessibility;
+ if (readonly) pp.readonly = readonly;
+
+ if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
+ this.raise(pp.start, TSErrors.UnsupportedParameterPropertyKind);
+ }
+
+ pp.parameter = elt;
+ return this.finishNode(pp, "TSParameterProperty");
+ }
+
+ if (decorators.length) {
+ left.decorators = decorators;
+ }
+
+ return elt;
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ if (this.match(types.colon)) {
+ node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
+ }
+
+ const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined;
+
+ if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) {
+ this.finishNode(node, bodilessType);
+ return;
+ }
+
+ if (bodilessType === "TSDeclareFunction" && this.state.isDeclareContext) {
+ this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
+
+ if (node.declare) {
+ super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
+ return;
+ }
+ }
+
+ super.parseFunctionBodyAndFinish(node, type, isMethod);
+ }
+
+ registerFunctionStatementId(node) {
+ if (!node.body && node.id) {
+ this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
+ } else {
+ super.registerFunctionStatementId(...arguments);
+ }
+ }
+
+ tsCheckForInvalidTypeCasts(items) {
+ items.forEach(node => {
+ if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
+ this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
+ }
+ });
+ }
+
+ toReferencedList(exprList, isInParens) {
+ this.tsCheckForInvalidTypeCasts(exprList);
+ return exprList;
+ }
+
+ parseArrayLike(...args) {
+ const node = super.parseArrayLike(...args);
+
+ if (node.type === "ArrayExpression") {
+ this.tsCheckForInvalidTypeCasts(node.elements);
+ }
+
+ return node;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ if (!this.hasPrecedingLineBreak() && this.match(types.bang)) {
+ this.state.exprAllowed = false;
+ this.next();
+ const nonNullExpression = this.startNodeAt(startPos, startLoc);
+ nonNullExpression.expression = base;
+ return this.finishNode(nonNullExpression, "TSNonNullExpression");
+ }
+
+ if (this.isRelational("<")) {
+ const result = this.tsTryParseAndCatch(() => {
+ if (!noCalls && this.atPossibleAsyncArrow(base)) {
+ const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
+
+ if (asyncArrowFn) {
+ return asyncArrowFn;
+ }
+ }
+
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ const typeArguments = this.tsParseTypeArguments();
+
+ if (typeArguments) {
+ if (!noCalls && this.eat(types.parenL)) {
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ this.tsCheckForInvalidTypeCasts(node.arguments);
+ node.typeParameters = typeArguments;
+ return this.finishCallExpression(node, state.optionalChainMember);
+ } else if (this.match(types.backQuote)) {
+ const result = this.parseTaggedTemplateExpression(base, startPos, startLoc, state);
+ result.typeParameters = typeArguments;
+ return result;
+ }
+ }
+
+ this.unexpected();
+ });
+ if (result) return result;
+ }
+
+ return super.parseSubscript(base, startPos, startLoc, noCalls, state);
+ }
+
+ parseNewArguments(node) {
+ if (this.isRelational("<")) {
+ const typeParameters = this.tsTryParseAndCatch(() => {
+ const args = this.tsParseTypeArguments();
+ if (!this.match(types.parenL)) this.unexpected();
+ return args;
+ });
+
+ if (typeParameters) {
+ node.typeParameters = typeParameters;
+ }
+ }
+
+ super.parseNewArguments(node);
+ }
+
+ parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
+ if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
+ const node = this.startNodeAt(leftStartPos, leftStartLoc);
+ node.expression = left;
+
+ const _const = this.tsTryNextParseConstantContext();
+
+ if (_const) {
+ node.typeAnnotation = _const;
+ } else {
+ node.typeAnnotation = this.tsNextThenParseType();
+ }
+
+ this.finishNode(node, "TSAsExpression");
+ this.reScan_lt_gt();
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
+ }
+
+ return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
+ }
+
+ checkReservedWord(word, startLoc, checkKeywords, isBinding) {}
+
+ checkDuplicateExports() {}
+
+ parseImport(node) {
+ if (this.match(types.name) || this.match(types.star) || this.match(types.braceL)) {
+ const ahead = this.lookahead();
+
+ if (this.match(types.name) && ahead.type === types.eq) {
+ return this.tsParseImportEqualsDeclaration(node);
+ }
+
+ if (this.isContextual("type") && ahead.type !== types.comma && !(ahead.type === types.name && ahead.value === "from")) {
+ node.importKind = "type";
+ this.next();
+ }
+ }
+
+ if (!node.importKind) {
+ node.importKind = "value";
+ }
+
+ const importNode = super.parseImport(node);
+
+ if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
+ this.raise(importNode.start, "A type-only import can specify a default import or named bindings, but not both.");
+ }
+
+ return importNode;
+ }
+
+ parseExport(node) {
+ if (this.match(types._import)) {
+ this.expect(types._import);
+ return this.tsParseImportEqualsDeclaration(node, true);
+ } else if (this.eat(types.eq)) {
+ const assign = node;
+ assign.expression = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(assign, "TSExportAssignment");
+ } else if (this.eatContextual("as")) {
+ const decl = node;
+ this.expectContextual("namespace");
+ decl.id = this.parseIdentifier();
+ this.semicolon();
+ return this.finishNode(decl, "TSNamespaceExportDeclaration");
+ } else {
+ if (this.isContextual("type") && this.lookahead().type === types.braceL) {
+ this.next();
+ node.exportKind = "type";
+ } else {
+ node.exportKind = "value";
+ }
+
+ return super.parseExport(node);
+ }
+ }
+
+ isAbstractClass() {
+ return this.isContextual("abstract") && this.lookahead().type === types._class;
+ }
+
+ parseExportDefaultExpression() {
+ if (this.isAbstractClass()) {
+ const cls = this.startNode();
+ this.next();
+ this.parseClass(cls, true, true);
+ cls.abstract = true;
+ return cls;
+ }
+
+ if (this.state.value === "interface") {
+ const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
+ if (result) return result;
+ }
+
+ return super.parseExportDefaultExpression();
+ }
+
+ parseStatementContent(context, topLevel) {
+ if (this.state.type === types._const) {
+ const ahead = this.lookahead();
+
+ if (ahead.type === types.name && ahead.value === "enum") {
+ const node = this.startNode();
+ this.expect(types._const);
+ this.expectContextual("enum");
+ return this.tsParseEnumDeclaration(node, true);
+ }
+ }
+
+ return super.parseStatementContent(context, topLevel);
+ }
+
+ parseAccessModifier() {
+ return this.tsParseModifier(["public", "protected", "private"]);
+ }
+
+ parseClassMember(classBody, member, state) {
+ this.tsParseModifiers(member, ["declare"]);
+ const accessibility = this.parseAccessModifier();
+ if (accessibility) member.accessibility = accessibility;
+ this.tsParseModifiers(member, ["declare"]);
+
+ const callParseClassMember = () => {
+ super.parseClassMember(classBody, member, state);
+ };
+
+ if (member.declare) {
+ this.tsInDeclareContext(callParseClassMember);
+ } else {
+ callParseClassMember();
+ }
+ }
+
+ parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
+ this.tsParseModifiers(member, ["abstract", "readonly", "declare"]);
+ const idx = this.tsTryParseIndexSignature(member);
+
+ if (idx) {
+ classBody.body.push(idx);
+
+ if (member.abstract) {
+ this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
+ }
+
+ if (isStatic) {
+ this.raise(member.start, TSErrors.IndexSignatureHasStatic);
+ }
+
+ if (member.accessibility) {
+ this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
+ }
+
+ if (member.declare) {
+ this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
+ }
+
+ return;
+ }
+
+ super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
+ }
+
+ parsePostMemberNameModifiers(methodOrProp) {
+ const optional = this.eat(types.question);
+ if (optional) methodOrProp.optional = true;
+
+ if (methodOrProp.readonly && this.match(types.parenL)) {
+ this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
+ }
+
+ if (methodOrProp.declare && this.match(types.parenL)) {
+ this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
+ }
+ }
+
+ parseExpressionStatement(node, expr) {
+ const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
+ return decl || super.parseExpressionStatement(node, expr);
+ }
+
+ shouldParseExportDeclaration() {
+ if (this.tsIsDeclarationStart()) return true;
+ return super.shouldParseExportDeclaration();
+ }
+
+ parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
+ if (!refNeedsArrowPos || !this.match(types.question)) {
+ return super.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
+ }
+
+ const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
+
+ if (!result.node) {
+ refNeedsArrowPos.start = result.error.pos || this.state.start;
+ return expr;
+ }
+
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ node = super.parseParenItem(node, startPos, startLoc);
+
+ if (this.eat(types.question)) {
+ node.optional = true;
+ this.resetEndLocation(node);
+ }
+
+ if (this.match(types.colon)) {
+ const typeCastNode = this.startNodeAt(startPos, startLoc);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TSTypeCastExpression");
+ }
+
+ return node;
+ }
+
+ parseExportDeclaration(node) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const isDeclare = this.eatContextual("declare");
+ let declaration;
+
+ if (this.match(types.name)) {
+ declaration = this.tsTryParseExportDeclaration();
+ }
+
+ if (!declaration) {
+ declaration = super.parseExportDeclaration(node);
+ }
+
+ if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
+ node.exportKind = "type";
+ }
+
+ if (declaration && isDeclare) {
+ this.resetStartLocation(declaration, startPos, startLoc);
+ declaration.declare = true;
+ }
+
+ return declaration;
+ }
+
+ parseClassId(node, isStatement, optionalId) {
+ if ((!isStatement || optionalId) && this.isContextual("implements")) {
+ return;
+ }
+
+ super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) node.typeParameters = typeParameters;
+ }
+
+ parseClassPropertyAnnotation(node) {
+ if (!node.optional && this.eat(types.bang)) {
+ node.definite = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) node.typeAnnotation = type;
+ }
+
+ parseClassProperty(node) {
+ this.parseClassPropertyAnnotation(node);
+
+ if (this.state.isDeclareContext && this.match(types.eq)) {
+ this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
+ }
+
+ return super.parseClassProperty(node);
+ }
+
+ parseClassPrivateProperty(node) {
+ if (node.abstract) {
+ this.raise(node.start, TSErrors.PrivateElementHasAbstract);
+ }
+
+ if (node.accessibility) {
+ this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
+ }
+
+ this.parseClassPropertyAnnotation(node);
+ return super.parseClassPrivateProperty(node);
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ const typeParameters = this.tsTryParseTypeParameters();
+
+ if (typeParameters && isConstructor) {
+ this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
+ }
+
+ if (typeParameters) method.typeParameters = typeParameters;
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) method.typeParameters = typeParameters;
+ super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
+ }
+
+ parseClassSuper(node) {
+ super.parseClassSuper(node);
+
+ if (node.superClass && this.isRelational("<")) {
+ node.superTypeParameters = this.tsParseTypeArguments();
+ }
+
+ if (this.eatContextual("implements")) {
+ node.implements = this.tsParseHeritageClause("implements");
+ }
+ }
+
+ parseObjPropValue(prop, ...args) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) prop.typeParameters = typeParameters;
+ super.parseObjPropValue(prop, ...args);
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) node.typeParameters = typeParameters;
+ super.parseFunctionParams(node, allowModifiers);
+ }
+
+ parseVarId(decl, kind) {
+ super.parseVarId(decl, kind);
+
+ if (decl.id.type === "Identifier" && this.eat(types.bang)) {
+ decl.definite = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+
+ if (type) {
+ decl.id.typeAnnotation = type;
+ this.resetEndLocation(decl.id);
+ }
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ if (this.match(types.colon)) {
+ node.returnType = this.tsParseTypeAnnotation();
+ }
+
+ return super.parseAsyncArrowFromCallExpression(node, call);
+ }
+
+ parseMaybeAssign(...args) {
+ var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
+
+ let state;
+ let jsx;
+ let typeCast;
+
+ if (this.match(types.jsxTagStart)) {
+ state = this.state.clone();
+ jsx = this.tryParse(() => super.parseMaybeAssign(...args), state);
+ if (!jsx.error) return jsx.node;
+ const {
+ context
+ } = this.state;
+
+ if (context[context.length - 1] === types$1.j_oTag) {
+ context.length -= 2;
+ } else if (context[context.length - 1] === types$1.j_expr) {
+ context.length -= 1;
+ }
+ }
+
+ if (!((_jsx = jsx) == null ? void 0 : _jsx.error) && !this.isRelational("<")) {
+ return super.parseMaybeAssign(...args);
+ }
+
+ let typeParameters;
+ state = state || this.state.clone();
+ const arrow = this.tryParse(abort => {
+ var _typeParameters;
+
+ typeParameters = this.tsParseTypeParameters();
+ const expr = super.parseMaybeAssign(...args);
+
+ if (expr.type !== "ArrowFunctionExpression" || expr.extra && expr.extra.parenthesized) {
+ abort();
+ }
+
+ if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
+ this.resetStartLocationFromNode(expr, typeParameters);
+ }
+
+ expr.typeParameters = typeParameters;
+ return expr;
+ }, state);
+ if (!arrow.error && !arrow.aborted) return arrow.node;
+
+ if (!jsx) {
+ assert(!this.hasPlugin("jsx"));
+ typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
+ if (!typeCast.error) return typeCast.node;
+ }
+
+ if ((_jsx2 = jsx) == null ? void 0 : _jsx2.node) {
+ this.state = jsx.failState;
+ return jsx.node;
+ }
+
+ if (arrow.node) {
+ this.state = arrow.failState;
+ return arrow.node;
+ }
+
+ if ((_typeCast = typeCast) == null ? void 0 : _typeCast.node) {
+ this.state = typeCast.failState;
+ return typeCast.node;
+ }
+
+ if ((_jsx3 = jsx) == null ? void 0 : _jsx3.thrown) throw jsx.error;
+ if (arrow.thrown) throw arrow.error;
+ if ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.thrown) throw typeCast.error;
+ throw ((_jsx4 = jsx) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
+ }
+
+ parseMaybeUnary(refExpressionErrors) {
+ if (!this.hasPlugin("jsx") && this.isRelational("<")) {
+ return this.tsParseTypeAssertion();
+ } else {
+ return super.parseMaybeUnary(refExpressionErrors);
+ }
+ }
+
+ parseArrow(node) {
+ if (this.match(types.colon)) {
+ const result = this.tryParse(abort => {
+ const returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
+ if (this.canInsertSemicolon() || !this.match(types.arrow)) abort();
+ return returnType;
+ });
+ if (result.aborted) return;
+
+ if (!result.thrown) {
+ if (result.error) this.state = result.failState;
+ node.returnType = result.node;
+ }
+ }
+
+ return super.parseArrow(node);
+ }
+
+ parseAssignableListItemTypes(param) {
+ if (this.eat(types.question)) {
+ if (param.type !== "Identifier" && !this.state.isDeclareContext && !this.state.inType) {
+ this.raise(param.start, TSErrors.PatternIsOptional);
+ }
+
+ param.optional = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) param.typeAnnotation = type;
+ this.resetEndLocation(param);
+ return param;
+ }
+
+ toAssignable(node, isLHS = false) {
+ switch (node.type) {
+ case "TSTypeCastExpression":
+ return super.toAssignable(this.typeCastToParameter(node), isLHS);
+
+ case "TSParameterProperty":
+ return super.toAssignable(node, isLHS);
+
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "TSTypeAssertion":
+ node.expression = this.toAssignable(node.expression, isLHS);
+ return node;
+
+ default:
+ return super.toAssignable(node, isLHS);
+ }
+ }
+
+ checkLVal(expr, contextDescription, ...args) {
+ switch (expr.type) {
+ case "TSTypeCastExpression":
+ return;
+
+ case "TSParameterProperty":
+ this.checkLVal(expr.parameter, "parameter property", ...args);
+ return;
+
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "TSTypeAssertion":
+ this.checkLVal(expr.expression, contextDescription, ...args);
+ return;
+
+ default:
+ super.checkLVal(expr, contextDescription, ...args);
+ return;
+ }
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case types._this:
+ return this.parseIdentifier(true);
+
+ default:
+ return super.parseBindingAtom();
+ }
+ }
+
+ parseMaybeDecoratorArguments(expr) {
+ if (this.isRelational("<")) {
+ const typeArguments = this.tsParseTypeArguments();
+
+ if (this.match(types.parenL)) {
+ const call = super.parseMaybeDecoratorArguments(expr);
+ call.typeParameters = typeArguments;
+ return call;
+ }
+
+ this.unexpected(this.state.start, types.parenL);
+ }
+
+ return super.parseMaybeDecoratorArguments(expr);
+ }
+
+ isClassMethod() {
+ return this.isRelational("<") || super.isClassMethod();
+ }
+
+ isClassProperty() {
+ return this.match(types.bang) || this.match(types.colon) || super.isClassProperty();
+ }
+
+ parseMaybeDefault(...args) {
+ const node = super.parseMaybeDefault(...args);
+
+ if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
+ this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
+ }
+
+ return node;
+ }
+
+ getTokenFromCode(code) {
+ if (this.state.inType && (code === 62 || code === 60)) {
+ return this.finishOp(types.relational, 1);
+ } else {
+ return super.getTokenFromCode(code);
+ }
+ }
+
+ reScan_lt_gt() {
+ if (this.match(types.relational)) {
+ const code = this.input.charCodeAt(this.state.start);
+
+ if (code === 60 || code === 62) {
+ this.state.pos -= 1;
+ this.readToken_lt_gt(code);
+ }
+ }
+ }
+
+ toAssignableList(exprList) {
+ for (let i = 0; i < exprList.length; i++) {
+ const expr = exprList[i];
+ if (!expr) continue;
+
+ switch (expr.type) {
+ case "TSTypeCastExpression":
+ exprList[i] = this.typeCastToParameter(expr);
+ break;
+
+ case "TSAsExpression":
+ case "TSTypeAssertion":
+ if (!this.state.maybeInArrowParameters) {
+ exprList[i] = this.typeCastToParameter(expr);
+ } else {
+ this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
+ }
+
+ break;
+ }
+ }
+
+ return super.toAssignableList(...arguments);
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
+ return node.expression;
+ }
+
+ shouldParseArrow() {
+ return this.match(types.colon) || super.shouldParseArrow();
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(types.colon) || super.shouldParseAsyncArrow();
+ }
+
+ canHaveLeadingDecorator() {
+ return super.canHaveLeadingDecorator() || this.isAbstractClass();
+ }
+
+ jsxParseOpeningElementAfterName(node) {
+ if (this.isRelational("<")) {
+ const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
+ if (typeArguments) node.typeParameters = typeArguments;
+ }
+
+ return super.jsxParseOpeningElementAfterName(node);
+ }
+
+ getGetterSetterExpectedParamCount(method) {
+ const baseCount = super.getGetterSetterExpectedParamCount(method);
+ const params = this.getObjectOrClassMethodParams(method);
+ const firstParam = params[0];
+ const hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this";
+ return hasContextParam ? baseCount + 1 : baseCount;
+ }
+
+ parseCatchClauseParam() {
+ const param = super.parseCatchClauseParam();
+ const type = this.tsTryParseTypeAnnotation();
+
+ if (type) {
+ param.typeAnnotation = type;
+ this.resetEndLocation(param);
+ }
+
+ return param;
+ }
+
+ tsInDeclareContext(cb) {
+ const oldIsDeclareContext = this.state.isDeclareContext;
+ this.state.isDeclareContext = true;
+
+ try {
+ return cb();
+ } finally {
+ this.state.isDeclareContext = oldIsDeclareContext;
+ }
+ }
+
+});
+
+types.placeholder = new TokenType("%%", {
+ startsExpr: true
+});
+var placeholders = (superClass => class extends superClass {
+ parsePlaceholder(expectedNode) {
+ if (this.match(types.placeholder)) {
+ const node = this.startNode();
+ this.next();
+ this.assertNoSpace("Unexpected space in placeholder.");
+ node.name = super.parseIdentifier(true);
+ this.assertNoSpace("Unexpected space in placeholder.");
+ this.expect(types.placeholder);
+ return this.finishPlaceholder(node, expectedNode);
+ }
+ }
+
+ finishPlaceholder(node, expectedNode) {
+ const isFinished = !!(node.expectedNode && node.type === "Placeholder");
+ node.expectedNode = expectedNode;
+ return isFinished ? node : this.finishNode(node, "Placeholder");
+ }
+
+ getTokenFromCode(code) {
+ if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
+ return this.finishOp(types.placeholder, 2);
+ }
+
+ return super.getTokenFromCode(...arguments);
+ }
+
+ parseExprAtom() {
+ return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
+ }
+
+ parseIdentifier() {
+ return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
+ }
+
+ checkReservedWord(word) {
+ if (word !== undefined) super.checkReservedWord(...arguments);
+ }
+
+ parseBindingAtom() {
+ return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
+ }
+
+ checkLVal(expr) {
+ if (expr.type !== "Placeholder") super.checkLVal(...arguments);
+ }
+
+ toAssignable(node) {
+ if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
+ node.expectedNode = "Pattern";
+ return node;
+ }
+
+ return super.toAssignable(...arguments);
+ }
+
+ verifyBreakContinue(node) {
+ if (node.label && node.label.type === "Placeholder") return;
+ super.verifyBreakContinue(...arguments);
+ }
+
+ parseExpressionStatement(node, expr) {
+ if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
+ return super.parseExpressionStatement(...arguments);
+ }
+
+ if (this.match(types.colon)) {
+ const stmt = node;
+ stmt.label = this.finishPlaceholder(expr, "Identifier");
+ this.next();
+ stmt.body = this.parseStatement("label");
+ return this.finishNode(stmt, "LabeledStatement");
+ }
+
+ this.semicolon();
+ node.name = expr.name;
+ return this.finishPlaceholder(node, "Statement");
+ }
+
+ parseBlock() {
+ return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
+ }
+
+ parseFunctionId() {
+ return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
+ }
+
+ parseClass(node, isStatement, optionalId) {
+ const type = isStatement ? "ClassDeclaration" : "ClassExpression";
+ this.next();
+ this.takeDecorators(node);
+ const oldStrict = this.state.strict;
+ const placeholder = this.parsePlaceholder("Identifier");
+
+ if (placeholder) {
+ if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) {
+ node.id = placeholder;
+ } else if (optionalId || !isStatement) {
+ node.id = null;
+ node.body = this.finishPlaceholder(placeholder, "ClassBody");
+ return this.finishNode(node, type);
+ } else {
+ this.unexpected(null, "A class name is required");
+ }
+ } else {
+ this.parseClassId(node, isStatement, optionalId);
+ }
+
+ this.parseClassSuper(node);
+ node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
+ return this.finishNode(node, type);
+ }
+
+ parseExport(node) {
+ const placeholder = this.parsePlaceholder("Identifier");
+ if (!placeholder) return super.parseExport(...arguments);
+
+ if (!this.isContextual("from") && !this.match(types.comma)) {
+ node.specifiers = [];
+ node.source = null;
+ node.declaration = this.finishPlaceholder(placeholder, "Declaration");
+ return this.finishNode(node, "ExportNamedDeclaration");
+ }
+
+ this.expectPlugin("exportDefaultFrom");
+ const specifier = this.startNode();
+ specifier.exported = placeholder;
+ node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
+ return super.parseExport(node);
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.match(types._default)) {
+ const next = this.nextTokenStart();
+
+ if (this.isUnparsedContextual(next, "from")) {
+ if (this.input.startsWith(types.placeholder.label, this.nextTokenStartSince(next + 4))) {
+ return true;
+ }
+ }
+ }
+
+ return super.isExportDefaultSpecifier();
+ }
+
+ maybeParseExportDefaultSpecifier(node) {
+ if (node.specifiers && node.specifiers.length > 0) {
+ return true;
+ }
+
+ return super.maybeParseExportDefaultSpecifier(...arguments);
+ }
+
+ checkExport(node) {
+ const {
+ specifiers
+ } = node;
+
+ if (specifiers == null ? void 0 : specifiers.length) {
+ node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder");
+ }
+
+ super.checkExport(node);
+ node.specifiers = specifiers;
+ }
+
+ parseImport(node) {
+ const placeholder = this.parsePlaceholder("Identifier");
+ if (!placeholder) return super.parseImport(...arguments);
+ node.specifiers = [];
+
+ if (!this.isContextual("from") && !this.match(types.comma)) {
+ node.source = this.finishPlaceholder(placeholder, "StringLiteral");
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ const specifier = this.startNodeAtNode(placeholder);
+ specifier.local = placeholder;
+ this.finishNode(specifier, "ImportDefaultSpecifier");
+ node.specifiers.push(specifier);
+
+ if (this.eat(types.comma)) {
+ const hasStarImport = this.maybeParseStarImportSpecifier(node);
+ if (!hasStarImport) this.parseNamedImportSpecifiers(node);
+ }
+
+ this.expectContextual("from");
+ node.source = this.parseImportSource();
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ parseImportSource() {
+ return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
+ }
+
+});
+
+var v8intrinsic = (superClass => class extends superClass {
+ parseV8Intrinsic() {
+ if (this.match(types.modulo)) {
+ const v8IntrinsicStart = this.state.start;
+ const node = this.startNode();
+ this.eat(types.modulo);
+
+ if (this.match(types.name)) {
+ const name = this.parseIdentifierName(this.state.start);
+ const identifier = this.createIdentifier(node, name);
+ identifier.type = "V8IntrinsicIdentifier";
+
+ if (this.match(types.parenL)) {
+ return identifier;
+ }
+ }
+
+ this.unexpected(v8IntrinsicStart);
+ }
+ }
+
+ parseExprAtom() {
+ return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
+ }
+
+});
+
+function hasPlugin(plugins, name) {
+ return plugins.some(plugin => {
+ if (Array.isArray(plugin)) {
+ return plugin[0] === name;
+ } else {
+ return plugin === name;
+ }
+ });
+}
+function getPluginOption(plugins, name, option) {
+ const plugin = plugins.find(plugin => {
+ if (Array.isArray(plugin)) {
+ return plugin[0] === name;
+ } else {
+ return plugin === name;
+ }
+ });
+
+ if (plugin && Array.isArray(plugin)) {
+ return plugin[1][option];
+ }
+
+ return null;
+}
+const PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
+const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
+function validatePlugins(plugins) {
+ if (hasPlugin(plugins, "decorators")) {
+ if (hasPlugin(plugins, "decorators-legacy")) {
+ throw new Error("Cannot use the decorators and decorators-legacy plugin together");
+ }
+
+ const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
+
+ if (decoratorsBeforeExport == null) {
+ throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'.");
+ } else if (typeof decoratorsBeforeExport !== "boolean") {
+ throw new Error("'decoratorsBeforeExport' must be a boolean.");
+ }
+ }
+
+ if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
+ throw new Error("Cannot combine flow and typescript plugins.");
+ }
+
+ if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
+ throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
+ }
+
+ if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
+ throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", "));
+ }
+
+ if (hasPlugin(plugins, "moduleAttributes")) {
+ if (hasPlugin(plugins, "importAssertions")) {
+ throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
+ }
+
+ const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
+
+ if (moduleAttributesVerionPluginOption !== "may-2020") {
+ throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
+ }
+ }
+
+ if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
+ throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
+ }
+}
+const mixinPlugins = {
+ estree,
+ jsx,
+ flow,
+ typescript,
+ v8intrinsic,
+ placeholders
+};
+const mixinPluginNames = Object.keys(mixinPlugins);
+
+const defaultOptions = {
+ sourceType: "script",
+ sourceFilename: undefined,
+ startLine: 1,
+ allowAwaitOutsideFunction: false,
+ allowReturnOutsideFunction: false,
+ allowImportExportEverywhere: false,
+ allowSuperOutsideMethod: false,
+ allowUndeclaredExports: false,
+ plugins: [],
+ strictMode: null,
+ ranges: false,
+ tokens: false,
+ createParenthesizedExpressions: false,
+ errorRecovery: false
+};
+function getOptions(opts) {
+ const options = {};
+
+ for (let _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) {
+ const key = _Object$keys[_i];
+ options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
+ }
+
+ return options;
+}
+
+class State {
+ constructor() {
+ this.strict = void 0;
+ this.curLine = void 0;
+ this.startLoc = void 0;
+ this.endLoc = void 0;
+ this.errors = [];
+ this.potentialArrowAt = -1;
+ this.noArrowAt = [];
+ this.noArrowParamsConversionAt = [];
+ this.maybeInArrowParameters = false;
+ this.inPipeline = false;
+ this.inType = false;
+ this.noAnonFunctionType = false;
+ this.inPropertyName = false;
+ this.hasFlowComment = false;
+ this.isIterator = false;
+ this.isDeclareContext = false;
+ this.topicContext = {
+ maxNumOfResolvableTopics: 0,
+ maxTopicIndex: null
+ };
+ this.soloAwait = false;
+ this.inFSharpPipelineDirectBody = false;
+ this.labels = [];
+ this.decoratorStack = [[]];
+ this.comments = [];
+ this.trailingComments = [];
+ this.leadingComments = [];
+ this.commentStack = [];
+ this.commentPreviousNode = null;
+ this.pos = 0;
+ this.lineStart = 0;
+ this.type = types.eof;
+ this.value = null;
+ this.start = 0;
+ this.end = 0;
+ this.lastTokEndLoc = null;
+ this.lastTokStartLoc = null;
+ this.lastTokStart = 0;
+ this.lastTokEnd = 0;
+ this.context = [types$1.braceStatement];
+ this.exprAllowed = true;
+ this.containsEsc = false;
+ this.octalPositions = [];
+ this.exportedIdentifiers = [];
+ this.tokensLength = 0;
+ }
+
+ init(options) {
+ this.strict = options.strictMode === false ? false : options.sourceType === "module";
+ this.curLine = options.startLine;
+ this.startLoc = this.endLoc = this.curPosition();
+ }
+
+ curPosition() {
+ return new Position(this.curLine, this.pos - this.lineStart);
+ }
+
+ clone(skipArrays) {
+ const state = new State();
+ const keys = Object.keys(this);
+
+ for (let i = 0, length = keys.length; i < length; i++) {
+ const key = keys[i];
+ let val = this[key];
+
+ if (!skipArrays && Array.isArray(val)) {
+ val = val.slice();
+ }
+
+ state[key] = val;
+ }
+
+ return state;
+ }
+
+}
+
+var _isDigit = function isDigit(code) {
+ return code >= 48 && code <= 57;
+};
+const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]);
+const forbiddenNumericSeparatorSiblings = {
+ decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
+ hex: [46, 88, 95, 120]
+};
+const allowedNumericSeparatorSiblings = {};
+allowedNumericSeparatorSiblings.bin = [48, 49];
+allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
+allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
+allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
+class Token {
+ constructor(state) {
+ this.type = state.type;
+ this.value = state.value;
+ this.start = state.start;
+ this.end = state.end;
+ this.loc = new SourceLocation(state.startLoc, state.endLoc);
+ }
+
+}
+class Tokenizer extends ParserError {
+ constructor(options, input) {
+ super();
+ this.isLookahead = void 0;
+ this.tokens = [];
+ this.state = new State();
+ this.state.init(options);
+ this.input = input;
+ this.length = input.length;
+ this.isLookahead = false;
+ }
+
+ pushToken(token) {
+ this.tokens.length = this.state.tokensLength;
+ this.tokens.push(token);
+ ++this.state.tokensLength;
+ }
+
+ next() {
+ if (!this.isLookahead) {
+ this.checkKeywordEscapes();
+
+ if (this.options.tokens) {
+ this.pushToken(new Token(this.state));
+ }
+ }
+
+ this.state.lastTokEnd = this.state.end;
+ this.state.lastTokStart = this.state.start;
+ this.state.lastTokEndLoc = this.state.endLoc;
+ this.state.lastTokStartLoc = this.state.startLoc;
+ this.nextToken();
+ }
+
+ eat(type) {
+ if (this.match(type)) {
+ this.next();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ match(type) {
+ return this.state.type === type;
+ }
+
+ lookahead() {
+ const old = this.state;
+ this.state = old.clone(true);
+ this.isLookahead = true;
+ this.next();
+ this.isLookahead = false;
+ const curr = this.state;
+ this.state = old;
+ return curr;
+ }
+
+ nextTokenStart() {
+ return this.nextTokenStartSince(this.state.pos);
+ }
+
+ nextTokenStartSince(pos) {
+ skipWhiteSpace.lastIndex = pos;
+ const skip = skipWhiteSpace.exec(this.input);
+ return pos + skip[0].length;
+ }
+
+ lookaheadCharCode() {
+ return this.input.charCodeAt(this.nextTokenStart());
+ }
+
+ setStrict(strict) {
+ this.state.strict = strict;
+ if (!this.match(types.num) && !this.match(types.string)) return;
+ this.state.pos = this.state.start;
+
+ while (this.state.pos < this.state.lineStart) {
+ this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1;
+ --this.state.curLine;
+ }
+
+ this.nextToken();
+ }
+
+ curContext() {
+ return this.state.context[this.state.context.length - 1];
+ }
+
+ nextToken() {
+ const curContext = this.curContext();
+ if (!(curContext == null ? void 0 : curContext.preserveSpace)) this.skipSpace();
+ this.state.octalPositions = [];
+ this.state.start = this.state.pos;
+ this.state.startLoc = this.state.curPosition();
+
+ if (this.state.pos >= this.length) {
+ this.finishToken(types.eof);
+ return;
+ }
+
+ const override = curContext == null ? void 0 : curContext.override;
+
+ if (override) {
+ override(this);
+ } else {
+ this.getTokenFromCode(this.input.codePointAt(this.state.pos));
+ }
+ }
+
+ pushComment(block, text, start, end, startLoc, endLoc) {
+ const comment = {
+ type: block ? "CommentBlock" : "CommentLine",
+ value: text,
+ start: start,
+ end: end,
+ loc: new SourceLocation(startLoc, endLoc)
+ };
+ if (this.options.tokens) this.pushToken(comment);
+ this.state.comments.push(comment);
+ this.addComment(comment);
+ }
+
+ skipBlockComment() {
+ const startLoc = this.state.curPosition();
+ const start = this.state.pos;
+ const end = this.input.indexOf("*/", this.state.pos + 2);
+ if (end === -1) throw this.raise(start, ErrorMessages.UnterminatedComment);
+ this.state.pos = end + 2;
+ lineBreakG.lastIndex = start;
+ let match;
+
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
+ ++this.state.curLine;
+ this.state.lineStart = match.index + match[0].length;
+ }
+
+ if (this.isLookahead) return;
+ this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
+ }
+
+ skipLineComment(startSkip) {
+ const start = this.state.pos;
+ const startLoc = this.state.curPosition();
+ let ch = this.input.charCodeAt(this.state.pos += startSkip);
+
+ if (this.state.pos < this.length) {
+ while (!isNewLine(ch) && ++this.state.pos < this.length) {
+ ch = this.input.charCodeAt(this.state.pos);
+ }
+ }
+
+ if (this.isLookahead) return;
+ this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
+ }
+
+ skipSpace() {
+ loop: while (this.state.pos < this.length) {
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 32:
+ case 160:
+ case 9:
+ ++this.state.pos;
+ break;
+
+ case 13:
+ if (this.input.charCodeAt(this.state.pos + 1) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ case 8232:
+ case 8233:
+ ++this.state.pos;
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ break;
+
+ case 47:
+ switch (this.input.charCodeAt(this.state.pos + 1)) {
+ case 42:
+ this.skipBlockComment();
+ break;
+
+ case 47:
+ this.skipLineComment(2);
+ break;
+
+ default:
+ break loop;
+ }
+
+ break;
+
+ default:
+ if (isWhitespace(ch)) {
+ ++this.state.pos;
+ } else {
+ break loop;
+ }
+
+ }
+ }
+ }
+
+ finishToken(type, val) {
+ this.state.end = this.state.pos;
+ this.state.endLoc = this.state.curPosition();
+ const prevType = this.state.type;
+ this.state.type = type;
+ this.state.value = val;
+ if (!this.isLookahead) this.updateContext(prevType);
+ }
+
+ readToken_numberSign() {
+ if (this.state.pos === 0 && this.readToken_interpreter()) {
+ return;
+ }
+
+ const nextPos = this.state.pos + 1;
+ const next = this.input.charCodeAt(nextPos);
+
+ if (next >= 48 && next <= 57) {
+ throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
+ }
+
+ if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
+ this.expectPlugin("recordAndTuple");
+
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
+ throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
+ }
+
+ if (next === 123) {
+ this.finishToken(types.braceHashL);
+ } else {
+ this.finishToken(types.bracketHashL);
+ }
+
+ this.state.pos += 2;
+ } else {
+ this.finishOp(types.hash, 1);
+ }
+ }
+
+ readToken_dot() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next >= 48 && next <= 57) {
+ this.readNumber(true);
+ return;
+ }
+
+ if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
+ this.state.pos += 3;
+ this.finishToken(types.ellipsis);
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.dot);
+ }
+ }
+
+ readToken_slash() {
+ if (this.state.exprAllowed && !this.state.inType) {
+ ++this.state.pos;
+ this.readRegexp();
+ return;
+ }
+
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(types.assign, 2);
+ } else {
+ this.finishOp(types.slash, 1);
+ }
+ }
+
+ readToken_interpreter() {
+ if (this.state.pos !== 0 || this.length < 2) return false;
+ let ch = this.input.charCodeAt(this.state.pos + 1);
+ if (ch !== 33) return false;
+ const start = this.state.pos;
+ this.state.pos += 1;
+
+ while (!isNewLine(ch) && ++this.state.pos < this.length) {
+ ch = this.input.charCodeAt(this.state.pos);
+ }
+
+ const value = this.input.slice(start + 2, this.state.pos);
+ this.finishToken(types.interpreterDirective, value);
+ return true;
+ }
+
+ readToken_mult_modulo(code) {
+ let type = code === 42 ? types.star : types.modulo;
+ let width = 1;
+ let next = this.input.charCodeAt(this.state.pos + 1);
+ const exprAllowed = this.state.exprAllowed;
+
+ if (code === 42 && next === 42) {
+ width++;
+ next = this.input.charCodeAt(this.state.pos + 2);
+ type = types.exponent;
+ }
+
+ if (next === 61 && !exprAllowed) {
+ width++;
+ type = types.assign;
+ }
+
+ this.finishOp(type, width);
+ }
+
+ readToken_pipe_amp(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ if (this.input.charCodeAt(this.state.pos + 2) === 61) {
+ this.finishOp(types.assign, 3);
+ } else {
+ this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
+ }
+
+ return;
+ }
+
+ if (code === 124) {
+ if (next === 62) {
+ this.finishOp(types.pipeline, 2);
+ return;
+ }
+
+ if (this.hasPlugin("recordAndTuple") && next === 125) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
+ }
+
+ this.finishOp(types.braceBarR, 2);
+ return;
+ }
+
+ if (this.hasPlugin("recordAndTuple") && next === 93) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
+ }
+
+ this.finishOp(types.bracketBarR, 2);
+ return;
+ }
+ }
+
+ if (next === 61) {
+ this.finishOp(types.assign, 2);
+ return;
+ }
+
+ this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
+ }
+
+ readToken_caret() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(types.assign, 2);
+ } else {
+ this.finishOp(types.bitwiseXOR, 1);
+ }
+ }
+
+ readToken_plus_min(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
+ this.skipLineComment(3);
+ this.skipSpace();
+ this.nextToken();
+ return;
+ }
+
+ this.finishOp(types.incDec, 2);
+ return;
+ }
+
+ if (next === 61) {
+ this.finishOp(types.assign, 2);
+ } else {
+ this.finishOp(types.plusMin, 1);
+ }
+ }
+
+ readToken_lt_gt(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+ let size = 1;
+
+ if (next === code) {
+ size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
+
+ if (this.input.charCodeAt(this.state.pos + size) === 61) {
+ this.finishOp(types.assign, size + 1);
+ return;
+ }
+
+ this.finishOp(types.bitShift, size);
+ return;
+ }
+
+ if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
+ this.skipLineComment(4);
+ this.skipSpace();
+ this.nextToken();
+ return;
+ }
+
+ if (next === 61) {
+ size = 2;
+ }
+
+ this.finishOp(types.relational, size);
+ }
+
+ readToken_eq_excl(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
+ return;
+ }
+
+ if (code === 61 && next === 62) {
+ this.state.pos += 2;
+ this.finishToken(types.arrow);
+ return;
+ }
+
+ this.finishOp(code === 61 ? types.eq : types.bang, 1);
+ }
+
+ readToken_question() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+ const next2 = this.input.charCodeAt(this.state.pos + 2);
+
+ if (next === 63) {
+ if (next2 === 61) {
+ this.finishOp(types.assign, 3);
+ } else {
+ this.finishOp(types.nullishCoalescing, 2);
+ }
+ } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
+ this.state.pos += 2;
+ this.finishToken(types.questionDot);
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.question);
+ }
+ }
+
+ getTokenFromCode(code) {
+ switch (code) {
+ case 46:
+ this.readToken_dot();
+ return;
+
+ case 40:
+ ++this.state.pos;
+ this.finishToken(types.parenL);
+ return;
+
+ case 41:
+ ++this.state.pos;
+ this.finishToken(types.parenR);
+ return;
+
+ case 59:
+ ++this.state.pos;
+ this.finishToken(types.semi);
+ return;
+
+ case 44:
+ ++this.state.pos;
+ this.finishToken(types.comma);
+ return;
+
+ case 91:
+ if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
+ }
+
+ this.finishToken(types.bracketBarL);
+ this.state.pos += 2;
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.bracketL);
+ }
+
+ return;
+
+ case 93:
+ ++this.state.pos;
+ this.finishToken(types.bracketR);
+ return;
+
+ case 123:
+ if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
+ }
+
+ this.finishToken(types.braceBarL);
+ this.state.pos += 2;
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.braceL);
+ }
+
+ return;
+
+ case 125:
+ ++this.state.pos;
+ this.finishToken(types.braceR);
+ return;
+
+ case 58:
+ if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
+ this.finishOp(types.doubleColon, 2);
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.colon);
+ }
+
+ return;
+
+ case 63:
+ this.readToken_question();
+ return;
+
+ case 96:
+ ++this.state.pos;
+ this.finishToken(types.backQuote);
+ return;
+
+ case 48:
+ {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 120 || next === 88) {
+ this.readRadixNumber(16);
+ return;
+ }
+
+ if (next === 111 || next === 79) {
+ this.readRadixNumber(8);
+ return;
+ }
+
+ if (next === 98 || next === 66) {
+ this.readRadixNumber(2);
+ return;
+ }
+ }
+
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ this.readNumber(false);
+ return;
+
+ case 34:
+ case 39:
+ this.readString(code);
+ return;
+
+ case 47:
+ this.readToken_slash();
+ return;
+
+ case 37:
+ case 42:
+ this.readToken_mult_modulo(code);
+ return;
+
+ case 124:
+ case 38:
+ this.readToken_pipe_amp(code);
+ return;
+
+ case 94:
+ this.readToken_caret();
+ return;
+
+ case 43:
+ case 45:
+ this.readToken_plus_min(code);
+ return;
+
+ case 60:
+ case 62:
+ this.readToken_lt_gt(code);
+ return;
+
+ case 61:
+ case 33:
+ this.readToken_eq_excl(code);
+ return;
+
+ case 126:
+ this.finishOp(types.tilde, 1);
+ return;
+
+ case 64:
+ ++this.state.pos;
+ this.finishToken(types.at);
+ return;
+
+ case 35:
+ this.readToken_numberSign();
+ return;
+
+ case 92:
+ this.readWord();
+ return;
+
+ default:
+ if (isIdentifierStart(code)) {
+ this.readWord();
+ return;
+ }
+
+ }
+
+ throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code));
+ }
+
+ finishOp(type, size) {
+ const str = this.input.slice(this.state.pos, this.state.pos + size);
+ this.state.pos += size;
+ this.finishToken(type, str);
+ }
+
+ readRegexp() {
+ const start = this.state.pos;
+ let escaped, inClass;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(start, ErrorMessages.UnterminatedRegExp);
+ }
+
+ const ch = this.input.charAt(this.state.pos);
+
+ if (lineBreak.test(ch)) {
+ throw this.raise(start, ErrorMessages.UnterminatedRegExp);
+ }
+
+ if (escaped) {
+ escaped = false;
+ } else {
+ if (ch === "[") {
+ inClass = true;
+ } else if (ch === "]" && inClass) {
+ inClass = false;
+ } else if (ch === "/" && !inClass) {
+ break;
+ }
+
+ escaped = ch === "\\";
+ }
+
+ ++this.state.pos;
+ }
+
+ const content = this.input.slice(start, this.state.pos);
+ ++this.state.pos;
+ let mods = "";
+
+ while (this.state.pos < this.length) {
+ const char = this.input[this.state.pos];
+ const charCode = this.input.codePointAt(this.state.pos);
+
+ if (VALID_REGEX_FLAGS.has(char)) {
+ if (mods.indexOf(char) > -1) {
+ this.raise(this.state.pos + 1, ErrorMessages.DuplicateRegExpFlags);
+ }
+ } else if (isIdentifierChar(charCode) || charCode === 92) {
+ this.raise(this.state.pos + 1, ErrorMessages.MalformedRegExpFlags);
+ } else {
+ break;
+ }
+
+ ++this.state.pos;
+ mods += char;
+ }
+
+ this.finishToken(types.regexp, {
+ pattern: content,
+ flags: mods
+ });
+ }
+
+ readInt(radix, len, forceLen, allowNumSeparator = true) {
+ const start = this.state.pos;
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
+ const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
+ let invalid = false;
+ let total = 0;
+
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ const code = this.input.charCodeAt(this.state.pos);
+ let val;
+
+ if (code === 95) {
+ const prev = this.input.charCodeAt(this.state.pos - 1);
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (allowedSiblings.indexOf(next) === -1) {
+ this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
+ } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
+ this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
+ }
+
+ if (!allowNumSeparator) {
+ this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
+ }
+
+ ++this.state.pos;
+ continue;
+ }
+
+ if (code >= 97) {
+ val = code - 97 + 10;
+ } else if (code >= 65) {
+ val = code - 65 + 10;
+ } else if (_isDigit(code)) {
+ val = code - 48;
+ } else {
+ val = Infinity;
+ }
+
+ if (val >= radix) {
+ if (this.options.errorRecovery && val <= 9) {
+ val = 0;
+ this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
+ } else if (forceLen) {
+ val = 0;
+ invalid = true;
+ } else {
+ break;
+ }
+ }
+
+ ++this.state.pos;
+ total = total * radix + val;
+ }
+
+ if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) {
+ return null;
+ }
+
+ return total;
+ }
+
+ readRadixNumber(radix) {
+ const start = this.state.pos;
+ let isBigInt = false;
+ this.state.pos += 2;
+ const val = this.readInt(radix);
+
+ if (val == null) {
+ this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
+ }
+
+ const next = this.input.charCodeAt(this.state.pos);
+
+ if (next === 110) {
+ ++this.state.pos;
+ isBigInt = true;
+ } else if (next === 109) {
+ throw this.raise(start, ErrorMessages.InvalidDecimal);
+ }
+
+ if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
+ throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
+ }
+
+ if (isBigInt) {
+ const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
+ this.finishToken(types.bigint, str);
+ return;
+ }
+
+ this.finishToken(types.num, val);
+ }
+
+ readNumber(startsWithDot) {
+ const start = this.state.pos;
+ let isFloat = false;
+ let isBigInt = false;
+ let isDecimal = false;
+ let hasExponent = false;
+ let isOctal = false;
+
+ if (!startsWithDot && this.readInt(10) === null) {
+ this.raise(start, ErrorMessages.InvalidNumber);
+ }
+
+ const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48;
+
+ if (hasLeadingZero) {
+ const integer = this.input.slice(start, this.state.pos);
+
+ if (this.state.strict) {
+ this.raise(start, ErrorMessages.StrictOctalLiteral);
+ } else {
+ const underscorePos = integer.indexOf("_");
+
+ if (underscorePos > 0) {
+ this.raise(underscorePos + start, ErrorMessages.ZeroDigitNumericSeparator);
+ }
+ }
+
+ isOctal = hasLeadingZero && !/[89]/.test(integer);
+ }
+
+ let next = this.input.charCodeAt(this.state.pos);
+
+ if (next === 46 && !isOctal) {
+ ++this.state.pos;
+ this.readInt(10);
+ isFloat = true;
+ next = this.input.charCodeAt(this.state.pos);
+ }
+
+ if ((next === 69 || next === 101) && !isOctal) {
+ next = this.input.charCodeAt(++this.state.pos);
+
+ if (next === 43 || next === 45) {
+ ++this.state.pos;
+ }
+
+ if (this.readInt(10) === null) {
+ this.raise(start, ErrorMessages.InvalidOrMissingExponent);
+ }
+
+ isFloat = true;
+ hasExponent = true;
+ next = this.input.charCodeAt(this.state.pos);
+ }
+
+ if (next === 110) {
+ if (isFloat || hasLeadingZero) {
+ this.raise(start, ErrorMessages.InvalidBigIntLiteral);
+ }
+
+ ++this.state.pos;
+ isBigInt = true;
+ }
+
+ if (next === 109) {
+ this.expectPlugin("decimal", this.state.pos);
+
+ if (hasExponent || hasLeadingZero) {
+ this.raise(start, ErrorMessages.InvalidDecimal);
+ }
+
+ ++this.state.pos;
+ isDecimal = true;
+ }
+
+ if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
+ throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
+ }
+
+ const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
+
+ if (isBigInt) {
+ this.finishToken(types.bigint, str);
+ return;
+ }
+
+ if (isDecimal) {
+ this.finishToken(types.decimal, str);
+ return;
+ }
+
+ const val = isOctal ? parseInt(str, 8) : parseFloat(str);
+ this.finishToken(types.num, val);
+ }
+
+ readCodePoint(throwOnInvalid) {
+ const ch = this.input.charCodeAt(this.state.pos);
+ let code;
+
+ if (ch === 123) {
+ const codePos = ++this.state.pos;
+ code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
+ ++this.state.pos;
+
+ if (code !== null && code > 0x10ffff) {
+ if (throwOnInvalid) {
+ this.raise(codePos, ErrorMessages.InvalidCodePoint);
+ } else {
+ return null;
+ }
+ }
+ } else {
+ code = this.readHexChar(4, false, throwOnInvalid);
+ }
+
+ return code;
+ }
+
+ readString(quote) {
+ let out = "",
+ chunkStart = ++this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 92) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.readEscapedChar(false);
+ chunkStart = this.state.pos;
+ } else if (ch === 8232 || ch === 8233) {
+ ++this.state.pos;
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
+ } else {
+ ++this.state.pos;
+ }
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos++);
+ this.finishToken(types.string, out);
+ }
+
+ readTmplToken() {
+ let out = "",
+ chunkStart = this.state.pos,
+ containsInvalid = false;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
+ if (this.state.pos === this.state.start && this.match(types.template)) {
+ if (ch === 36) {
+ this.state.pos += 2;
+ this.finishToken(types.dollarBraceL);
+ return;
+ } else {
+ ++this.state.pos;
+ this.finishToken(types.backQuote);
+ return;
+ }
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos);
+ this.finishToken(types.template, containsInvalid ? null : out);
+ return;
+ }
+
+ if (ch === 92) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ const escaped = this.readEscapedChar(true);
+
+ if (escaped === null) {
+ containsInvalid = true;
+ } else {
+ out += escaped;
+ }
+
+ chunkStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ ++this.state.pos;
+
+ switch (ch) {
+ case 13:
+ if (this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ out += "\n";
+ break;
+
+ default:
+ out += String.fromCharCode(ch);
+ break;
+ }
+
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+ }
+
+ readEscapedChar(inTemplate) {
+ const throwOnInvalid = !inTemplate;
+ const ch = this.input.charCodeAt(++this.state.pos);
+ ++this.state.pos;
+
+ switch (ch) {
+ case 110:
+ return "\n";
+
+ case 114:
+ return "\r";
+
+ case 120:
+ {
+ const code = this.readHexChar(2, false, throwOnInvalid);
+ return code === null ? null : String.fromCharCode(code);
+ }
+
+ case 117:
+ {
+ const code = this.readCodePoint(throwOnInvalid);
+ return code === null ? null : String.fromCodePoint(code);
+ }
+
+ case 116:
+ return "\t";
+
+ case 98:
+ return "\b";
+
+ case 118:
+ return "\u000b";
+
+ case 102:
+ return "\f";
+
+ case 13:
+ if (this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ this.state.lineStart = this.state.pos;
+ ++this.state.curLine;
+
+ case 8232:
+ case 8233:
+ return "";
+
+ case 56:
+ case 57:
+ if (inTemplate) {
+ return null;
+ } else if (this.state.strict) {
+ this.raise(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
+ }
+
+ default:
+ if (ch >= 48 && ch <= 55) {
+ const codePos = this.state.pos - 1;
+ const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
+ let octalStr = match[0];
+ let octal = parseInt(octalStr, 8);
+
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1);
+ octal = parseInt(octalStr, 8);
+ }
+
+ this.state.pos += octalStr.length - 1;
+ const next = this.input.charCodeAt(this.state.pos);
+
+ if (octalStr !== "0" || next === 56 || next === 57) {
+ if (inTemplate) {
+ return null;
+ } else if (this.state.strict) {
+ this.raise(codePos, ErrorMessages.StrictNumericEscape);
+ } else {
+ this.state.octalPositions.push(codePos);
+ }
+ }
+
+ return String.fromCharCode(octal);
+ }
+
+ return String.fromCharCode(ch);
+ }
+ }
+
+ readHexChar(len, forceLen, throwOnInvalid) {
+ const codePos = this.state.pos;
+ const n = this.readInt(16, len, forceLen, false);
+
+ if (n === null) {
+ if (throwOnInvalid) {
+ this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
+ } else {
+ this.state.pos = codePos - 1;
+ }
+ }
+
+ return n;
+ }
+
+ readWord1() {
+ let word = "";
+ this.state.containsEsc = false;
+ const start = this.state.pos;
+ let chunkStart = this.state.pos;
+
+ while (this.state.pos < this.length) {
+ const ch = this.input.codePointAt(this.state.pos);
+
+ if (isIdentifierChar(ch)) {
+ this.state.pos += ch <= 0xffff ? 1 : 2;
+ } else if (this.state.isIterator && ch === 64) {
+ ++this.state.pos;
+ } else if (ch === 92) {
+ this.state.containsEsc = true;
+ word += this.input.slice(chunkStart, this.state.pos);
+ const escStart = this.state.pos;
+ const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
+
+ if (this.input.charCodeAt(++this.state.pos) !== 117) {
+ this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
+ continue;
+ }
+
+ ++this.state.pos;
+ const esc = this.readCodePoint(true);
+
+ if (esc !== null) {
+ if (!identifierCheck(esc)) {
+ this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
+ }
+
+ word += String.fromCodePoint(esc);
+ }
+
+ chunkStart = this.state.pos;
+ } else {
+ break;
+ }
+ }
+
+ return word + this.input.slice(chunkStart, this.state.pos);
+ }
+
+ isIterator(word) {
+ return word === "@@iterator" || word === "@@asyncIterator";
+ }
+
+ readWord() {
+ const word = this.readWord1();
+ const type = keywords.get(word) || types.name;
+
+ if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) {
+ this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, word);
+ }
+
+ this.finishToken(type, word);
+ }
+
+ checkKeywordEscapes() {
+ const kw = this.state.type.keyword;
+
+ if (kw && this.state.containsEsc) {
+ this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw);
+ }
+ }
+
+ braceIsBlock(prevType) {
+ const parent = this.curContext();
+
+ if (parent === types$1.functionExpression || parent === types$1.functionStatement) {
+ return true;
+ }
+
+ if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) {
+ return !parent.isExpr;
+ }
+
+ if (prevType === types._return || prevType === types.name && this.state.exprAllowed) {
+ return this.hasPrecedingLineBreak();
+ }
+
+ if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) {
+ return true;
+ }
+
+ if (prevType === types.braceL) {
+ return parent === types$1.braceStatement;
+ }
+
+ if (prevType === types._var || prevType === types._const || prevType === types.name) {
+ return false;
+ }
+
+ if (prevType === types.relational) {
+ return true;
+ }
+
+ return !this.state.exprAllowed;
+ }
+
+ updateContext(prevType) {
+ const type = this.state.type;
+ let update;
+
+ if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) {
+ this.state.exprAllowed = false;
+ } else if (update = type.updateContext) {
+ update.call(this, prevType);
+ } else {
+ this.state.exprAllowed = type.beforeExpr;
+ }
+ }
+
+}
+
+class UtilParser extends Tokenizer {
+ addExtra(node, key, val) {
+ if (!node) return;
+ const extra = node.extra = node.extra || {};
+ extra[key] = val;
+ }
+
+ isRelational(op) {
+ return this.match(types.relational) && this.state.value === op;
+ }
+
+ expectRelational(op) {
+ if (this.isRelational(op)) {
+ this.next();
+ } else {
+ this.unexpected(null, types.relational);
+ }
+ }
+
+ isContextual(name) {
+ return this.match(types.name) && this.state.value === name && !this.state.containsEsc;
+ }
+
+ isUnparsedContextual(nameStart, name) {
+ const nameEnd = nameStart + name.length;
+ return this.input.slice(nameStart, nameEnd) === name && (nameEnd === this.input.length || !isIdentifierChar(this.input.charCodeAt(nameEnd)));
+ }
+
+ isLookaheadContextual(name) {
+ const next = this.nextTokenStart();
+ return this.isUnparsedContextual(next, name);
+ }
+
+ eatContextual(name) {
+ return this.isContextual(name) && this.eat(types.name);
+ }
+
+ expectContextual(name, message) {
+ if (!this.eatContextual(name)) this.unexpected(null, message);
+ }
+
+ canInsertSemicolon() {
+ return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak();
+ }
+
+ hasPrecedingLineBreak() {
+ return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
+ }
+
+ isLineTerminator() {
+ return this.eat(types.semi) || this.canInsertSemicolon();
+ }
+
+ semicolon() {
+ if (!this.isLineTerminator()) this.unexpected(null, types.semi);
+ }
+
+ expect(type, pos) {
+ this.eat(type) || this.unexpected(pos, type);
+ }
+
+ assertNoSpace(message = "Unexpected space.") {
+ if (this.state.start > this.state.lastTokEnd) {
+ this.raise(this.state.lastTokEnd, message);
+ }
+ }
+
+ unexpected(pos, messageOrType = "Unexpected token") {
+ if (typeof messageOrType !== "string") {
+ messageOrType = `Unexpected token, expected "${messageOrType.label}"`;
+ }
+
+ throw this.raise(pos != null ? pos : this.state.start, messageOrType);
+ }
+
+ expectPlugin(name, pos) {
+ if (!this.hasPlugin(name)) {
+ throw this.raiseWithData(pos != null ? pos : this.state.start, {
+ missingPlugin: [name]
+ }, `This experimental syntax requires enabling the parser plugin: '${name}'`);
+ }
+
+ return true;
+ }
+
+ expectOnePlugin(names, pos) {
+ if (!names.some(n => this.hasPlugin(n))) {
+ throw this.raiseWithData(pos != null ? pos : this.state.start, {
+ missingPlugin: names
+ }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`);
+ }
+ }
+
+ tryParse(fn, oldState = this.state.clone()) {
+ const abortSignal = {
+ node: null
+ };
+
+ try {
+ const node = fn((node = null) => {
+ abortSignal.node = node;
+ throw abortSignal;
+ });
+
+ if (this.state.errors.length > oldState.errors.length) {
+ const failState = this.state;
+ this.state = oldState;
+ return {
+ node,
+ error: failState.errors[oldState.errors.length],
+ thrown: false,
+ aborted: false,
+ failState
+ };
+ }
+
+ return {
+ node,
+ error: null,
+ thrown: false,
+ aborted: false,
+ failState: null
+ };
+ } catch (error) {
+ const failState = this.state;
+ this.state = oldState;
+
+ if (error instanceof SyntaxError) {
+ return {
+ node: null,
+ error,
+ thrown: true,
+ aborted: false,
+ failState
+ };
+ }
+
+ if (error === abortSignal) {
+ return {
+ node: abortSignal.node,
+ error: null,
+ thrown: false,
+ aborted: true,
+ failState
+ };
+ }
+
+ throw error;
+ }
+ }
+
+ checkExpressionErrors(refExpressionErrors, andThrow) {
+ if (!refExpressionErrors) return false;
+ const {
+ shorthandAssign,
+ doubleProto
+ } = refExpressionErrors;
+ if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0;
+
+ if (shorthandAssign >= 0) {
+ this.unexpected(shorthandAssign);
+ }
+
+ if (doubleProto >= 0) {
+ this.raise(doubleProto, ErrorMessages.DuplicateProto);
+ }
+ }
+
+ isLiteralPropertyName() {
+ return this.match(types.name) || !!this.state.type.keyword || this.match(types.string) || this.match(types.num) || this.match(types.bigint) || this.match(types.decimal);
+ }
+
+}
+class ExpressionErrors {
+ constructor() {
+ this.shorthandAssign = -1;
+ this.doubleProto = -1;
+ }
+
+}
+
+class Node {
+ constructor(parser, pos, loc) {
+ this.type = void 0;
+ this.start = void 0;
+ this.end = void 0;
+ this.loc = void 0;
+ this.range = void 0;
+ this.leadingComments = void 0;
+ this.trailingComments = void 0;
+ this.innerComments = void 0;
+ this.extra = void 0;
+ this.type = "";
+ this.start = pos;
+ this.end = 0;
+ this.loc = new SourceLocation(loc);
+ if (parser == null ? void 0 : parser.options.ranges) this.range = [pos, 0];
+ if (parser == null ? void 0 : parser.filename) this.loc.filename = parser.filename;
+ }
+
+ __clone() {
+ const newNode = new Node();
+ const keys = Object.keys(this);
+
+ for (let i = 0, length = keys.length; i < length; i++) {
+ const key = keys[i];
+
+ if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
+ newNode[key] = this[key];
+ }
+ }
+
+ return newNode;
+ }
+
+}
+
+class NodeUtils extends UtilParser {
+ startNode() {
+ return new Node(this, this.state.start, this.state.startLoc);
+ }
+
+ startNodeAt(pos, loc) {
+ return new Node(this, pos, loc);
+ }
+
+ startNodeAtNode(type) {
+ return this.startNodeAt(type.start, type.loc.start);
+ }
+
+ finishNode(node, type) {
+ return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
+ }
+
+ finishNodeAt(node, type, pos, loc) {
+
+ node.type = type;
+ node.end = pos;
+ node.loc.end = loc;
+ if (this.options.ranges) node.range[1] = pos;
+ this.processComment(node);
+ return node;
+ }
+
+ resetStartLocation(node, start, startLoc) {
+ node.start = start;
+ node.loc.start = startLoc;
+ if (this.options.ranges) node.range[0] = start;
+ }
+
+ resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
+ node.end = end;
+ node.loc.end = endLoc;
+ if (this.options.ranges) node.range[1] = end;
+ }
+
+ resetStartLocationFromNode(node, locationNode) {
+ this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
+ }
+
+}
+
+const unwrapParenthesizedExpression = node => {
+ return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
+};
+
+class LValParser extends NodeUtils {
+ toAssignable(node, isLHS = false) {
+ var _node$extra, _node$extra3;
+
+ let parenthesized = undefined;
+
+ if (node.type === "ParenthesizedExpression" || ((_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized)) {
+ parenthesized = unwrapParenthesizedExpression(node);
+
+ if (isLHS) {
+ if (parenthesized.type === "Identifier") {
+ this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
+ } else if (parenthesized.type !== "MemberExpression") {
+ this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
+ }
+ } else {
+ this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
+ }
+ }
+
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ break;
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+
+ for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
+ var _node$extra2;
+
+ const prop = node.properties[i];
+ const isLast = i === last;
+ this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
+
+ if (isLast && prop.type === "RestElement" && ((_node$extra2 = node.extra) == null ? void 0 : _node$extra2.trailingComma)) {
+ this.raiseRestNotLast(node.extra.trailingComma);
+ }
+ }
+
+ break;
+
+ case "ObjectProperty":
+ this.toAssignable(node.value, isLHS);
+ break;
+
+ case "SpreadElement":
+ {
+ this.checkToRestConversion(node);
+ node.type = "RestElement";
+ const arg = node.argument;
+ this.toAssignable(arg, isLHS);
+ break;
+ }
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
+ break;
+
+ case "AssignmentExpression":
+ if (node.operator !== "=") {
+ this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
+ }
+
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ this.toAssignable(node.left, isLHS);
+ break;
+
+ case "ParenthesizedExpression":
+ this.toAssignable(parenthesized, isLHS);
+ break;
+ }
+
+ return node;
+ }
+
+ toAssignableObjectExpressionProp(prop, isLast, isLHS) {
+ if (prop.type === "ObjectMethod") {
+ const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
+ this.raise(prop.key.start, error);
+ } else if (prop.type === "SpreadElement" && !isLast) {
+ this.raiseRestNotLast(prop.start);
+ } else {
+ this.toAssignable(prop, isLHS);
+ }
+ }
+
+ toAssignableList(exprList, trailingCommaPos, isLHS) {
+ let end = exprList.length;
+
+ if (end) {
+ const last = exprList[end - 1];
+
+ if ((last == null ? void 0 : last.type) === "RestElement") {
+ --end;
+ } else if ((last == null ? void 0 : last.type) === "SpreadElement") {
+ last.type = "RestElement";
+ let arg = last.argument;
+ this.toAssignable(arg, isLHS);
+ arg = unwrapParenthesizedExpression(arg);
+
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
+ this.unexpected(arg.start);
+ }
+
+ if (trailingCommaPos) {
+ this.raiseTrailingCommaAfterRest(trailingCommaPos);
+ }
+
+ --end;
+ }
+ }
+
+ for (let i = 0; i < end; i++) {
+ const elt = exprList[i];
+
+ if (elt) {
+ this.toAssignable(elt, isLHS);
+
+ if (elt.type === "RestElement") {
+ this.raiseRestNotLast(elt.start);
+ }
+ }
+ }
+
+ return exprList;
+ }
+
+ toReferencedList(exprList, isParenthesizedExpr) {
+ return exprList;
+ }
+
+ toReferencedListDeep(exprList, isParenthesizedExpr) {
+ this.toReferencedList(exprList, isParenthesizedExpr);
+
+ for (let _i = 0; _i < exprList.length; _i++) {
+ const expr = exprList[_i];
+
+ if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
+ this.toReferencedListDeep(expr.elements);
+ }
+ }
+ }
+
+ parseSpread(refExpressionErrors, refNeedsArrowPos) {
+ const node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined, refNeedsArrowPos);
+ return this.finishNode(node, "SpreadElement");
+ }
+
+ parseRestBinding() {
+ const node = this.startNode();
+ this.next();
+ node.argument = this.parseBindingAtom();
+ return this.finishNode(node, "RestElement");
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case types.bracketL:
+ {
+ const node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(types.bracketR, 93, true);
+ return this.finishNode(node, "ArrayPattern");
+ }
+
+ case types.braceL:
+ return this.parseObjectLike(types.braceR, true);
+ }
+
+ return this.parseIdentifier();
+ }
+
+ parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
+ const elts = [];
+ let first = true;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma);
+ }
+
+ if (allowEmpty && this.match(types.comma)) {
+ elts.push(null);
+ } else if (this.eat(close)) {
+ break;
+ } else if (this.match(types.ellipsis)) {
+ elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
+ this.checkCommaAfterRest(closeCharCode);
+ this.expect(close);
+ break;
+ } else {
+ const decorators = [];
+
+ if (this.match(types.at) && this.hasPlugin("decorators")) {
+ this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
+ }
+
+ while (this.match(types.at)) {
+ decorators.push(this.parseDecorator());
+ }
+
+ elts.push(this.parseAssignableListItem(allowModifiers, decorators));
+ }
+ }
+
+ return elts;
+ }
+
+ parseAssignableListItem(allowModifiers, decorators) {
+ const left = this.parseMaybeDefault();
+ this.parseAssignableListItemTypes(left);
+ const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
+
+ if (decorators.length) {
+ left.decorators = decorators;
+ }
+
+ return elt;
+ }
+
+ parseAssignableListItemTypes(param) {
+ return param;
+ }
+
+ parseMaybeDefault(startPos, startLoc, left) {
+ var _startLoc, _startPos, _left;
+
+ startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
+ startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
+ left = (_left = left) != null ? _left : this.parseBindingAtom();
+ if (!this.eat(types.eq)) return left;
+ const node = this.startNodeAt(startPos, startLoc);
+ node.left = left;
+ node.right = this.parseMaybeAssignAllowIn();
+ return this.finishNode(node, "AssignmentPattern");
+ }
+
+ checkLVal(expr, contextDescription, bindingType = BIND_NONE, checkClashes, disallowLetBinding, strictModeChanged = false) {
+ switch (expr.type) {
+ case "Identifier":
+ {
+ const {
+ name
+ } = expr;
+
+ if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name, this.inModule) : isStrictBindOnlyReservedWord(name))) {
+ this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name);
+ }
+
+ if (checkClashes) {
+ if (checkClashes.has(name)) {
+ this.raise(expr.start, ErrorMessages.ParamDupe);
+ } else {
+ checkClashes.add(name);
+ }
+ }
+
+ if (disallowLetBinding && name === "let") {
+ this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
+ }
+
+ if (!(bindingType & BIND_NONE)) {
+ this.scope.declareName(name, bindingType, expr.start);
+ }
+
+ break;
+ }
+
+ case "MemberExpression":
+ if (bindingType !== BIND_NONE) {
+ this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
+ }
+
+ break;
+
+ case "ObjectPattern":
+ for (let _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) {
+ let prop = _expr$properties[_i2];
+ if (prop.type === "ObjectProperty") prop = prop.value;else if (prop.type === "ObjectMethod") continue;
+ this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
+ }
+
+ break;
+
+ case "ArrayPattern":
+ for (let _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) {
+ const elem = _expr$elements[_i3];
+
+ if (elem) {
+ this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
+ }
+ }
+
+ break;
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
+ break;
+
+ case "RestElement":
+ this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
+ break;
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
+ break;
+
+ default:
+ {
+ this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
+ }
+ }
+ }
+
+ checkToRestConversion(node) {
+ if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
+ this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
+ }
+ }
+
+ checkCommaAfterRest(close) {
+ if (this.match(types.comma)) {
+ if (this.lookaheadCharCode() === close) {
+ this.raiseTrailingCommaAfterRest(this.state.start);
+ } else {
+ this.raiseRestNotLast(this.state.start);
+ }
+ }
+ }
+
+ raiseRestNotLast(pos) {
+ throw this.raise(pos, ErrorMessages.ElementAfterRest);
+ }
+
+ raiseTrailingCommaAfterRest(pos) {
+ this.raise(pos, ErrorMessages.RestTrailingComma);
+ }
+
+}
+
+const kExpression = 0,
+ kMaybeArrowParameterDeclaration = 1,
+ kMaybeAsyncArrowParameterDeclaration = 2,
+ kParameterDeclaration = 3;
+
+class ExpressionScope {
+ constructor(type = kExpression) {
+ this.type = void 0;
+ this.type = type;
+ }
+
+ canBeArrowParameterDeclaration() {
+ return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
+ }
+
+ isCertainlyParameterDeclaration() {
+ return this.type === kParameterDeclaration;
+ }
+
+}
+
+class ArrowHeadParsingScope extends ExpressionScope {
+ constructor(type) {
+ super(type);
+ this.errors = new Map();
+ }
+
+ recordDeclarationError(pos, message) {
+ this.errors.set(pos, message);
+ }
+
+ clearDeclarationError(pos) {
+ this.errors.delete(pos);
+ }
+
+ iterateErrors(iterator) {
+ this.errors.forEach(iterator);
+ }
+
+}
+
+class ExpressionScopeHandler {
+ constructor(raise) {
+ this.stack = [new ExpressionScope()];
+ this.raise = raise;
+ }
+
+ enter(scope) {
+ this.stack.push(scope);
+ }
+
+ exit() {
+ this.stack.pop();
+ }
+
+ recordParameterInitializerError(pos, message) {
+ const {
+ stack
+ } = this;
+ let i = stack.length - 1;
+ let scope = stack[i];
+
+ while (!scope.isCertainlyParameterDeclaration()) {
+ if (scope.canBeArrowParameterDeclaration()) {
+ scope.recordDeclarationError(pos, message);
+ } else {
+ return;
+ }
+
+ scope = stack[--i];
+ }
+
+ this.raise(pos, message);
+ }
+
+ recordParenthesizedIdentifierError(pos, message) {
+ const {
+ stack
+ } = this;
+ const scope = stack[stack.length - 1];
+
+ if (scope.isCertainlyParameterDeclaration()) {
+ this.raise(pos, message);
+ } else if (scope.canBeArrowParameterDeclaration()) {
+ scope.recordDeclarationError(pos, message);
+ } else {
+ return;
+ }
+ }
+
+ recordAsyncArrowParametersError(pos, message) {
+ const {
+ stack
+ } = this;
+ let i = stack.length - 1;
+ let scope = stack[i];
+
+ while (scope.canBeArrowParameterDeclaration()) {
+ if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
+ scope.recordDeclarationError(pos, message);
+ }
+
+ scope = stack[--i];
+ }
+ }
+
+ validateAsPattern() {
+ const {
+ stack
+ } = this;
+ const currentScope = stack[stack.length - 1];
+ if (!currentScope.canBeArrowParameterDeclaration()) return;
+ currentScope.iterateErrors((message, pos) => {
+ this.raise(pos, message);
+ let i = stack.length - 2;
+ let scope = stack[i];
+
+ while (scope.canBeArrowParameterDeclaration()) {
+ scope.clearDeclarationError(pos);
+ scope = stack[--i];
+ }
+ });
+ }
+
+}
+function newParameterDeclarationScope() {
+ return new ExpressionScope(kParameterDeclaration);
+}
+function newArrowHeadScope() {
+ return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
+}
+function newAsyncArrowScope() {
+ return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
+}
+function newExpressionScope() {
+ return new ExpressionScope();
+}
+
+class ExpressionParser extends LValParser {
+ checkProto(prop, isRecord, protoRef, refExpressionErrors) {
+ if (prop.type === "SpreadElement" || prop.type === "ObjectMethod" || prop.computed || prop.shorthand) {
+ return;
+ }
+
+ const key = prop.key;
+ const name = key.type === "Identifier" ? key.name : key.value;
+
+ if (name === "__proto__") {
+ if (isRecord) {
+ this.raise(key.start, ErrorMessages.RecordNoProto);
+ return;
+ }
+
+ if (protoRef.used) {
+ if (refExpressionErrors) {
+ if (refExpressionErrors.doubleProto === -1) {
+ refExpressionErrors.doubleProto = key.start;
+ }
+ } else {
+ this.raise(key.start, ErrorMessages.DuplicateProto);
+ }
+ }
+
+ protoRef.used = true;
+ }
+ }
+
+ shouldExitDescending(expr, potentialArrowAt) {
+ return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
+ }
+
+ getExpression() {
+ let paramFlags = PARAM;
+
+ if (this.hasPlugin("topLevelAwait") && this.inModule) {
+ paramFlags |= PARAM_AWAIT;
+ }
+
+ this.scope.enter(SCOPE_PROGRAM);
+ this.prodParam.enter(paramFlags);
+ this.nextToken();
+ const expr = this.parseExpression();
+
+ if (!this.match(types.eof)) {
+ this.unexpected();
+ }
+
+ expr.comments = this.state.comments;
+ expr.errors = this.state.errors;
+ return expr;
+ }
+
+ parseExpression(disallowIn, refExpressionErrors) {
+ if (disallowIn) {
+ return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
+ }
+
+ return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
+ }
+
+ parseExpressionBase(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const expr = this.parseMaybeAssign(refExpressionErrors);
+
+ if (this.match(types.comma)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.expressions = [expr];
+
+ while (this.eat(types.comma)) {
+ node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
+ }
+
+ this.toReferencedList(node.expressions);
+ return this.finishNode(node, "SequenceExpression");
+ }
+
+ return expr;
+ }
+
+ parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
+ return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
+ }
+
+ parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
+ return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos));
+ }
+
+ parseMaybeAssign(refExpressionErrors, afterLeftParse, refNeedsArrowPos) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+
+ if (this.isContextual("yield")) {
+ if (this.prodParam.hasYield) {
+ this.state.exprAllowed = true;
+ let left = this.parseYield();
+
+ if (afterLeftParse) {
+ left = afterLeftParse.call(this, left, startPos, startLoc);
+ }
+
+ return left;
+ }
+ }
+
+ let ownExpressionErrors;
+
+ if (refExpressionErrors) {
+ ownExpressionErrors = false;
+ } else {
+ refExpressionErrors = new ExpressionErrors();
+ ownExpressionErrors = true;
+ }
+
+ if (this.match(types.parenL) || this.match(types.name)) {
+ this.state.potentialArrowAt = this.state.start;
+ }
+
+ let left = this.parseMaybeConditional(refExpressionErrors, refNeedsArrowPos);
+
+ if (afterLeftParse) {
+ left = afterLeftParse.call(this, left, startPos, startLoc);
+ }
+
+ if (this.state.type.isAssign) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const operator = this.state.value;
+ node.operator = operator;
+
+ if (this.match(types.eq)) {
+ node.left = this.toAssignable(left, true);
+ refExpressionErrors.doubleProto = -1;
+ } else {
+ node.left = left;
+ }
+
+ if (refExpressionErrors.shorthandAssign >= node.left.start) {
+ refExpressionErrors.shorthandAssign = -1;
+ }
+
+ this.checkLVal(left, "assignment expression");
+ this.next();
+ node.right = this.parseMaybeAssign();
+ return this.finishNode(node, "AssignmentExpression");
+ } else if (ownExpressionErrors) {
+ this.checkExpressionErrors(refExpressionErrors, true);
+ }
+
+ return left;
+ }
+
+ parseMaybeConditional(refExpressionErrors, refNeedsArrowPos) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseExprOps(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseConditional(expr, startPos, startLoc, refNeedsArrowPos);
+ }
+
+ parseConditional(expr, startPos, startLoc, refNeedsArrowPos) {
+ if (this.eat(types.question)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssignAllowIn();
+ this.expect(types.colon);
+ node.alternate = this.parseMaybeAssign();
+ return this.finishNode(node, "ConditionalExpression");
+ }
+
+ return expr;
+ }
+
+ parseExprOps(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseMaybeUnary(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseExprOp(expr, startPos, startLoc, -1);
+ }
+
+ parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
+ let prec = this.state.type.binop;
+
+ if (prec != null && (this.prodParam.hasIn || !this.match(types._in))) {
+ if (prec > minPrec) {
+ const op = this.state.type;
+
+ if (op === types.pipeline) {
+ this.expectPlugin("pipelineOperator");
+
+ if (this.state.inFSharpPipelineDirectBody) {
+ return left;
+ }
+
+ this.state.inPipeline = true;
+ this.checkPipelineAtInfixOperator(left, leftStartPos);
+ }
+
+ const node = this.startNodeAt(leftStartPos, leftStartLoc);
+ node.left = left;
+ node.operator = this.state.value;
+
+ if (op === types.exponent && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) {
+ this.raise(left.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
+ }
+
+ const logical = op === types.logicalOR || op === types.logicalAND;
+ const coalesce = op === types.nullishCoalescing;
+
+ if (coalesce) {
+ prec = types.logicalAND.binop;
+ }
+
+ this.next();
+
+ if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
+ if (this.match(types.name) && this.state.value === "await" && this.prodParam.hasAwait) {
+ throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
+ }
+ }
+
+ node.right = this.parseExprOpRightExpr(op, prec);
+ this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
+ const nextOp = this.state.type;
+
+ if (coalesce && (nextOp === types.logicalOR || nextOp === types.logicalAND) || logical && nextOp === types.nullishCoalescing) {
+ throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
+ }
+
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
+ }
+ }
+
+ return left;
+ }
+
+ parseExprOpRightExpr(op, prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+
+ switch (op) {
+ case types.pipeline:
+ switch (this.getPluginOption("pipelineOperator", "proposal")) {
+ case "smart":
+ return this.withTopicPermittingContext(() => {
+ return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
+ });
+
+ case "fsharp":
+ return this.withSoloAwaitPermittingContext(() => {
+ return this.parseFSharpPipelineBody(prec);
+ });
+ }
+
+ default:
+ return this.parseExprOpBaseRightExpr(op, prec);
+ }
+ }
+
+ parseExprOpBaseRightExpr(op, prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
+ }
+
+ parseMaybeUnary(refExpressionErrors) {
+ if (this.isContextual("await") && this.isAwaitAllowed()) {
+ return this.parseAwait();
+ }
+
+ const update = this.match(types.incDec);
+ const node = this.startNode();
+
+ if (this.state.type.prefix) {
+ node.operator = this.state.value;
+ node.prefix = true;
+
+ if (this.match(types._throw)) {
+ this.expectPlugin("throwExpressions");
+ }
+
+ const isDelete = this.match(types._delete);
+ this.next();
+ node.argument = this.parseMaybeUnary();
+ this.checkExpressionErrors(refExpressionErrors, true);
+
+ if (this.state.strict && isDelete) {
+ const arg = node.argument;
+
+ if (arg.type === "Identifier") {
+ this.raise(node.start, ErrorMessages.StrictDelete);
+ } else if ((arg.type === "MemberExpression" || arg.type === "OptionalMemberExpression") && arg.property.type === "PrivateName") {
+ this.raise(node.start, ErrorMessages.DeletePrivateField);
+ }
+ }
+
+ if (!update) {
+ return this.finishNode(node, "UnaryExpression");
+ }
+ }
+
+ return this.parseUpdate(node, update, refExpressionErrors);
+ }
+
+ parseUpdate(node, update, refExpressionErrors) {
+ if (update) {
+ this.checkLVal(node.argument, "prefix operation");
+ return this.finishNode(node, "UpdateExpression");
+ }
+
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let expr = this.parseExprSubscripts(refExpressionErrors);
+ if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;
+
+ while (this.state.type.postfix && !this.canInsertSemicolon()) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.operator = this.state.value;
+ node.prefix = false;
+ node.argument = expr;
+ this.checkLVal(expr, "postfix operation");
+ this.next();
+ expr = this.finishNode(node, "UpdateExpression");
+ }
+
+ return expr;
+ }
+
+ parseExprSubscripts(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseExprAtom(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseSubscripts(expr, startPos, startLoc);
+ }
+
+ parseSubscripts(base, startPos, startLoc, noCalls) {
+ const state = {
+ optionalChainMember: false,
+ maybeAsyncArrow: this.atPossibleAsyncArrow(base),
+ stop: false
+ };
+
+ do {
+ base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
+ state.maybeAsyncArrow = false;
+ } while (!state.stop);
+
+ return base;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ if (!noCalls && this.eat(types.doubleColon)) {
+ return this.parseBind(base, startPos, startLoc, noCalls, state);
+ } else if (this.match(types.backQuote)) {
+ return this.parseTaggedTemplateExpression(base, startPos, startLoc, state);
+ }
+
+ let optional = false;
+
+ if (this.match(types.questionDot)) {
+ state.optionalChainMember = optional = true;
+
+ if (noCalls && this.lookaheadCharCode() === 40) {
+ state.stop = true;
+ return base;
+ }
+
+ this.next();
+ }
+
+ if (!noCalls && this.match(types.parenL)) {
+ return this.parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional);
+ } else if (optional || this.match(types.bracketL) || this.eat(types.dot)) {
+ return this.parseMember(base, startPos, startLoc, state, optional);
+ } else {
+ state.stop = true;
+ return base;
+ }
+ }
+
+ parseMember(base, startPos, startLoc, state, optional) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const computed = this.eat(types.bracketL);
+ node.object = base;
+ node.computed = computed;
+ const property = computed ? this.parseExpression() : this.parseMaybePrivateName(true);
+
+ if (property.type === "PrivateName") {
+ if (node.object.type === "Super") {
+ this.raise(startPos, ErrorMessages.SuperPrivateField);
+ }
+
+ this.classScope.usePrivateName(property.id.name, property.start);
+ }
+
+ node.property = property;
+
+ if (computed) {
+ this.expect(types.bracketR);
+ }
+
+ if (state.optionalChainMember) {
+ node.optional = optional;
+ return this.finishNode(node, "OptionalMemberExpression");
+ } else {
+ return this.finishNode(node, "MemberExpression");
+ }
+ }
+
+ parseBind(base, startPos, startLoc, noCalls, state) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.object = base;
+ node.callee = this.parseNoCallExpr();
+ state.stop = true;
+ return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
+ }
+
+ parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional) {
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ this.state.maybeInArrowParameters = true;
+ this.next();
+ let node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+
+ if (state.maybeAsyncArrow) {
+ this.expressionScope.enter(newAsyncArrowScope());
+ }
+
+ if (state.optionalChainMember) {
+ node.optional = optional;
+ }
+
+ if (optional) {
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ } else {
+ node.arguments = this.parseCallExpressionArguments(types.parenR, state.maybeAsyncArrow, base.type === "Import", base.type !== "Super", node);
+ }
+
+ this.finishCallExpression(node, state.optionalChainMember);
+
+ if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
+ state.stop = true;
+ this.expressionScope.validateAsPattern();
+ this.expressionScope.exit();
+ node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
+ } else {
+ if (state.maybeAsyncArrow) {
+ this.expressionScope.exit();
+ }
+
+ this.toReferencedArguments(node);
+ }
+
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return node;
+ }
+
+ toReferencedArguments(node, isParenthesizedExpr) {
+ this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
+ }
+
+ parseTaggedTemplateExpression(base, startPos, startLoc, state) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.tag = base;
+ node.quasi = this.parseTemplate(true);
+
+ if (state.optionalChainMember) {
+ this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
+ }
+
+ return this.finishNode(node, "TaggedTemplateExpression");
+ }
+
+ atPossibleAsyncArrow(base) {
+ return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt;
+ }
+
+ finishCallExpression(node, optional) {
+ if (node.callee.type === "Import") {
+ if (node.arguments.length === 2) {
+ if (!this.hasPlugin("moduleAttributes")) {
+ this.expectPlugin("importAssertions");
+ }
+ }
+
+ if (node.arguments.length === 0 || node.arguments.length > 2) {
+ this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
+ } else {
+ for (let _i = 0, _node$arguments = node.arguments; _i < _node$arguments.length; _i++) {
+ const arg = _node$arguments[_i];
+
+ if (arg.type === "SpreadElement") {
+ this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
+ }
+ }
+ }
+ }
+
+ return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
+ }
+
+ parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder, nodeForExtra) {
+ const elts = [];
+ let first = true;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma);
+
+ if (this.match(close)) {
+ if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
+ this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
+ }
+
+ if (nodeForExtra) {
+ this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
+ }
+
+ this.next();
+ break;
+ }
+ }
+
+ elts.push(this.parseExprListItem(false, possibleAsyncArrow ? new ExpressionErrors() : undefined, possibleAsyncArrow ? {
+ start: 0
+ } : undefined, allowPlaceholder));
+ }
+
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return elts;
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(types.arrow) && !this.canInsertSemicolon();
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ var _call$extra;
+
+ this.expect(types.arrow);
+ this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
+ return node;
+ }
+
+ parseNoCallExpr() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
+ }
+
+ parseExprAtom(refExpressionErrors) {
+ if (this.state.type === types.slash) this.readRegexp();
+ const canBeArrow = this.state.potentialArrowAt === this.state.start;
+ let node;
+
+ switch (this.state.type) {
+ case types._super:
+ return this.parseSuper();
+
+ case types._import:
+ node = this.startNode();
+ this.next();
+
+ if (this.match(types.dot)) {
+ return this.parseImportMetaProperty(node);
+ }
+
+ if (!this.match(types.parenL)) {
+ this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
+ }
+
+ return this.finishNode(node, "Import");
+
+ case types._this:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression");
+
+ case types.name:
+ {
+ const containsEsc = this.state.containsEsc;
+ const id = this.parseIdentifier();
+
+ if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
+ if (this.match(types._function)) {
+ const last = this.state.context.length - 1;
+
+ if (this.state.context[last] !== types$1.functionStatement) {
+ throw new Error("Internal error");
+ }
+
+ this.state.context[last] = types$1.functionExpression;
+ this.next();
+ return this.parseFunction(this.startNodeAtNode(id), undefined, true);
+ } else if (this.match(types.name)) {
+ return this.parseAsyncArrowUnaryFunction(id);
+ }
+ }
+
+ if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) {
+ this.next();
+ return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
+ }
+
+ return id;
+ }
+
+ case types._do:
+ {
+ return this.parseDo();
+ }
+
+ case types.regexp:
+ {
+ const value = this.state.value;
+ node = this.parseLiteral(value.value, "RegExpLiteral");
+ node.pattern = value.pattern;
+ node.flags = value.flags;
+ return node;
+ }
+
+ case types.num:
+ return this.parseLiteral(this.state.value, "NumericLiteral");
+
+ case types.bigint:
+ return this.parseLiteral(this.state.value, "BigIntLiteral");
+
+ case types.decimal:
+ return this.parseLiteral(this.state.value, "DecimalLiteral");
+
+ case types.string:
+ return this.parseLiteral(this.state.value, "StringLiteral");
+
+ case types._null:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "NullLiteral");
+
+ case types._true:
+ case types._false:
+ return this.parseBooleanLiteral();
+
+ case types.parenL:
+ return this.parseParenAndDistinguishExpression(canBeArrow);
+
+ case types.bracketBarL:
+ case types.bracketHashL:
+ {
+ return this.parseArrayLike(this.state.type === types.bracketBarL ? types.bracketBarR : types.bracketR, false, true, refExpressionErrors);
+ }
+
+ case types.bracketL:
+ {
+ return this.parseArrayLike(types.bracketR, true, false, refExpressionErrors);
+ }
+
+ case types.braceBarL:
+ case types.braceHashL:
+ {
+ return this.parseObjectLike(this.state.type === types.braceBarL ? types.braceBarR : types.braceR, false, true, refExpressionErrors);
+ }
+
+ case types.braceL:
+ {
+ return this.parseObjectLike(types.braceR, false, false, refExpressionErrors);
+ }
+
+ case types._function:
+ return this.parseFunctionOrFunctionSent();
+
+ case types.at:
+ this.parseDecorators();
+
+ case types._class:
+ node = this.startNode();
+ this.takeDecorators(node);
+ return this.parseClass(node, false);
+
+ case types._new:
+ return this.parseNewOrNewTarget();
+
+ case types.backQuote:
+ return this.parseTemplate(false);
+
+ case types.doubleColon:
+ {
+ node = this.startNode();
+ this.next();
+ node.object = null;
+ const callee = node.callee = this.parseNoCallExpr();
+
+ if (callee.type === "MemberExpression") {
+ return this.finishNode(node, "BindExpression");
+ } else {
+ throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
+ }
+ }
+
+ case types.hash:
+ {
+ if (this.state.inPipeline) {
+ node = this.startNode();
+
+ if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
+ this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
+ }
+
+ this.next();
+
+ if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
+ this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
+ }
+
+ this.registerTopicReference();
+ return this.finishNode(node, "PipelinePrimaryTopicReference");
+ }
+
+ const nextCh = this.input.codePointAt(this.state.end);
+
+ if (isIdentifierStart(nextCh) || nextCh === 92) {
+ const start = this.state.start;
+ node = this.parseMaybePrivateName(true);
+
+ if (this.match(types._in)) {
+ this.expectPlugin("privateIn");
+ this.classScope.usePrivateName(node.id.name, node.start);
+ } else if (this.hasPlugin("privateIn")) {
+ this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, node.id.name);
+ } else {
+ throw this.unexpected(start);
+ }
+
+ return node;
+ }
+ }
+
+ case types.relational:
+ {
+ if (this.state.value === "<") {
+ const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
+
+ if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
+ this.expectOnePlugin(["jsx", "flow", "typescript"]);
+ }
+ }
+ }
+
+ default:
+ throw this.unexpected();
+ }
+ }
+
+ parseAsyncArrowUnaryFunction(id) {
+ const node = this.startNodeAtNode(id);
+ this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));
+ const params = [this.parseIdentifier()];
+ this.prodParam.exit();
+
+ if (this.hasPrecedingLineBreak()) {
+ this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
+ }
+
+ this.expect(types.arrow);
+ this.parseArrowExpression(node, params, true);
+ return node;
+ }
+
+ parseDo() {
+ this.expectPlugin("doExpressions");
+ const node = this.startNode();
+ this.next();
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ node.body = this.parseBlock();
+ this.state.labels = oldLabels;
+ return this.finishNode(node, "DoExpression");
+ }
+
+ parseSuper() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
+ this.raise(node.start, ErrorMessages.SuperNotAllowed);
+ } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
+ this.raise(node.start, ErrorMessages.UnexpectedSuper);
+ }
+
+ if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {
+ this.raise(node.start, ErrorMessages.UnsupportedSuper);
+ }
+
+ return this.finishNode(node, "Super");
+ }
+
+ parseBooleanLiteral() {
+ const node = this.startNode();
+ node.value = this.match(types._true);
+ this.next();
+ return this.finishNode(node, "BooleanLiteral");
+ }
+
+ parseMaybePrivateName(isPrivateNameAllowed) {
+ const isPrivate = this.match(types.hash);
+
+ if (isPrivate) {
+ this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]);
+
+ if (!isPrivateNameAllowed) {
+ this.raise(this.state.pos, ErrorMessages.UnexpectedPrivateField);
+ }
+
+ const node = this.startNode();
+ this.next();
+ this.assertNoSpace("Unexpected space between # and identifier");
+ node.id = this.parseIdentifier(true);
+ return this.finishNode(node, "PrivateName");
+ } else {
+ return this.parseIdentifier(true);
+ }
+ }
+
+ parseFunctionOrFunctionSent() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.prodParam.hasYield && this.match(types.dot)) {
+ const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
+ this.next();
+ return this.parseMetaProperty(node, meta, "sent");
+ }
+
+ return this.parseFunction(node);
+ }
+
+ parseMetaProperty(node, meta, propertyName) {
+ node.meta = meta;
+
+ if (meta.name === "function" && propertyName === "sent") {
+ if (this.isContextual(propertyName)) {
+ this.expectPlugin("functionSent");
+ } else if (!this.hasPlugin("functionSent")) {
+ this.unexpected();
+ }
+ }
+
+ const containsEsc = this.state.containsEsc;
+ node.property = this.parseIdentifier(true);
+
+ if (node.property.name !== propertyName || containsEsc) {
+ this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
+ }
+
+ return this.finishNode(node, "MetaProperty");
+ }
+
+ parseImportMetaProperty(node) {
+ const id = this.createIdentifier(this.startNodeAtNode(node), "import");
+ this.next();
+
+ if (this.isContextual("meta")) {
+ if (!this.inModule) {
+ this.raiseWithData(id.start, {
+ code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
+ }, ErrorMessages.ImportMetaOutsideModule);
+ }
+
+ this.sawUnambiguousESM = true;
+ }
+
+ return this.parseMetaProperty(node, id, "meta");
+ }
+
+ parseLiteral(value, type, startPos, startLoc) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+ const node = this.startNodeAt(startPos, startLoc);
+ this.addExtra(node, "rawValue", value);
+ this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
+ node.value = value;
+ this.next();
+ return this.finishNode(node, type);
+ }
+
+ parseParenAndDistinguishExpression(canBeArrow) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let val;
+ this.next();
+ this.expressionScope.enter(newArrowHeadScope());
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.maybeInArrowParameters = true;
+ this.state.inFSharpPipelineDirectBody = false;
+ const innerStartPos = this.state.start;
+ const innerStartLoc = this.state.startLoc;
+ const exprList = [];
+ const refExpressionErrors = new ExpressionErrors();
+ const refNeedsArrowPos = {
+ start: 0
+ };
+ let first = true;
+ let spreadStart;
+ let optionalCommaStart;
+
+ while (!this.match(types.parenR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma, refNeedsArrowPos.start || null);
+
+ if (this.match(types.parenR)) {
+ optionalCommaStart = this.state.start;
+ break;
+ }
+ }
+
+ if (this.match(types.ellipsis)) {
+ const spreadNodeStartPos = this.state.start;
+ const spreadNodeStartLoc = this.state.startLoc;
+ spreadStart = this.state.start;
+ exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
+ this.checkCommaAfterRest(41);
+ break;
+ } else {
+ exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos));
+ }
+ }
+
+ const innerEndPos = this.state.lastTokEnd;
+ const innerEndLoc = this.state.lastTokEndLoc;
+ this.expect(types.parenR);
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ let arrowNode = this.startNodeAt(startPos, startLoc);
+
+ if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
+ this.expressionScope.validateAsPattern();
+ this.expressionScope.exit();
+ this.parseArrowExpression(arrowNode, exprList, false);
+ return arrowNode;
+ }
+
+ this.expressionScope.exit();
+
+ if (!exprList.length) {
+ this.unexpected(this.state.lastTokStart);
+ }
+
+ if (optionalCommaStart) this.unexpected(optionalCommaStart);
+ if (spreadStart) this.unexpected(spreadStart);
+ this.checkExpressionErrors(refExpressionErrors, true);
+ if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);
+ this.toReferencedListDeep(exprList, true);
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc);
+ val.expressions = exprList;
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
+ } else {
+ val = exprList[0];
+ }
+
+ if (!this.options.createParenthesizedExpressions) {
+ this.addExtra(val, "parenthesized", true);
+ this.addExtra(val, "parenStart", startPos);
+ return val;
+ }
+
+ const parenExpression = this.startNodeAt(startPos, startLoc);
+ parenExpression.expression = val;
+ this.finishNode(parenExpression, "ParenthesizedExpression");
+ return parenExpression;
+ }
+
+ shouldParseArrow() {
+ return !this.canInsertSemicolon();
+ }
+
+ parseArrow(node) {
+ if (this.eat(types.arrow)) {
+ return node;
+ }
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ return node;
+ }
+
+ parseNewOrNewTarget() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.match(types.dot)) {
+ const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
+ this.next();
+ const metaProp = this.parseMetaProperty(node, meta, "target");
+
+ if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
+ let error = ErrorMessages.UnexpectedNewTarget;
+
+ if (this.hasPlugin("classProperties")) {
+ error += " or class properties";
+ }
+
+ this.raise(metaProp.start, error);
+ }
+
+ return metaProp;
+ }
+
+ return this.parseNew(node);
+ }
+
+ parseNew(node) {
+ node.callee = this.parseNoCallExpr();
+
+ if (node.callee.type === "Import") {
+ this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
+ } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") {
+ this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
+ } else if (this.eat(types.questionDot)) {
+ this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
+ }
+
+ this.parseNewArguments(node);
+ return this.finishNode(node, "NewExpression");
+ }
+
+ parseNewArguments(node) {
+ if (this.eat(types.parenL)) {
+ const args = this.parseExprList(types.parenR);
+ this.toReferencedList(args);
+ node.arguments = args;
+ } else {
+ node.arguments = [];
+ }
+ }
+
+ parseTemplateElement(isTagged) {
+ const elem = this.startNode();
+
+ if (this.state.value === null) {
+ if (!isTagged) {
+ this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
+ }
+ }
+
+ elem.value = {
+ raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
+ cooked: this.state.value
+ };
+ this.next();
+ elem.tail = this.match(types.backQuote);
+ return this.finishNode(elem, "TemplateElement");
+ }
+
+ parseTemplate(isTagged) {
+ const node = this.startNode();
+ this.next();
+ node.expressions = [];
+ let curElt = this.parseTemplateElement(isTagged);
+ node.quasis = [curElt];
+
+ while (!curElt.tail) {
+ this.expect(types.dollarBraceL);
+ node.expressions.push(this.parseTemplateSubstitution());
+ this.expect(types.braceR);
+ node.quasis.push(curElt = this.parseTemplateElement(isTagged));
+ }
+
+ this.next();
+ return this.finishNode(node, "TemplateLiteral");
+ }
+
+ parseTemplateSubstitution() {
+ return this.parseExpression();
+ }
+
+ parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
+ if (isRecord) {
+ this.expectPlugin("recordAndTuple");
+ }
+
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+ const propHash = Object.create(null);
+ let first = true;
+ const node = this.startNode();
+ node.properties = [];
+ this.next();
+
+ while (!this.match(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma);
+
+ if (this.match(close)) {
+ this.addExtra(node, "trailingComma", this.state.lastTokStart);
+ break;
+ }
+ }
+
+ const prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
+
+ if (!isPattern) {
+ this.checkProto(prop, isRecord, propHash, refExpressionErrors);
+ }
+
+ if (isRecord && prop.type !== "ObjectProperty" && prop.type !== "SpreadElement") {
+ this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
+ }
+
+ if (prop.shorthand) {
+ this.addExtra(prop, "shorthand", true);
+ }
+
+ node.properties.push(prop);
+ }
+
+ this.state.exprAllowed = false;
+ this.next();
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ let type = "ObjectExpression";
+
+ if (isPattern) {
+ type = "ObjectPattern";
+ } else if (isRecord) {
+ type = "RecordExpression";
+ }
+
+ return this.finishNode(node, type);
+ }
+
+ maybeAsyncOrAccessorProp(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types.bracketL) || this.match(types.star));
+ }
+
+ parsePropertyDefinition(isPattern, refExpressionErrors) {
+ let decorators = [];
+
+ if (this.match(types.at)) {
+ if (this.hasPlugin("decorators")) {
+ this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
+ }
+
+ while (this.match(types.at)) {
+ decorators.push(this.parseDecorator());
+ }
+ }
+
+ const prop = this.startNode();
+ let isGenerator = false;
+ let isAsync = false;
+ let isAccessor = false;
+ let startPos;
+ let startLoc;
+
+ if (this.match(types.ellipsis)) {
+ if (decorators.length) this.unexpected();
+
+ if (isPattern) {
+ this.next();
+ prop.argument = this.parseIdentifier();
+ this.checkCommaAfterRest(125);
+ return this.finishNode(prop, "RestElement");
+ }
+
+ return this.parseSpread();
+ }
+
+ if (decorators.length) {
+ prop.decorators = decorators;
+ decorators = [];
+ }
+
+ prop.method = false;
+
+ if (isPattern || refExpressionErrors) {
+ startPos = this.state.start;
+ startLoc = this.state.startLoc;
+ }
+
+ if (!isPattern) {
+ isGenerator = this.eat(types.star);
+ }
+
+ const containsEsc = this.state.containsEsc;
+ const key = this.parsePropertyName(prop, false);
+
+ if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
+ const keyName = key.name;
+
+ if (keyName === "async" && !this.hasPrecedingLineBreak()) {
+ isAsync = true;
+ isGenerator = this.eat(types.star);
+ this.parsePropertyName(prop, false);
+ }
+
+ if (keyName === "get" || keyName === "set") {
+ isAccessor = true;
+ prop.kind = keyName;
+
+ if (this.match(types.star)) {
+ isGenerator = true;
+ this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
+ this.next();
+ }
+
+ this.parsePropertyName(prop, false);
+ }
+ }
+
+ this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
+ return prop;
+ }
+
+ getGetterSetterExpectedParamCount(method) {
+ return method.kind === "get" ? 0 : 1;
+ }
+
+ getObjectOrClassMethodParams(method) {
+ return method.params;
+ }
+
+ checkGetterSetterParams(method) {
+ var _params;
+
+ const paramCount = this.getGetterSetterExpectedParamCount(method);
+ const params = this.getObjectOrClassMethodParams(method);
+ const start = method.start;
+
+ if (params.length !== paramCount) {
+ if (method.kind === "get") {
+ this.raise(start, ErrorMessages.BadGetterArity);
+ } else {
+ this.raise(start, ErrorMessages.BadSetterArity);
+ }
+ }
+
+ if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
+ this.raise(start, ErrorMessages.BadSetterRestParameter);
+ }
+ }
+
+ parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
+ if (isAccessor) {
+ this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
+ this.checkGetterSetterParams(prop);
+ return prop;
+ }
+
+ if (isAsync || isGenerator || this.match(types.parenL)) {
+ if (isPattern) this.unexpected();
+ prop.kind = "method";
+ prop.method = true;
+ return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
+ }
+ }
+
+ parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
+ prop.shorthand = false;
+
+ if (this.eat(types.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
+ return this.finishNode(prop, "ObjectProperty");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier") {
+ this.checkReservedWord(prop.key.name, prop.key.start, true, false);
+
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
+ } else if (this.match(types.eq) && refExpressionErrors) {
+ if (refExpressionErrors.shorthandAssign === -1) {
+ refExpressionErrors.shorthandAssign = this.state.start;
+ }
+
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
+ } else {
+ prop.value = prop.key.__clone();
+ }
+
+ prop.shorthand = true;
+ return this.finishNode(prop, "ObjectProperty");
+ }
+ }
+
+ parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
+ const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
+ if (!node) this.unexpected();
+ return node;
+ }
+
+ parsePropertyName(prop, isPrivateNameAllowed) {
+ if (this.eat(types.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssignAllowIn();
+ this.expect(types.bracketR);
+ } else {
+ const oldInPropertyName = this.state.inPropertyName;
+ this.state.inPropertyName = true;
+ prop.key = this.match(types.num) || this.match(types.string) || this.match(types.bigint) || this.match(types.decimal) ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
+
+ if (prop.key.type !== "PrivateName") {
+ prop.computed = false;
+ }
+
+ this.state.inPropertyName = oldInPropertyName;
+ }
+
+ return prop.key;
+ }
+
+ initFunction(node, isAsync) {
+ node.id = null;
+ node.generator = false;
+ node.async = !!isAsync;
+ }
+
+ parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
+ this.initFunction(node, isAsync);
+ node.generator = !!isGenerator;
+ const allowModifiers = isConstructor;
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
+ this.prodParam.enter(functionFlags(isAsync, node.generator));
+ this.parseFunctionParams(node, allowModifiers);
+ this.parseFunctionBodyAndFinish(node, type, true);
+ this.prodParam.exit();
+ this.scope.exit();
+ return node;
+ }
+
+ parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
+ if (isTuple) {
+ this.expectPlugin("recordAndTuple");
+ }
+
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+ const node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
+ }
+
+ parseArrowExpression(node, params, isAsync, trailingCommaPos) {
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
+ let flags = functionFlags(isAsync, false);
+
+ if (!this.match(types.bracketL) && this.prodParam.hasIn) {
+ flags |= PARAM_IN;
+ }
+
+ this.prodParam.enter(flags);
+ this.initFunction(node, isAsync);
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+
+ if (params) {
+ this.state.maybeInArrowParameters = true;
+ this.setArrowFunctionParameters(node, params, trailingCommaPos);
+ }
+
+ this.state.maybeInArrowParameters = false;
+ this.parseFunctionBody(node, true);
+ this.prodParam.exit();
+ this.scope.exit();
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return this.finishNode(node, "ArrowFunctionExpression");
+ }
+
+ setArrowFunctionParameters(node, params, trailingCommaPos) {
+ node.params = this.toAssignableList(params, trailingCommaPos, false);
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ this.parseFunctionBody(node, false, isMethod);
+ this.finishNode(node, type);
+ }
+
+ parseFunctionBody(node, allowExpression, isMethod = false) {
+ const isExpression = allowExpression && !this.match(types.braceL);
+ this.expressionScope.enter(newExpressionScope());
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ this.checkParams(node, false, allowExpression, false);
+ } else {
+ const oldStrict = this.state.strict;
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
+ node.body = this.parseBlock(true, false, hasStrictModeDirective => {
+ const nonSimple = !this.isSimpleParamList(node.params);
+
+ if (hasStrictModeDirective && nonSimple) {
+ const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
+ this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
+ }
+
+ const strictModeChanged = !oldStrict && this.state.strict;
+ this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
+
+ if (this.state.strict && node.id) {
+ this.checkLVal(node.id, "function name", BIND_OUTSIDE, undefined, undefined, strictModeChanged);
+ }
+ });
+ this.prodParam.exit();
+ this.expressionScope.exit();
+ this.state.labels = oldLabels;
+ }
+ }
+
+ isSimpleParamList(params) {
+ for (let i = 0, len = params.length; i < len; i++) {
+ if (params[i].type !== "Identifier") return false;
+ }
+
+ return true;
+ }
+
+ checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
+ const checkClashes = new Set();
+
+ for (let _i2 = 0, _node$params = node.params; _i2 < _node$params.length; _i2++) {
+ const param = _node$params[_i2];
+ this.checkLVal(param, "function parameter list", BIND_VAR, allowDuplicates ? null : checkClashes, undefined, strictModeChanged);
+ }
+ }
+
+ parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
+ const elts = [];
+ let first = true;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma);
+
+ if (this.match(close)) {
+ if (nodeForExtra) {
+ this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
+ }
+
+ this.next();
+ break;
+ }
+ }
+
+ elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
+ }
+
+ return elts;
+ }
+
+ parseExprListItem(allowEmpty, refExpressionErrors, refNeedsArrowPos, allowPlaceholder) {
+ let elt;
+
+ if (this.match(types.comma)) {
+ if (!allowEmpty) {
+ this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
+ }
+
+ elt = null;
+ } else if (this.match(types.ellipsis)) {
+ const spreadNodeStartPos = this.state.start;
+ const spreadNodeStartLoc = this.state.startLoc;
+ elt = this.parseParenItem(this.parseSpread(refExpressionErrors, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
+ } else if (this.match(types.question)) {
+ this.expectPlugin("partialApplication");
+
+ if (!allowPlaceholder) {
+ this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
+ }
+
+ const node = this.startNode();
+ this.next();
+ elt = this.finishNode(node, "ArgumentPlaceholder");
+ } else {
+ elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem, refNeedsArrowPos);
+ }
+
+ return elt;
+ }
+
+ parseIdentifier(liberal) {
+ const node = this.startNode();
+ const name = this.parseIdentifierName(node.start, liberal);
+ return this.createIdentifier(node, name);
+ }
+
+ createIdentifier(node, name) {
+ node.name = name;
+ node.loc.identifierName = name;
+ return this.finishNode(node, "Identifier");
+ }
+
+ parseIdentifierName(pos, liberal) {
+ let name;
+ const {
+ start,
+ type
+ } = this.state;
+
+ if (type === types.name) {
+ name = this.state.value;
+ } else if (type.keyword) {
+ name = type.keyword;
+ const curContext = this.curContext();
+
+ if ((type === types._class || type === types._function) && (curContext === types$1.functionStatement || curContext === types$1.functionExpression)) {
+ this.state.context.pop();
+ }
+ } else {
+ throw this.unexpected();
+ }
+
+ if (liberal) {
+ this.state.type = types.name;
+ } else {
+ this.checkReservedWord(name, start, !!type.keyword, false);
+ }
+
+ this.next();
+ return name;
+ }
+
+ checkReservedWord(word, startLoc, checkKeywords, isBinding) {
+ if (this.prodParam.hasYield && word === "yield") {
+ this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
+ return;
+ }
+
+ if (word === "await") {
+ if (this.prodParam.hasAwait) {
+ this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
+ return;
+ } else {
+ this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
+ }
+ }
+
+ if (this.scope.inClass && !this.scope.inNonArrowFunction && word === "arguments") {
+ this.raise(startLoc, ErrorMessages.ArgumentsInClass);
+ return;
+ }
+
+ if (checkKeywords && isKeyword(word)) {
+ this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
+ return;
+ }
+
+ const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
+
+ if (reservedTest(word, this.inModule)) {
+ if (!this.prodParam.hasAwait && word === "await") {
+ this.raise(startLoc, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
+ } else {
+ this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
+ }
+ }
+ }
+
+ isAwaitAllowed() {
+ if (this.scope.inFunction) return this.prodParam.hasAwait;
+ if (this.options.allowAwaitOutsideFunction) return true;
+
+ if (this.hasPlugin("topLevelAwait")) {
+ return this.inModule && this.prodParam.hasAwait;
+ }
+
+ return false;
+ }
+
+ parseAwait() {
+ const node = this.startNode();
+ this.next();
+ this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
+
+ if (this.eat(types.star)) {
+ this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
+ }
+
+ if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
+ if (this.hasPrecedingLineBreak() || this.match(types.plusMin) || this.match(types.parenL) || this.match(types.bracketL) || this.match(types.backQuote) || this.match(types.regexp) || this.match(types.slash) || this.hasPlugin("v8intrinsic") && this.match(types.modulo)) {
+ this.ambiguousScriptDifferentAst = true;
+ } else {
+ this.sawUnambiguousESM = true;
+ }
+ }
+
+ if (!this.state.soloAwait) {
+ node.argument = this.parseMaybeUnary();
+ }
+
+ return this.finishNode(node, "AwaitExpression");
+ }
+
+ parseYield() {
+ const node = this.startNode();
+ this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
+ this.next();
+
+ if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.hasPrecedingLineBreak()) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(types.star);
+ node.argument = this.parseMaybeAssign();
+ }
+
+ return this.finishNode(node, "YieldExpression");
+ }
+
+ checkPipelineAtInfixOperator(left, leftStartPos) {
+ if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
+ if (left.type === "SequenceExpression") {
+ this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
+ }
+ }
+ }
+
+ parseSmartPipelineBody(childExpression, startPos, startLoc) {
+ this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
+ return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
+ }
+
+ checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
+ if (this.match(types.arrow)) {
+ throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
+ } else if (childExpression.type === "SequenceExpression") {
+ this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
+ }
+ }
+
+ parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
+ const bodyNode = this.startNodeAt(startPos, startLoc);
+ const isSimpleReference = this.isSimpleReference(childExpression);
+
+ if (isSimpleReference) {
+ bodyNode.callee = childExpression;
+ } else {
+ if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
+ this.raise(startPos, ErrorMessages.PipelineTopicUnused);
+ }
+
+ bodyNode.expression = childExpression;
+ }
+
+ return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
+ }
+
+ isSimpleReference(expression) {
+ switch (expression.type) {
+ case "MemberExpression":
+ return !expression.computed && this.isSimpleReference(expression.object);
+
+ case "Identifier":
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ withTopicPermittingContext(callback) {
+ const outerContextTopicState = this.state.topicContext;
+ this.state.topicContext = {
+ maxNumOfResolvableTopics: 1,
+ maxTopicIndex: null
+ };
+
+ try {
+ return callback();
+ } finally {
+ this.state.topicContext = outerContextTopicState;
+ }
+ }
+
+ withTopicForbiddingContext(callback) {
+ const outerContextTopicState = this.state.topicContext;
+ this.state.topicContext = {
+ maxNumOfResolvableTopics: 0,
+ maxTopicIndex: null
+ };
+
+ try {
+ return callback();
+ } finally {
+ this.state.topicContext = outerContextTopicState;
+ }
+ }
+
+ withSoloAwaitPermittingContext(callback) {
+ const outerContextSoloAwaitState = this.state.soloAwait;
+ this.state.soloAwait = true;
+
+ try {
+ return callback();
+ } finally {
+ this.state.soloAwait = outerContextSoloAwaitState;
+ }
+ }
+
+ allowInAnd(callback) {
+ const flags = this.prodParam.currentFlags();
+ const prodParamToSet = PARAM_IN & ~flags;
+
+ if (prodParamToSet) {
+ this.prodParam.enter(flags | PARAM_IN);
+
+ try {
+ return callback();
+ } finally {
+ this.prodParam.exit();
+ }
+ }
+
+ return callback();
+ }
+
+ disallowInAnd(callback) {
+ const flags = this.prodParam.currentFlags();
+ const prodParamToClear = PARAM_IN & flags;
+
+ if (prodParamToClear) {
+ this.prodParam.enter(flags & ~PARAM_IN);
+
+ try {
+ return callback();
+ } finally {
+ this.prodParam.exit();
+ }
+ }
+
+ return callback();
+ }
+
+ registerTopicReference() {
+ this.state.topicContext.maxTopicIndex = 0;
+ }
+
+ primaryTopicReferenceIsAllowedInCurrentTopicContext() {
+ return this.state.topicContext.maxNumOfResolvableTopics >= 1;
+ }
+
+ topicReferenceWasUsedInCurrentTopicContext() {
+ return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
+ }
+
+ parseFSharpPipelineBody(prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ this.state.potentialArrowAt = this.state.start;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = true;
+ const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return ret;
+ }
+
+}
+
+const loopLabel = {
+ kind: "loop"
+},
+ switchLabel = {
+ kind: "switch"
+};
+const FUNC_NO_FLAGS = 0b000,
+ FUNC_STATEMENT = 0b001,
+ FUNC_HANGING_STATEMENT = 0b010,
+ FUNC_NULLABLE_ID = 0b100;
+const loneSurrogate = /[\uD800-\uDFFF]/u;
+class StatementParser extends ExpressionParser {
+ parseTopLevel(file, program) {
+ program.sourceType = this.options.sourceType;
+ program.interpreter = this.parseInterpreterDirective();
+ this.parseBlockBody(program, true, true, types.eof);
+
+ if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
+ for (let _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) {
+ const [name] = _Array$from[_i];
+ const pos = this.scope.undefinedExports.get(name);
+ this.raise(pos, ErrorMessages.ModuleExportUndefined, name);
+ }
+ }
+
+ file.program = this.finishNode(program, "Program");
+ file.comments = this.state.comments;
+ if (this.options.tokens) file.tokens = this.tokens;
+ return this.finishNode(file, "File");
+ }
+
+ stmtToDirective(stmt) {
+ const expr = stmt.expression;
+ const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
+ const directive = this.startNodeAt(stmt.start, stmt.loc.start);
+ const raw = this.input.slice(expr.start, expr.end);
+ const val = directiveLiteral.value = raw.slice(1, -1);
+ this.addExtra(directiveLiteral, "raw", raw);
+ this.addExtra(directiveLiteral, "rawValue", val);
+ directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
+ return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
+ }
+
+ parseInterpreterDirective() {
+ if (!this.match(types.interpreterDirective)) {
+ return null;
+ }
+
+ const node = this.startNode();
+ node.value = this.state.value;
+ this.next();
+ return this.finishNode(node, "InterpreterDirective");
+ }
+
+ isLet(context) {
+ if (!this.isContextual("let")) {
+ return false;
+ }
+
+ const next = this.nextTokenStart();
+ const nextCh = this.input.charCodeAt(next);
+ if (nextCh === 91) return true;
+ if (context) return false;
+ if (nextCh === 123) return true;
+
+ if (isIdentifierStart(nextCh)) {
+ let pos = next + 1;
+
+ while (isIdentifierChar(this.input.charCodeAt(pos))) {
+ ++pos;
+ }
+
+ const ident = this.input.slice(next, pos);
+ if (!keywordRelationalOperator.test(ident)) return true;
+ }
+
+ return false;
+ }
+
+ parseStatement(context, topLevel) {
+ if (this.match(types.at)) {
+ this.parseDecorators(true);
+ }
+
+ return this.parseStatementContent(context, topLevel);
+ }
+
+ parseStatementContent(context, topLevel) {
+ let starttype = this.state.type;
+ const node = this.startNode();
+ let kind;
+
+ if (this.isLet(context)) {
+ starttype = types._var;
+ kind = "let";
+ }
+
+ switch (starttype) {
+ case types._break:
+ case types._continue:
+ return this.parseBreakContinueStatement(node, starttype.keyword);
+
+ case types._debugger:
+ return this.parseDebuggerStatement(node);
+
+ case types._do:
+ return this.parseDoStatement(node);
+
+ case types._for:
+ return this.parseForStatement(node);
+
+ case types._function:
+ if (this.lookaheadCharCode() === 46) break;
+
+ if (context) {
+ if (this.state.strict) {
+ this.raise(this.state.start, ErrorMessages.StrictFunction);
+ } else if (context !== "if" && context !== "label") {
+ this.raise(this.state.start, ErrorMessages.SloppyFunction);
+ }
+ }
+
+ return this.parseFunctionStatement(node, false, !context);
+
+ case types._class:
+ if (context) this.unexpected();
+ return this.parseClass(node, true);
+
+ case types._if:
+ return this.parseIfStatement(node);
+
+ case types._return:
+ return this.parseReturnStatement(node);
+
+ case types._switch:
+ return this.parseSwitchStatement(node);
+
+ case types._throw:
+ return this.parseThrowStatement(node);
+
+ case types._try:
+ return this.parseTryStatement(node);
+
+ case types._const:
+ case types._var:
+ kind = kind || this.state.value;
+
+ if (context && kind !== "var") {
+ this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
+ }
+
+ return this.parseVarStatement(node, kind);
+
+ case types._while:
+ return this.parseWhileStatement(node);
+
+ case types._with:
+ return this.parseWithStatement(node);
+
+ case types.braceL:
+ return this.parseBlock();
+
+ case types.semi:
+ return this.parseEmptyStatement(node);
+
+ case types._import:
+ {
+ const nextTokenCharCode = this.lookaheadCharCode();
+
+ if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
+ break;
+ }
+ }
+
+ case types._export:
+ {
+ if (!this.options.allowImportExportEverywhere && !topLevel) {
+ this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
+ }
+
+ this.next();
+ let result;
+
+ if (starttype === types._import) {
+ result = this.parseImport(node);
+
+ if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
+ this.sawUnambiguousESM = true;
+ }
+ } else {
+ result = this.parseExport(node);
+
+ if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
+ this.sawUnambiguousESM = true;
+ }
+ }
+
+ this.assertModuleNodeAllowed(node);
+ return result;
+ }
+
+ default:
+ {
+ if (this.isAsyncFunction()) {
+ if (context) {
+ this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
+ }
+
+ this.next();
+ return this.parseFunctionStatement(node, true, !context);
+ }
+ }
+ }
+
+ const maybeName = this.state.value;
+ const expr = this.parseExpression();
+
+ if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
+ return this.parseLabeledStatement(node, maybeName, expr, context);
+ } else {
+ return this.parseExpressionStatement(node, expr);
+ }
+ }
+
+ assertModuleNodeAllowed(node) {
+ if (!this.options.allowImportExportEverywhere && !this.inModule) {
+ this.raiseWithData(node.start, {
+ code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
+ }, ErrorMessages.ImportOutsideModule);
+ }
+ }
+
+ takeDecorators(node) {
+ const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ if (decorators.length) {
+ node.decorators = decorators;
+ this.resetStartLocationFromNode(node, decorators[0]);
+ this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
+ }
+ }
+
+ canHaveLeadingDecorator() {
+ return this.match(types._class);
+ }
+
+ parseDecorators(allowExport) {
+ const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ while (this.match(types.at)) {
+ const decorator = this.parseDecorator();
+ currentContextDecorators.push(decorator);
+ }
+
+ if (this.match(types._export)) {
+ if (!allowExport) {
+ this.unexpected();
+ }
+
+ if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
+ }
+ } else if (!this.canHaveLeadingDecorator()) {
+ throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
+ }
+ }
+
+ parseDecorator() {
+ this.expectOnePlugin(["decorators-legacy", "decorators"]);
+ const node = this.startNode();
+ this.next();
+
+ if (this.hasPlugin("decorators")) {
+ this.state.decoratorStack.push([]);
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let expr;
+
+ if (this.eat(types.parenL)) {
+ expr = this.parseExpression();
+ this.expect(types.parenR);
+ } else {
+ expr = this.parseIdentifier(false);
+
+ while (this.eat(types.dot)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.object = expr;
+ node.property = this.parseIdentifier(true);
+ node.computed = false;
+ expr = this.finishNode(node, "MemberExpression");
+ }
+ }
+
+ node.expression = this.parseMaybeDecoratorArguments(expr);
+ this.state.decoratorStack.pop();
+ } else {
+ node.expression = this.parseExprSubscripts();
+ }
+
+ return this.finishNode(node, "Decorator");
+ }
+
+ parseMaybeDecoratorArguments(expr) {
+ if (this.eat(types.parenL)) {
+ const node = this.startNodeAtNode(expr);
+ node.callee = expr;
+ node.arguments = this.parseCallExpressionArguments(types.parenR, false);
+ this.toReferencedList(node.arguments);
+ return this.finishNode(node, "CallExpression");
+ }
+
+ return expr;
+ }
+
+ parseBreakContinueStatement(node, keyword) {
+ const isBreak = keyword === "break";
+ this.next();
+
+ if (this.isLineTerminator()) {
+ node.label = null;
+ } else {
+ node.label = this.parseIdentifier();
+ this.semicolon();
+ }
+
+ this.verifyBreakContinue(node, keyword);
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
+ }
+
+ verifyBreakContinue(node, keyword) {
+ const isBreak = keyword === "break";
+ let i;
+
+ for (i = 0; i < this.state.labels.length; ++i) {
+ const lab = this.state.labels[i];
+
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
+ if (node.label && isBreak) break;
+ }
+ }
+
+ if (i === this.state.labels.length) {
+ this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
+ }
+ }
+
+ parseDebuggerStatement(node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement");
+ }
+
+ parseHeaderExpression() {
+ this.expect(types.parenL);
+ const val = this.parseExpression();
+ this.expect(types.parenR);
+ return val;
+ }
+
+ parseDoStatement(node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
+ this.state.labels.pop();
+ this.expect(types._while);
+ node.test = this.parseHeaderExpression();
+ this.eat(types.semi);
+ return this.finishNode(node, "DoWhileStatement");
+ }
+
+ parseForStatement(node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ let awaitAt = -1;
+
+ if (this.isAwaitAllowed() && this.eatContextual("await")) {
+ awaitAt = this.state.lastTokStart;
+ }
+
+ this.scope.enter(SCOPE_OTHER);
+ this.expect(types.parenL);
+
+ if (this.match(types.semi)) {
+ if (awaitAt > -1) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, null);
+ }
+
+ const isLet = this.isLet();
+
+ if (this.match(types._var) || this.match(types._const) || isLet) {
+ const init = this.startNode();
+ const kind = isLet ? "let" : this.state.value;
+ this.next();
+ this.parseVar(init, true, kind);
+ this.finishNode(init, "VariableDeclaration");
+
+ if ((this.match(types._in) || this.isContextual("of")) && init.declarations.length === 1) {
+ return this.parseForIn(node, init, awaitAt);
+ }
+
+ if (awaitAt > -1) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, init);
+ }
+
+ const refExpressionErrors = new ExpressionErrors();
+ const init = this.parseExpression(true, refExpressionErrors);
+
+ if (this.match(types._in) || this.isContextual("of")) {
+ this.toAssignable(init, true);
+ const description = this.isContextual("of") ? "for-of statement" : "for-in statement";
+ this.checkLVal(init, description);
+ return this.parseForIn(node, init, awaitAt);
+ } else {
+ this.checkExpressionErrors(refExpressionErrors, true);
+ }
+
+ if (awaitAt > -1) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, init);
+ }
+
+ parseFunctionStatement(node, isAsync, declarationPosition) {
+ this.next();
+ return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync);
+ }
+
+ parseIfStatement(node) {
+ this.next();
+ node.test = this.parseHeaderExpression();
+ node.consequent = this.parseStatement("if");
+ node.alternate = this.eat(types._else) ? this.parseStatement("if") : null;
+ return this.finishNode(node, "IfStatement");
+ }
+
+ parseReturnStatement(node) {
+ if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
+ this.raise(this.state.start, ErrorMessages.IllegalReturn);
+ }
+
+ this.next();
+
+ if (this.isLineTerminator()) {
+ node.argument = null;
+ } else {
+ node.argument = this.parseExpression();
+ this.semicolon();
+ }
+
+ return this.finishNode(node, "ReturnStatement");
+ }
+
+ parseSwitchStatement(node) {
+ this.next();
+ node.discriminant = this.parseHeaderExpression();
+ const cases = node.cases = [];
+ this.expect(types.braceL);
+ this.state.labels.push(switchLabel);
+ this.scope.enter(SCOPE_OTHER);
+ let cur;
+
+ for (let sawDefault; !this.match(types.braceR);) {
+ if (this.match(types._case) || this.match(types._default)) {
+ const isCase = this.match(types._case);
+ if (cur) this.finishNode(cur, "SwitchCase");
+ cases.push(cur = this.startNode());
+ cur.consequent = [];
+ this.next();
+
+ if (isCase) {
+ cur.test = this.parseExpression();
+ } else {
+ if (sawDefault) {
+ this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
+ }
+
+ sawDefault = true;
+ cur.test = null;
+ }
+
+ this.expect(types.colon);
+ } else {
+ if (cur) {
+ cur.consequent.push(this.parseStatement(null));
+ } else {
+ this.unexpected();
+ }
+ }
+ }
+
+ this.scope.exit();
+ if (cur) this.finishNode(cur, "SwitchCase");
+ this.next();
+ this.state.labels.pop();
+ return this.finishNode(node, "SwitchStatement");
+ }
+
+ parseThrowStatement(node) {
+ this.next();
+
+ if (this.hasPrecedingLineBreak()) {
+ this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
+ }
+
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement");
+ }
+
+ parseCatchClauseParam() {
+ const param = this.parseBindingAtom();
+ const simple = param.type === "Identifier";
+ this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);
+ this.checkLVal(param, "catch clause", BIND_LEXICAL);
+ return param;
+ }
+
+ parseTryStatement(node) {
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+
+ if (this.match(types._catch)) {
+ const clause = this.startNode();
+ this.next();
+
+ if (this.match(types.parenL)) {
+ this.expect(types.parenL);
+ clause.param = this.parseCatchClauseParam();
+ this.expect(types.parenR);
+ } else {
+ clause.param = null;
+ this.scope.enter(SCOPE_OTHER);
+ }
+
+ clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
+ this.scope.exit();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+
+ node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
+
+ if (!node.handler && !node.finalizer) {
+ this.raise(node.start, ErrorMessages.NoCatchOrFinally);
+ }
+
+ return this.finishNode(node, "TryStatement");
+ }
+
+ parseVarStatement(node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration");
+ }
+
+ parseWhileStatement(node) {
+ this.next();
+ node.test = this.parseHeaderExpression();
+ this.state.labels.push(loopLabel);
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
+ this.state.labels.pop();
+ return this.finishNode(node, "WhileStatement");
+ }
+
+ parseWithStatement(node) {
+ if (this.state.strict) {
+ this.raise(this.state.start, ErrorMessages.StrictWith);
+ }
+
+ this.next();
+ node.object = this.parseHeaderExpression();
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
+ return this.finishNode(node, "WithStatement");
+ }
+
+ parseEmptyStatement(node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement");
+ }
+
+ parseLabeledStatement(node, maybeName, expr, context) {
+ for (let _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) {
+ const label = _this$state$labels[_i2];
+
+ if (label.name === maybeName) {
+ this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
+ }
+ }
+
+ const kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
+
+ for (let i = this.state.labels.length - 1; i >= 0; i--) {
+ const label = this.state.labels[i];
+
+ if (label.statementStart === node.start) {
+ label.statementStart = this.state.start;
+ label.kind = kind;
+ } else {
+ break;
+ }
+ }
+
+ this.state.labels.push({
+ name: maybeName,
+ kind: kind,
+ statementStart: this.state.start
+ });
+ node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
+ this.state.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement");
+ }
+
+ parseExpressionStatement(node, expr) {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement");
+ }
+
+ parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
+ const node = this.startNode();
+ this.expect(types.braceL);
+
+ if (createNewLexicalScope) {
+ this.scope.enter(SCOPE_OTHER);
+ }
+
+ this.parseBlockBody(node, allowDirectives, false, types.braceR, afterBlockParse);
+
+ if (createNewLexicalScope) {
+ this.scope.exit();
+ }
+
+ return this.finishNode(node, "BlockStatement");
+ }
+
+ isValidDirective(stmt) {
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
+ }
+
+ parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
+ const body = node.body = [];
+ const directives = node.directives = [];
+ this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse);
+ }
+
+ parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
+ const octalPositions = [];
+ const oldStrict = this.state.strict;
+ let hasStrictModeDirective = false;
+ let parsedNonDirective = false;
+
+ while (!this.match(end)) {
+ if (!parsedNonDirective && this.state.octalPositions.length) {
+ octalPositions.push(...this.state.octalPositions);
+ }
+
+ const stmt = this.parseStatement(null, topLevel);
+
+ if (directives && !parsedNonDirective && this.isValidDirective(stmt)) {
+ const directive = this.stmtToDirective(stmt);
+ directives.push(directive);
+
+ if (!hasStrictModeDirective && directive.value.value === "use strict") {
+ hasStrictModeDirective = true;
+ this.setStrict(true);
+ }
+
+ continue;
+ }
+
+ parsedNonDirective = true;
+ body.push(stmt);
+ }
+
+ if (this.state.strict && octalPositions.length) {
+ for (let _i3 = 0; _i3 < octalPositions.length; _i3++) {
+ const pos = octalPositions[_i3];
+ this.raise(pos, ErrorMessages.StrictOctalLiteral);
+ }
+ }
+
+ if (afterBlockParse) {
+ afterBlockParse.call(this, hasStrictModeDirective);
+ }
+
+ if (!oldStrict) {
+ this.setStrict(false);
+ }
+
+ this.next();
+ }
+
+ parseFor(node, init) {
+ node.init = init;
+ this.expect(types.semi);
+ node.test = this.match(types.semi) ? null : this.parseExpression();
+ this.expect(types.semi);
+ node.update = this.match(types.parenR) ? null : this.parseExpression();
+ this.expect(types.parenR);
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
+ this.scope.exit();
+ this.state.labels.pop();
+ return this.finishNode(node, "ForStatement");
+ }
+
+ parseForIn(node, init, awaitAt) {
+ const isForIn = this.match(types._in);
+ this.next();
+
+ if (isForIn) {
+ if (awaitAt > -1) this.unexpected(awaitAt);
+ } else {
+ node.await = awaitAt > -1;
+ }
+
+ if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
+ this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
+ } else if (init.type === "AssignmentPattern") {
+ this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
+ }
+
+ node.left = init;
+ node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
+ this.expect(types.parenR);
+ node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
+ this.scope.exit();
+ this.state.labels.pop();
+ return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
+ }
+
+ parseVar(node, isFor, kind) {
+ const declarations = node.declarations = [];
+ const isTypescript = this.hasPlugin("typescript");
+ node.kind = kind;
+
+ for (;;) {
+ const decl = this.startNode();
+ this.parseVarId(decl, kind);
+
+ if (this.eat(types.eq)) {
+ decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
+ } else {
+ if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) {
+ if (!isTypescript) {
+ this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
+ }
+ } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) {
+ this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
+ }
+
+ decl.init = null;
+ }
+
+ declarations.push(this.finishNode(decl, "VariableDeclarator"));
+ if (!this.eat(types.comma)) break;
+ }
+
+ return node;
+ }
+
+ parseVarId(decl, kind) {
+ decl.id = this.parseBindingAtom();
+ this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, kind !== "var");
+ }
+
+ parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
+ const isStatement = statement & FUNC_STATEMENT;
+ const isHangingStatement = statement & FUNC_HANGING_STATEMENT;
+ const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);
+ this.initFunction(node, isAsync);
+
+ if (this.match(types.star) && isHangingStatement) {
+ this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
+ }
+
+ node.generator = this.eat(types.star);
+
+ if (isStatement) {
+ node.id = this.parseFunctionId(requireId);
+ }
+
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ this.state.maybeInArrowParameters = false;
+ this.scope.enter(SCOPE_FUNCTION);
+ this.prodParam.enter(functionFlags(isAsync, node.generator));
+
+ if (!isStatement) {
+ node.id = this.parseFunctionId();
+ }
+
+ this.parseFunctionParams(node, false);
+ this.withTopicForbiddingContext(() => {
+ this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
+ });
+ this.prodParam.exit();
+ this.scope.exit();
+
+ if (isStatement && !isHangingStatement) {
+ this.registerFunctionStatementId(node);
+ }
+
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return node;
+ }
+
+ parseFunctionId(requireId) {
+ return requireId || this.match(types.name) ? this.parseIdentifier() : null;
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ this.expect(types.parenL);
+ this.expressionScope.enter(newParameterDeclarationScope());
+ node.params = this.parseBindingList(types.parenR, 41, false, allowModifiers);
+ this.expressionScope.exit();
+ }
+
+ registerFunctionStatementId(node) {
+ if (!node.id) return;
+ this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, node.id.start);
+ }
+
+ parseClass(node, isStatement, optionalId) {
+ this.next();
+ this.takeDecorators(node);
+ const oldStrict = this.state.strict;
+ this.state.strict = true;
+ this.parseClassId(node, isStatement, optionalId);
+ this.parseClassSuper(node);
+ node.body = this.parseClassBody(!!node.superClass, oldStrict);
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
+ }
+
+ isClassProperty() {
+ return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
+ }
+
+ isClassMethod() {
+ return this.match(types.parenL);
+ }
+
+ isNonstaticConstructor(method) {
+ return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
+ }
+
+ parseClassBody(constructorAllowsSuper, oldStrict) {
+ this.classScope.enter();
+ const state = {
+ constructorAllowsSuper,
+ hadConstructor: false,
+ hadStaticBlock: false
+ };
+ let decorators = [];
+ const classBody = this.startNode();
+ classBody.body = [];
+ this.expect(types.braceL);
+ this.withTopicForbiddingContext(() => {
+ while (!this.match(types.braceR)) {
+ if (this.eat(types.semi)) {
+ if (decorators.length > 0) {
+ throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
+ }
+
+ continue;
+ }
+
+ if (this.match(types.at)) {
+ decorators.push(this.parseDecorator());
+ continue;
+ }
+
+ const member = this.startNode();
+
+ if (decorators.length) {
+ member.decorators = decorators;
+ this.resetStartLocationFromNode(member, decorators[0]);
+ decorators = [];
+ }
+
+ this.parseClassMember(classBody, member, state);
+
+ if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
+ this.raise(member.start, ErrorMessages.DecoratorConstructor);
+ }
+ }
+ });
+ this.state.strict = oldStrict;
+ this.next();
+
+ if (decorators.length) {
+ throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
+ }
+
+ this.classScope.exit();
+ return this.finishNode(classBody, "ClassBody");
+ }
+
+ parseClassMemberFromModifier(classBody, member) {
+ const key = this.parseIdentifier(true);
+
+ if (this.isClassMethod()) {
+ const method = member;
+ method.kind = "method";
+ method.computed = false;
+ method.key = key;
+ method.static = false;
+ this.pushClassMethod(classBody, method, false, false, false, false);
+ return true;
+ } else if (this.isClassProperty()) {
+ const prop = member;
+ prop.computed = false;
+ prop.key = key;
+ prop.static = false;
+ classBody.body.push(this.parseClassProperty(prop));
+ return true;
+ }
+
+ return false;
+ }
+
+ parseClassMember(classBody, member, state) {
+ const isStatic = this.isContextual("static");
+
+ if (isStatic) {
+ if (this.parseClassMemberFromModifier(classBody, member)) {
+ return;
+ }
+
+ if (this.eat(types.braceL)) {
+ this.parseClassStaticBlock(classBody, member, state);
+ return;
+ }
+ }
+
+ this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
+ }
+
+ parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
+ const publicMethod = member;
+ const privateMethod = member;
+ const publicProp = member;
+ const privateProp = member;
+ const method = publicMethod;
+ const publicMember = publicMethod;
+ member.static = isStatic;
+
+ if (this.eat(types.star)) {
+ method.kind = "method";
+ this.parseClassElementName(method);
+
+ if (method.key.type === "PrivateName") {
+ this.pushClassPrivateMethod(classBody, privateMethod, true, false);
+ return;
+ }
+
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
+ }
+
+ this.pushClassMethod(classBody, publicMethod, true, false, false, false);
+ return;
+ }
+
+ const containsEsc = this.state.containsEsc;
+ const key = this.parseClassElementName(member);
+ const isPrivate = key.type === "PrivateName";
+ const isSimple = key.type === "Identifier";
+ const maybeQuestionTokenStart = this.state.start;
+ this.parsePostMemberNameModifiers(publicMember);
+
+ if (this.isClassMethod()) {
+ method.kind = "method";
+
+ if (isPrivate) {
+ this.pushClassPrivateMethod(classBody, privateMethod, false, false);
+ return;
+ }
+
+ const isConstructor = this.isNonstaticConstructor(publicMethod);
+ let allowsDirectSuper = false;
+
+ if (isConstructor) {
+ publicMethod.kind = "constructor";
+
+ if (state.hadConstructor && !this.hasPlugin("typescript")) {
+ this.raise(key.start, ErrorMessages.DuplicateConstructor);
+ }
+
+ state.hadConstructor = true;
+ allowsDirectSuper = state.constructorAllowsSuper;
+ }
+
+ this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
+ } else if (this.isClassProperty()) {
+ if (isPrivate) {
+ this.pushClassPrivateProperty(classBody, privateProp);
+ } else {
+ this.pushClassProperty(classBody, publicProp);
+ }
+ } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
+ const isGenerator = this.eat(types.star);
+
+ if (publicMember.optional) {
+ this.unexpected(maybeQuestionTokenStart);
+ }
+
+ method.kind = "method";
+ this.parseClassElementName(method);
+ this.parsePostMemberNameModifiers(publicMember);
+
+ if (method.key.type === "PrivateName") {
+ this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
+ } else {
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
+ }
+
+ this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
+ }
+ } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) {
+ method.kind = key.name;
+ this.parseClassElementName(publicMethod);
+
+ if (method.key.type === "PrivateName") {
+ this.pushClassPrivateMethod(classBody, privateMethod, false, false);
+ } else {
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
+ }
+
+ this.pushClassMethod(classBody, publicMethod, false, false, false, false);
+ }
+
+ this.checkGetterSetterParams(publicMethod);
+ } else if (this.isLineTerminator()) {
+ if (isPrivate) {
+ this.pushClassPrivateProperty(classBody, privateProp);
+ } else {
+ this.pushClassProperty(classBody, publicProp);
+ }
+ } else {
+ this.unexpected();
+ }
+ }
+
+ parseClassElementName(member) {
+ const key = this.parsePropertyName(member, true);
+
+ if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) {
+ this.raise(key.start, ErrorMessages.StaticPrototype);
+ }
+
+ if (key.type === "PrivateName" && key.id.name === "constructor") {
+ this.raise(key.start, ErrorMessages.ConstructorClassPrivateField);
+ }
+
+ return key;
+ }
+
+ parseClassStaticBlock(classBody, member, state) {
+ var _member$decorators;
+
+ this.expectPlugin("classStaticBlock", member.start);
+ this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
+ this.expressionScope.enter(newExpressionScope());
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.prodParam.enter(PARAM);
+ const body = member.body = [];
+ this.parseBlockOrModuleBlockBody(body, undefined, false, types.braceR);
+ this.prodParam.exit();
+ this.expressionScope.exit();
+ this.scope.exit();
+ this.state.labels = oldLabels;
+ classBody.body.push(this.finishNode(member, "StaticBlock"));
+
+ if (state.hadStaticBlock) {
+ this.raise(member.start, ErrorMessages.DuplicateStaticBlock);
+ }
+
+ if ((_member$decorators = member.decorators) == null ? void 0 : _member$decorators.length) {
+ this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
+ }
+
+ state.hadStaticBlock = true;
+ }
+
+ pushClassProperty(classBody, prop) {
+ if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
+ this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
+ }
+
+ classBody.body.push(this.parseClassProperty(prop));
+ }
+
+ pushClassPrivateProperty(classBody, prop) {
+ this.expectPlugin("classPrivateProperties", prop.key.start);
+ const node = this.parseClassPrivateProperty(prop);
+ classBody.body.push(node);
+ this.classScope.declarePrivateName(node.key.id.name, CLASS_ELEMENT_OTHER, node.key.start);
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ this.expectPlugin("classPrivateMethods", method.key.start);
+ const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
+ classBody.body.push(node);
+ const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
+ this.classScope.declarePrivateName(node.key.id.name, kind, node.key.start);
+ }
+
+ parsePostMemberNameModifiers(methodOrProp) {}
+
+ parseClassPrivateProperty(node) {
+ this.parseInitializer(node);
+ this.semicolon();
+ return this.finishNode(node, "ClassPrivateProperty");
+ }
+
+ parseClassProperty(node) {
+ if (!node.typeAnnotation || this.match(types.eq)) {
+ this.expectPlugin("classProperties");
+ }
+
+ this.parseInitializer(node);
+ this.semicolon();
+ return this.finishNode(node, "ClassProperty");
+ }
+
+ parseInitializer(node) {
+ this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
+ this.expressionScope.enter(newExpressionScope());
+ this.prodParam.enter(PARAM);
+ node.value = this.eat(types.eq) ? this.parseMaybeAssignAllowIn() : null;
+ this.expressionScope.exit();
+ this.prodParam.exit();
+ this.scope.exit();
+ }
+
+ parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
+ if (this.match(types.name)) {
+ node.id = this.parseIdentifier();
+
+ if (isStatement) {
+ this.checkLVal(node.id, "class name", bindingType);
+ }
+ } else {
+ if (optionalId || !isStatement) {
+ node.id = null;
+ } else {
+ this.unexpected(null, ErrorMessages.MissingClassName);
+ }
+ }
+ }
+
+ parseClassSuper(node) {
+ node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
+ }
+
+ parseExport(node) {
+ const hasDefault = this.maybeParseExportDefaultSpecifier(node);
+ const parseAfterDefault = !hasDefault || this.eat(types.comma);
+ const hasStar = parseAfterDefault && this.eatExportStar(node);
+ const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
+ const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma));
+ const isFromRequired = hasDefault || hasStar;
+
+ if (hasStar && !hasNamespace) {
+ if (hasDefault) this.unexpected();
+ this.parseExportFrom(node, true);
+ return this.finishNode(node, "ExportAllDeclaration");
+ }
+
+ const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
+
+ if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
+ throw this.unexpected(null, types.braceL);
+ }
+
+ let hasDeclaration;
+
+ if (isFromRequired || hasSpecifiers) {
+ hasDeclaration = false;
+ this.parseExportFrom(node, isFromRequired);
+ } else {
+ hasDeclaration = this.maybeParseExportDeclaration(node);
+ }
+
+ if (isFromRequired || hasSpecifiers || hasDeclaration) {
+ this.checkExport(node, true, false, !!node.source);
+ return this.finishNode(node, "ExportNamedDeclaration");
+ }
+
+ if (this.eat(types._default)) {
+ node.declaration = this.parseExportDefaultExpression();
+ this.checkExport(node, true, true);
+ return this.finishNode(node, "ExportDefaultDeclaration");
+ }
+
+ throw this.unexpected(null, types.braceL);
+ }
+
+ eatExportStar(node) {
+ return this.eat(types.star);
+ }
+
+ maybeParseExportDefaultSpecifier(node) {
+ if (this.isExportDefaultSpecifier()) {
+ this.expectPlugin("exportDefaultFrom");
+ const specifier = this.startNode();
+ specifier.exported = this.parseIdentifier(true);
+ node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamespaceSpecifier(node) {
+ if (this.isContextual("as")) {
+ if (!node.specifiers) node.specifiers = [];
+ const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
+ this.next();
+ specifier.exported = this.parseModuleExportName();
+ node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamedSpecifiers(node) {
+ if (this.match(types.braceL)) {
+ if (!node.specifiers) node.specifiers = [];
+ node.specifiers.push(...this.parseExportSpecifiers());
+ node.source = null;
+ node.declaration = null;
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportDeclaration(node) {
+ if (this.shouldParseExportDeclaration()) {
+ node.specifiers = [];
+ node.source = null;
+ node.declaration = this.parseExportDeclaration(node);
+ return true;
+ }
+
+ return false;
+ }
+
+ isAsyncFunction() {
+ if (!this.isContextual("async")) return false;
+ const next = this.nextTokenStart();
+ return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
+ }
+
+ parseExportDefaultExpression() {
+ const expr = this.startNode();
+ const isAsync = this.isAsyncFunction();
+
+ if (this.match(types._function) || isAsync) {
+ this.next();
+
+ if (isAsync) {
+ this.next();
+ }
+
+ return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync);
+ } else if (this.match(types._class)) {
+ return this.parseClass(expr, true, true);
+ } else if (this.match(types.at)) {
+ if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
+ }
+
+ this.parseDecorators(false);
+ return this.parseClass(expr, true, true);
+ } else if (this.match(types._const) || this.match(types._var) || this.isLet()) {
+ throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
+ } else {
+ const res = this.parseMaybeAssignAllowIn();
+ this.semicolon();
+ return res;
+ }
+ }
+
+ parseExportDeclaration(node) {
+ return this.parseStatement(null);
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.match(types.name)) {
+ const value = this.state.value;
+
+ if (value === "async" && !this.state.containsEsc || value === "let") {
+ return false;
+ }
+
+ if ((value === "type" || value === "interface") && !this.state.containsEsc) {
+ const l = this.lookahead();
+
+ if (l.type === types.name && l.value !== "from" || l.type === types.braceL) {
+ this.expectOnePlugin(["flow", "typescript"]);
+ return false;
+ }
+ }
+ } else if (!this.match(types._default)) {
+ return false;
+ }
+
+ const next = this.nextTokenStart();
+ const hasFrom = this.isUnparsedContextual(next, "from");
+
+ if (this.input.charCodeAt(next) === 44 || this.match(types.name) && hasFrom) {
+ return true;
+ }
+
+ if (this.match(types._default) && hasFrom) {
+ const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
+ return nextAfterFrom === 34 || nextAfterFrom === 39;
+ }
+
+ return false;
+ }
+
+ parseExportFrom(node, expect) {
+ if (this.eatContextual("from")) {
+ node.source = this.parseImportSource();
+ this.checkExport(node);
+ const assertions = this.maybeParseImportAssertions();
+
+ if (assertions) {
+ node.assertions = assertions;
+ }
+ } else {
+ if (expect) {
+ this.unexpected();
+ } else {
+ node.source = null;
+ }
+ }
+
+ this.semicolon();
+ }
+
+ shouldParseExportDeclaration() {
+ if (this.match(types.at)) {
+ this.expectOnePlugin(["decorators", "decorators-legacy"]);
+
+ if (this.hasPlugin("decorators")) {
+ if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
+ } else {
+ return true;
+ }
+ }
+ }
+
+ return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
+ }
+
+ checkExport(node, checkNames, isDefault, isFrom) {
+ if (checkNames) {
+ if (isDefault) {
+ this.checkDuplicateExports(node, "default");
+
+ if (this.hasPlugin("exportDefaultFrom")) {
+ var _declaration$extra;
+
+ const declaration = node.declaration;
+
+ if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) == null ? void 0 : _declaration$extra.parenthesized)) {
+ this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
+ }
+ }
+ } else if (node.specifiers && node.specifiers.length) {
+ for (let _i4 = 0, _node$specifiers = node.specifiers; _i4 < _node$specifiers.length; _i4++) {
+ const specifier = _node$specifiers[_i4];
+ const {
+ exported
+ } = specifier;
+ const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
+ this.checkDuplicateExports(specifier, exportedName);
+
+ if (!isFrom && specifier.local) {
+ const {
+ local
+ } = specifier;
+
+ if (local.type === "StringLiteral") {
+ this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.extra.raw, exportedName);
+ } else {
+ this.checkReservedWord(local.name, local.start, true, false);
+ this.scope.checkLocalExport(local);
+ }
+ }
+ }
+ } else if (node.declaration) {
+ if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
+ const id = node.declaration.id;
+ if (!id) throw new Error("Assertion failure");
+ this.checkDuplicateExports(node, id.name);
+ } else if (node.declaration.type === "VariableDeclaration") {
+ for (let _i5 = 0, _node$declaration$dec = node.declaration.declarations; _i5 < _node$declaration$dec.length; _i5++) {
+ const declaration = _node$declaration$dec[_i5];
+ this.checkDeclaration(declaration.id);
+ }
+ }
+ }
+ }
+
+ const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ if (currentContextDecorators.length) {
+ throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
+ }
+ }
+
+ checkDeclaration(node) {
+ if (node.type === "Identifier") {
+ this.checkDuplicateExports(node, node.name);
+ } else if (node.type === "ObjectPattern") {
+ for (let _i6 = 0, _node$properties = node.properties; _i6 < _node$properties.length; _i6++) {
+ const prop = _node$properties[_i6];
+ this.checkDeclaration(prop);
+ }
+ } else if (node.type === "ArrayPattern") {
+ for (let _i7 = 0, _node$elements = node.elements; _i7 < _node$elements.length; _i7++) {
+ const elem = _node$elements[_i7];
+
+ if (elem) {
+ this.checkDeclaration(elem);
+ }
+ }
+ } else if (node.type === "ObjectProperty") {
+ this.checkDeclaration(node.value);
+ } else if (node.type === "RestElement") {
+ this.checkDeclaration(node.argument);
+ } else if (node.type === "AssignmentPattern") {
+ this.checkDeclaration(node.left);
+ }
+ }
+
+ checkDuplicateExports(node, name) {
+ if (this.state.exportedIdentifiers.indexOf(name) > -1) {
+ this.raise(node.start, name === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name);
+ }
+
+ this.state.exportedIdentifiers.push(name);
+ }
+
+ parseExportSpecifiers() {
+ const nodes = [];
+ let first = true;
+ this.expect(types.braceL);
+
+ while (!this.eat(types.braceR)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(types.comma);
+ if (this.eat(types.braceR)) break;
+ }
+
+ const node = this.startNode();
+ node.local = this.parseModuleExportName();
+ node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
+ nodes.push(this.finishNode(node, "ExportSpecifier"));
+ }
+
+ return nodes;
+ }
+
+ parseModuleExportName() {
+ if (this.match(types.string)) {
+ this.expectPlugin("moduleStringNames");
+ const result = this.parseLiteral(this.state.value, "StringLiteral");
+ const surrogate = result.value.match(loneSurrogate);
+
+ if (surrogate) {
+ this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
+ }
+
+ return result;
+ }
+
+ return this.parseIdentifier(true);
+ }
+
+ parseImport(node) {
+ node.specifiers = [];
+
+ if (!this.match(types.string)) {
+ const hasDefault = this.maybeParseDefaultImportSpecifier(node);
+ const parseNext = !hasDefault || this.eat(types.comma);
+ const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
+ if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
+ this.expectContextual("from");
+ }
+
+ node.source = this.parseImportSource();
+ const assertions = this.maybeParseImportAssertions();
+
+ if (assertions) {
+ node.assertions = assertions;
+ } else {
+ const attributes = this.maybeParseModuleAttributes();
+
+ if (attributes) {
+ node.attributes = attributes;
+ }
+ }
+
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ parseImportSource() {
+ if (!this.match(types.string)) this.unexpected();
+ return this.parseExprAtom();
+ }
+
+ shouldParseDefaultImport(node) {
+ return this.match(types.name);
+ }
+
+ parseImportSpecifierLocal(node, specifier, type, contextDescription) {
+ specifier.local = this.parseIdentifier();
+ this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, type));
+ }
+
+ parseAssertEntries() {
+ const attrs = [];
+ const attrNames = new Set();
+
+ do {
+ if (this.match(types.braceR)) {
+ break;
+ }
+
+ const node = this.startNode();
+ const keyName = this.state.value;
+
+ if (this.match(types.string)) {
+ node.key = this.parseLiteral(keyName, "StringLiteral");
+ } else {
+ node.key = this.parseIdentifier(true);
+ }
+
+ this.expect(types.colon);
+
+ if (keyName !== "type") {
+ this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, keyName);
+ }
+
+ if (attrNames.has(keyName)) {
+ this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
+ }
+
+ attrNames.add(keyName);
+
+ if (!this.match(types.string)) {
+ throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
+ }
+
+ node.value = this.parseLiteral(this.state.value, "StringLiteral");
+ this.finishNode(node, "ImportAttribute");
+ attrs.push(node);
+ } while (this.eat(types.comma));
+
+ return attrs;
+ }
+
+ maybeParseModuleAttributes() {
+ if (this.match(types._with) && !this.hasPrecedingLineBreak()) {
+ this.expectPlugin("moduleAttributes");
+ this.next();
+ } else {
+ if (this.hasPlugin("moduleAttributes")) return [];
+ return null;
+ }
+
+ const attrs = [];
+ const attributes = new Set();
+
+ do {
+ const node = this.startNode();
+ node.key = this.parseIdentifier(true);
+
+ if (node.key.name !== "type") {
+ this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
+ }
+
+ if (attributes.has(node.key.name)) {
+ this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
+ }
+
+ attributes.add(node.key.name);
+ this.expect(types.colon);
+
+ if (!this.match(types.string)) {
+ throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
+ }
+
+ node.value = this.parseLiteral(this.state.value, "StringLiteral");
+ this.finishNode(node, "ImportAttribute");
+ attrs.push(node);
+ } while (this.eat(types.comma));
+
+ return attrs;
+ }
+
+ maybeParseImportAssertions() {
+ if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
+ this.expectPlugin("importAssertions");
+ this.next();
+ } else {
+ if (this.hasPlugin("importAssertions")) return [];
+ return null;
+ }
+
+ this.eat(types.braceL);
+ const attrs = this.parseAssertEntries();
+ this.eat(types.braceR);
+ return attrs;
+ }
+
+ maybeParseDefaultImportSpecifier(node) {
+ if (this.shouldParseDefaultImport(node)) {
+ this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseStarImportSpecifier(node) {
+ if (this.match(types.star)) {
+ const specifier = this.startNode();
+ this.next();
+ this.expectContextual("as");
+ this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
+ return true;
+ }
+
+ return false;
+ }
+
+ parseNamedImportSpecifiers(node) {
+ let first = true;
+ this.expect(types.braceL);
+
+ while (!this.eat(types.braceR)) {
+ if (first) {
+ first = false;
+ } else {
+ if (this.eat(types.colon)) {
+ throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
+ }
+
+ this.expect(types.comma);
+ if (this.eat(types.braceR)) break;
+ }
+
+ this.parseImportSpecifier(node);
+ }
+ }
+
+ parseImportSpecifier(node) {
+ const specifier = this.startNode();
+ specifier.imported = this.parseModuleExportName();
+
+ if (this.eatContextual("as")) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ const {
+ imported
+ } = specifier;
+
+ if (imported.type === "StringLiteral") {
+ throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
+ }
+
+ this.checkReservedWord(imported.name, specifier.start, true, true);
+ specifier.local = imported.__clone();
+ }
+
+ this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ }
+
+}
+
+class ClassScope {
+ constructor() {
+ this.privateNames = new Set();
+ this.loneAccessors = new Map();
+ this.undefinedPrivateNames = new Map();
+ }
+
+}
+class ClassScopeHandler {
+ constructor(raise) {
+ this.stack = [];
+ this.undefinedPrivateNames = new Map();
+ this.raise = raise;
+ }
+
+ current() {
+ return this.stack[this.stack.length - 1];
+ }
+
+ enter() {
+ this.stack.push(new ClassScope());
+ }
+
+ exit() {
+ const oldClassScope = this.stack.pop();
+ const current = this.current();
+
+ for (let _i = 0, _Array$from = Array.from(oldClassScope.undefinedPrivateNames); _i < _Array$from.length; _i++) {
+ const [name, pos] = _Array$from[_i];
+
+ if (current) {
+ if (!current.undefinedPrivateNames.has(name)) {
+ current.undefinedPrivateNames.set(name, pos);
+ }
+ } else {
+ this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name);
+ }
+ }
+ }
+
+ declarePrivateName(name, elementType, pos) {
+ const classScope = this.current();
+ let redefined = classScope.privateNames.has(name);
+
+ if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
+ const accessor = redefined && classScope.loneAccessors.get(name);
+
+ if (accessor) {
+ const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
+ const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
+ const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
+ const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
+ redefined = oldKind === newKind || oldStatic !== newStatic;
+ if (!redefined) classScope.loneAccessors.delete(name);
+ } else if (!redefined) {
+ classScope.loneAccessors.set(name, elementType);
+ }
+ }
+
+ if (redefined) {
+ this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name);
+ }
+
+ classScope.privateNames.add(name);
+ classScope.undefinedPrivateNames.delete(name);
+ }
+
+ usePrivateName(name, pos) {
+ let classScope;
+
+ for (let _i2 = 0, _this$stack = this.stack; _i2 < _this$stack.length; _i2++) {
+ classScope = _this$stack[_i2];
+ if (classScope.privateNames.has(name)) return;
+ }
+
+ if (classScope) {
+ classScope.undefinedPrivateNames.set(name, pos);
+ } else {
+ this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name);
+ }
+ }
+
+}
+
+class Parser extends StatementParser {
+ constructor(options, input) {
+ options = getOptions(options);
+ super(options, input);
+ const ScopeHandler = this.getScopeHandler();
+ this.options = options;
+ this.inModule = this.options.sourceType === "module";
+ this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);
+ this.prodParam = new ProductionParameterHandler();
+ this.classScope = new ClassScopeHandler(this.raise.bind(this));
+ this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
+ this.plugins = pluginsMap(this.options.plugins);
+ this.filename = options.sourceFilename;
+ }
+
+ getScopeHandler() {
+ return ScopeHandler;
+ }
+
+ parse() {
+ let paramFlags = PARAM;
+
+ if (this.hasPlugin("topLevelAwait") && this.inModule) {
+ paramFlags |= PARAM_AWAIT;
+ }
+
+ this.scope.enter(SCOPE_PROGRAM);
+ this.prodParam.enter(paramFlags);
+ const file = this.startNode();
+ const program = this.startNode();
+ this.nextToken();
+ file.errors = null;
+ this.parseTopLevel(file, program);
+ file.errors = this.state.errors;
+ return file;
+ }
+
+}
+
+function pluginsMap(plugins) {
+ const pluginMap = new Map();
+
+ for (let _i = 0; _i < plugins.length; _i++) {
+ const plugin = plugins[_i];
+ const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}];
+ if (!pluginMap.has(name)) pluginMap.set(name, options || {});
+ }
+
+ return pluginMap;
+}
+
+function parse(input, options) {
+ var _options;
+
+ if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
+ options = Object.assign({}, options);
+
+ try {
+ options.sourceType = "module";
+ const parser = getParser(options, input);
+ const ast = parser.parse();
+
+ if (parser.sawUnambiguousESM) {
+ return ast;
+ }
+
+ if (parser.ambiguousScriptDifferentAst) {
+ try {
+ options.sourceType = "script";
+ return getParser(options, input).parse();
+ } catch (_unused) {}
+ } else {
+ ast.program.sourceType = "script";
+ }
+
+ return ast;
+ } catch (moduleError) {
+ try {
+ options.sourceType = "script";
+ return getParser(options, input).parse();
+ } catch (_unused2) {}
+
+ throw moduleError;
+ }
+ } else {
+ return getParser(options, input).parse();
+ }
+}
+function parseExpression(input, options) {
+ const parser = getParser(options, input);
+
+ if (parser.options.strictMode) {
+ parser.state.strict = true;
+ }
+
+ return parser.getExpression();
+}
+
+function getParser(options, input) {
+ let cls = Parser;
+
+ if (options == null ? void 0 : options.plugins) {
+ validatePlugins(options.plugins);
+ cls = getParserClass(options.plugins);
+ }
+
+ return new cls(options, input);
+}
+
+const parserClassCache = {};
+
+function getParserClass(pluginsFromOptions) {
+ const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name));
+ const key = pluginList.join("/");
+ let cls = parserClassCache[key];
+
+ if (!cls) {
+ cls = Parser;
+
+ for (let _i = 0; _i < pluginList.length; _i++) {
+ const plugin = pluginList[_i];
+ cls = mixinPlugins[plugin](cls);
+ }
+
+ parserClassCache[key] = cls;
+ }
+
+ return cls;
+}
+
+exports.parse = parse;
+exports.parseExpression = parseExpression;
+exports.tokTypes = types;
+//# sourceMappingURL=index.js.map
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/parser/package.json b/tools/node_modules/@babel/core/node_modules/@babel/parser/package.json
new file mode 100644
index 00000000000..d26cd44fb78
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/parser/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "@babel/parser",
+ "version": "7.12.7",
+ "description": "A JavaScript parser",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "keywords": [
+ "babel",
+ "javascript",
+ "parser",
+ "tc39",
+ "ecmascript",
+ "@babel/parser"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-parser"
+ },
+ "main": "lib/index.js",
+ "types": "typings/babel-parser.d.ts",
+ "files": [
+ "bin",
+ "lib",
+ "typings"
+ ],
+ "engines": {
+ "node": ">=6.0.0"
+ },
+ "devDependencies": {
+ "@babel/code-frame": "7.10.4",
+ "@babel/helper-fixtures": "7.10.5",
+ "@babel/helper-validator-identifier": "7.10.4",
+ "charcodes": "^0.2.0"
+ },
+ "bin": "./bin/babel-parser.js"
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/template/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/README.md b/tools/node_modules/@babel/core/node_modules/@babel/template/README.md
new file mode 100644
index 00000000000..759c65aa6b1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/README.md
@@ -0,0 +1,19 @@
+# @babel/template
+
+> Generate an AST from a string template.
+
+See our website [@babel/template](https://babeljs.io/docs/en/babel-template) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/template
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/template --dev
+```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js
index 2a0e6297267..2a0e6297267 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/builder.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/builder.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js
new file mode 100644
index 00000000000..b045cc76e59
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/formatters.js
@@ -0,0 +1,71 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function makeStatementFormatter(fn) {
+ return {
+ code: str => `/* @babel/template */;\n${str}`,
+ validate: () => {},
+ unwrap: ast => {
+ return fn(ast.program.body.slice(1));
+ }
+ };
+}
+
+const smart = makeStatementFormatter(body => {
+ if (body.length > 1) {
+ return body;
+ } else {
+ return body[0];
+ }
+});
+exports.smart = smart;
+const statements = makeStatementFormatter(body => body);
+exports.statements = statements;
+const statement = makeStatementFormatter(body => {
+ if (body.length === 0) {
+ throw new Error("Found nothing to return.");
+ }
+
+ if (body.length > 1) {
+ throw new Error("Found multiple statements but wanted one");
+ }
+
+ return body[0];
+});
+exports.statement = statement;
+const expression = {
+ code: str => `(\n${str}\n)`,
+ validate: ast => {
+ if (ast.program.body.length > 1) {
+ throw new Error("Found multiple statements but wanted one");
+ }
+
+ if (expression.unwrap(ast).start === 0) {
+ throw new Error("Parse result included parens.");
+ }
+ },
+ unwrap: ({
+ program
+ }) => {
+ const [stmt] = program.body;
+ t.assertExpressionStatement(stmt);
+ return stmt.expression;
+ }
+};
+exports.expression = expression;
+const program = {
+ code: str => str,
+ validate: () => {},
+ unwrap: ast => ast.program
+};
+exports.program = program; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/index.js
new file mode 100644
index 00000000000..9c666dbcc1c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/index.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
+
+var formatters = _interopRequireWildcard(require("./formatters"));
+
+var _builder = _interopRequireDefault(require("./builder"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const smart = (0, _builder.default)(formatters.smart);
+exports.smart = smart;
+const statement = (0, _builder.default)(formatters.statement);
+exports.statement = statement;
+const statements = (0, _builder.default)(formatters.statements);
+exports.statements = statements;
+const expression = (0, _builder.default)(formatters.expression);
+exports.expression = expression;
+const program = (0, _builder.default)(formatters.program);
+exports.program = program;
+
+var _default = Object.assign(smart.bind(undefined), {
+ smart,
+ statement,
+ statements,
+ expression,
+ program,
+ ast: smart.ast
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js
new file mode 100644
index 00000000000..b68fd68dbd6
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/literal.js
@@ -0,0 +1,82 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = literalTemplate;
+
+var _options = require("./options");
+
+var _parse = _interopRequireDefault(require("./parse"));
+
+var _populate = _interopRequireDefault(require("./populate"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function literalTemplate(formatter, tpl, opts) {
+ const {
+ metadata,
+ names
+ } = buildLiteralData(formatter, tpl, opts);
+ return arg => {
+ const defaultReplacements = {};
+ arg.forEach((replacement, i) => {
+ defaultReplacements[names[i]] = replacement;
+ });
+ return arg => {
+ const replacements = (0, _options.normalizeReplacements)(arg);
+
+ if (replacements) {
+ Object.keys(replacements).forEach(key => {
+ if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
+ throw new Error("Unexpected replacement overlap.");
+ }
+ });
+ }
+
+ return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
+ };
+ };
+}
+
+function buildLiteralData(formatter, tpl, opts) {
+ let names;
+ let nameSet;
+ let metadata;
+ let prefix = "";
+
+ do {
+ prefix += "$";
+ const result = buildTemplateCode(tpl, prefix);
+ names = result.names;
+ nameSet = new Set(names);
+ metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
+ parser: opts.parser,
+ placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
+ placeholderPattern: opts.placeholderPattern,
+ preserveComments: opts.preserveComments,
+ syntacticPlaceholders: opts.syntacticPlaceholders
+ });
+ } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name)));
+
+ return {
+ metadata,
+ names
+ };
+}
+
+function buildTemplateCode(tpl, prefix) {
+ const names = [];
+ let code = tpl[0];
+
+ for (let i = 1; i < tpl.length; i++) {
+ const value = `${prefix}${i - 1}`;
+ names.push(value);
+ code += value + tpl[i];
+ }
+
+ return {
+ names,
+ code
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/options.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/options.js
new file mode 100644
index 00000000000..8622c640b72
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/options.js
@@ -0,0 +1,82 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.merge = merge;
+exports.validate = validate;
+exports.normalizeReplacements = normalizeReplacements;
+
+function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
+
+function merge(a, b) {
+ const {
+ placeholderWhitelist = a.placeholderWhitelist,
+ placeholderPattern = a.placeholderPattern,
+ preserveComments = a.preserveComments,
+ syntacticPlaceholders = a.syntacticPlaceholders
+ } = b;
+ return {
+ parser: Object.assign({}, a.parser, b.parser),
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ };
+}
+
+function validate(opts) {
+ if (opts != null && typeof opts !== "object") {
+ throw new Error("Unknown template options.");
+ }
+
+ const _ref = opts || {},
+ {
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ } = _ref,
+ parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
+
+ if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
+ throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
+ }
+
+ if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
+ throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
+ }
+
+ if (preserveComments != null && typeof preserveComments !== "boolean") {
+ throw new Error("'.preserveComments' must be a boolean, null, or undefined");
+ }
+
+ if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
+ throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
+ }
+
+ if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
+ throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
+ }
+
+ return {
+ parser,
+ placeholderWhitelist: placeholderWhitelist || undefined,
+ placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
+ preserveComments: preserveComments == null ? undefined : preserveComments,
+ syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
+ };
+}
+
+function normalizeReplacements(replacements) {
+ if (Array.isArray(replacements)) {
+ return replacements.reduce((acc, replacement, i) => {
+ acc["$" + i] = replacement;
+ return acc;
+ }, {});
+ } else if (typeof replacements === "object" || replacements == null) {
+ return replacements || undefined;
+ }
+
+ throw new Error("Template replacements must be an array, object, null, or undefined");
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js
new file mode 100644
index 00000000000..ff5497b7d7d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/parse.js
@@ -0,0 +1,179 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parseAndBuildMetadata;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _parser = require("@babel/parser");
+
+var _codeFrame = require("@babel/code-frame");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const PATTERN = /^[_$A-Z0-9]+$/;
+
+function parseAndBuildMetadata(formatter, code, opts) {
+ const {
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ } = opts;
+ const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);
+ t.removePropertiesDeep(ast, {
+ preserveComments
+ });
+ formatter.validate(ast);
+ const syntactic = {
+ placeholders: [],
+ placeholderNames: new Set()
+ };
+ const legacy = {
+ placeholders: [],
+ placeholderNames: new Set()
+ };
+ const isLegacyRef = {
+ value: undefined
+ };
+ t.traverse(ast, placeholderVisitorHandler, {
+ syntactic,
+ legacy,
+ isLegacyRef,
+ placeholderWhitelist,
+ placeholderPattern,
+ syntacticPlaceholders
+ });
+ return Object.assign({
+ ast
+ }, isLegacyRef.value ? legacy : syntactic);
+}
+
+function placeholderVisitorHandler(node, ancestors, state) {
+ var _state$placeholderWhi;
+
+ let name;
+
+ if (t.isPlaceholder(node)) {
+ if (state.syntacticPlaceholders === false) {
+ throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
+ } else {
+ name = node.name.name;
+ state.isLegacyRef.value = false;
+ }
+ } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
+ return;
+ } else if (t.isIdentifier(node) || t.isJSXIdentifier(node)) {
+ name = node.name;
+ state.isLegacyRef.value = true;
+ } else if (t.isStringLiteral(node)) {
+ name = node.value;
+ state.isLegacyRef.value = true;
+ } else {
+ return;
+ }
+
+ if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
+ throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
+ }
+
+ if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && !((_state$placeholderWhi = state.placeholderWhitelist) == null ? void 0 : _state$placeholderWhi.has(name))) {
+ return;
+ }
+
+ ancestors = ancestors.slice();
+ const {
+ node: parent,
+ key
+ } = ancestors[ancestors.length - 1];
+ let type;
+
+ if (t.isStringLiteral(node) || t.isPlaceholder(node, {
+ expectedNode: "StringLiteral"
+ })) {
+ type = "string";
+ } else if (t.isNewExpression(parent) && key === "arguments" || t.isCallExpression(parent) && key === "arguments" || t.isFunction(parent) && key === "params") {
+ type = "param";
+ } else if (t.isExpressionStatement(parent) && !t.isPlaceholder(node)) {
+ type = "statement";
+ ancestors = ancestors.slice(0, -1);
+ } else if (t.isStatement(node) && t.isPlaceholder(node)) {
+ type = "statement";
+ } else {
+ type = "other";
+ }
+
+ const {
+ placeholders,
+ placeholderNames
+ } = state.isLegacyRef.value ? state.legacy : state.syntactic;
+ placeholders.push({
+ name,
+ type,
+ resolve: ast => resolveAncestors(ast, ancestors),
+ isDuplicate: placeholderNames.has(name)
+ });
+ placeholderNames.add(name);
+}
+
+function resolveAncestors(ast, ancestors) {
+ let parent = ast;
+
+ for (let i = 0; i < ancestors.length - 1; i++) {
+ const {
+ key,
+ index
+ } = ancestors[i];
+
+ if (index === undefined) {
+ parent = parent[key];
+ } else {
+ parent = parent[key][index];
+ }
+ }
+
+ const {
+ key,
+ index
+ } = ancestors[ancestors.length - 1];
+ return {
+ parent,
+ key,
+ index
+ };
+}
+
+function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
+ const plugins = (parserOpts.plugins || []).slice();
+
+ if (syntacticPlaceholders !== false) {
+ plugins.push("placeholders");
+ }
+
+ parserOpts = Object.assign({
+ allowReturnOutsideFunction: true,
+ allowSuperOutsideMethod: true,
+ sourceType: "module"
+ }, parserOpts, {
+ plugins
+ });
+
+ try {
+ return (0, _parser.parse)(code, parserOpts);
+ } catch (err) {
+ const loc = err.loc;
+
+ if (loc) {
+ err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, {
+ start: loc
+ });
+ err.code = "BABEL_TEMPLATE_PARSE_ERROR";
+ }
+
+ throw err;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js
new file mode 100644
index 00000000000..cbca1917c96
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/populate.js
@@ -0,0 +1,127 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = populatePlaceholders;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function populatePlaceholders(metadata, replacements) {
+ const ast = t.cloneNode(metadata.ast);
+
+ if (replacements) {
+ metadata.placeholders.forEach(placeholder => {
+ if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
+ const placeholderName = placeholder.name;
+ throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
+ placeholder you may want to consider passing one of the following options to @babel/template:
+ - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
+ - { placeholderPattern: /^${placeholderName}$/ }`);
+ }
+ });
+ Object.keys(replacements).forEach(key => {
+ if (!metadata.placeholderNames.has(key)) {
+ throw new Error(`Unknown substitution "${key}" given`);
+ }
+ });
+ }
+
+ metadata.placeholders.slice().reverse().forEach(placeholder => {
+ try {
+ applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
+ } catch (e) {
+ e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
+ throw e;
+ }
+ });
+ return ast;
+}
+
+function applyReplacement(placeholder, ast, replacement) {
+ if (placeholder.isDuplicate) {
+ if (Array.isArray(replacement)) {
+ replacement = replacement.map(node => t.cloneNode(node));
+ } else if (typeof replacement === "object") {
+ replacement = t.cloneNode(replacement);
+ }
+ }
+
+ const {
+ parent,
+ key,
+ index
+ } = placeholder.resolve(ast);
+
+ if (placeholder.type === "string") {
+ if (typeof replacement === "string") {
+ replacement = t.stringLiteral(replacement);
+ }
+
+ if (!replacement || !t.isStringLiteral(replacement)) {
+ throw new Error("Expected string substitution");
+ }
+ } else if (placeholder.type === "statement") {
+ if (index === undefined) {
+ if (!replacement) {
+ replacement = t.emptyStatement();
+ } else if (Array.isArray(replacement)) {
+ replacement = t.blockStatement(replacement);
+ } else if (typeof replacement === "string") {
+ replacement = t.expressionStatement(t.identifier(replacement));
+ } else if (!t.isStatement(replacement)) {
+ replacement = t.expressionStatement(replacement);
+ }
+ } else {
+ if (replacement && !Array.isArray(replacement)) {
+ if (typeof replacement === "string") {
+ replacement = t.identifier(replacement);
+ }
+
+ if (!t.isStatement(replacement)) {
+ replacement = t.expressionStatement(replacement);
+ }
+ }
+ }
+ } else if (placeholder.type === "param") {
+ if (typeof replacement === "string") {
+ replacement = t.identifier(replacement);
+ }
+
+ if (index === undefined) throw new Error("Assertion failure.");
+ } else {
+ if (typeof replacement === "string") {
+ replacement = t.identifier(replacement);
+ }
+
+ if (Array.isArray(replacement)) {
+ throw new Error("Cannot replace single expression with an array.");
+ }
+ }
+
+ if (index === undefined) {
+ t.validate(parent, key, replacement);
+ parent[key] = replacement;
+ } else {
+ const items = parent[key].slice();
+
+ if (placeholder.type === "statement" || placeholder.type === "param") {
+ if (replacement == null) {
+ items.splice(index, 1);
+ } else if (Array.isArray(replacement)) {
+ items.splice(index, 1, ...replacement);
+ } else {
+ items[index] = replacement;
+ }
+ } else {
+ items[index] = replacement;
+ }
+
+ t.validate(parent, key, items);
+ parent[key] = items;
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/string.js
index 02ad45782e9..02ad45782e9 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/string.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/lib/string.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/template/package.json b/tools/node_modules/@babel/core/node_modules/@babel/template/package.json
new file mode 100644
index 00000000000..59729290baa
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/template/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@babel/template",
+ "version": "7.12.7",
+ "description": "Generate an AST from a string template.",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-template"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.12.7",
+ "@babel/types": "^7.12.7"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/README.md b/tools/node_modules/@babel/core/node_modules/@babel/traverse/README.md
new file mode 100644
index 00000000000..e478f16fb1c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/README.md
@@ -0,0 +1,19 @@
+# @babel/traverse
+
+> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes
+
+See our website [@babel/traverse](https://babeljs.io/docs/en/babel-traverse) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/traverse
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/traverse --dev
+```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js
index 89f200777be..89f200777be 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/cache.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/cache.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js
new file mode 100644
index 00000000000..be050480a29
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/context.js
@@ -0,0 +1,149 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _path = _interopRequireDefault(require("./path"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const testing = process.env.NODE_ENV === "test";
+
+class TraversalContext {
+ constructor(scope, opts, state, parentPath) {
+ this.queue = null;
+ this.parentPath = parentPath;
+ this.scope = scope;
+ this.state = state;
+ this.opts = opts;
+ }
+
+ shouldVisit(node) {
+ const opts = this.opts;
+ if (opts.enter || opts.exit) return true;
+ if (opts[node.type]) return true;
+ const keys = t.VISITOR_KEYS[node.type];
+ if (!(keys == null ? void 0 : keys.length)) return false;
+
+ for (const key of keys) {
+ if (node[key]) return true;
+ }
+
+ return false;
+ }
+
+ create(node, obj, key, listKey) {
+ return _path.default.get({
+ parentPath: this.parentPath,
+ parent: node,
+ container: obj,
+ key: key,
+ listKey
+ });
+ }
+
+ maybeQueue(path, notPriority) {
+ if (this.trap) {
+ throw new Error("Infinite cycle detected");
+ }
+
+ if (this.queue) {
+ if (notPriority) {
+ this.queue.push(path);
+ } else {
+ this.priorityQueue.push(path);
+ }
+ }
+ }
+
+ visitMultiple(container, parent, listKey) {
+ if (container.length === 0) return false;
+ const queue = [];
+
+ for (let key = 0; key < container.length; key++) {
+ const node = container[key];
+
+ if (node && this.shouldVisit(node)) {
+ queue.push(this.create(parent, container, key, listKey));
+ }
+ }
+
+ return this.visitQueue(queue);
+ }
+
+ visitSingle(node, key) {
+ if (this.shouldVisit(node[key])) {
+ return this.visitQueue([this.create(node, node, key)]);
+ } else {
+ return false;
+ }
+ }
+
+ visitQueue(queue) {
+ this.queue = queue;
+ this.priorityQueue = [];
+ const visited = new WeakSet();
+ let stop = false;
+
+ for (const path of queue) {
+ path.resync();
+
+ if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
+ path.pushContext(this);
+ }
+
+ if (path.key === null) continue;
+
+ if (testing && queue.length >= 10000) {
+ this.trap = true;
+ }
+
+ const {
+ node
+ } = path;
+ if (visited.has(node)) continue;
+ if (node) visited.add(node);
+
+ if (path.visit()) {
+ stop = true;
+ break;
+ }
+
+ if (this.priorityQueue.length) {
+ stop = this.visitQueue(this.priorityQueue);
+ this.priorityQueue = [];
+ this.queue = queue;
+ if (stop) break;
+ }
+ }
+
+ for (const path of queue) {
+ path.popContext();
+ }
+
+ this.queue = null;
+ return stop;
+ }
+
+ visit(node, key) {
+ const nodes = node[key];
+ if (!nodes) return false;
+
+ if (Array.isArray(nodes)) {
+ return this.visitMultiple(nodes, node, key);
+ } else {
+ return this.visitSingle(node, key);
+ }
+ }
+
+}
+
+exports.default = TraversalContext; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js
index fe139d2a8f2..fe139d2a8f2 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/hub.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/hub.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js
new file mode 100644
index 00000000000..057814f43ad
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/index.js
@@ -0,0 +1,118 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = traverse;
+Object.defineProperty(exports, "NodePath", {
+ enumerable: true,
+ get: function () {
+ return _path.default;
+ }
+});
+Object.defineProperty(exports, "Scope", {
+ enumerable: true,
+ get: function () {
+ return _scope.default;
+ }
+});
+Object.defineProperty(exports, "Hub", {
+ enumerable: true,
+ get: function () {
+ return _hub.default;
+ }
+});
+exports.visitors = void 0;
+
+var _context = _interopRequireDefault(require("./context"));
+
+var visitors = _interopRequireWildcard(require("./visitors"));
+
+exports.visitors = visitors;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var cache = _interopRequireWildcard(require("./cache"));
+
+var _path = _interopRequireDefault(require("./path"));
+
+var _scope = _interopRequireDefault(require("./scope"));
+
+var _hub = _interopRequireDefault(require("./hub"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function traverse(parent, opts, scope, state, parentPath) {
+ if (!parent) return;
+ if (!opts) opts = {};
+
+ if (!opts.noScope && !scope) {
+ if (parent.type !== "Program" && parent.type !== "File") {
+ throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath.");
+ }
+ }
+
+ if (!t.VISITOR_KEYS[parent.type]) {
+ return;
+ }
+
+ visitors.explode(opts);
+ traverse.node(parent, opts, scope, state, parentPath);
+}
+
+traverse.visitors = visitors;
+traverse.verify = visitors.verify;
+traverse.explode = visitors.explode;
+
+traverse.cheap = function (node, enter) {
+ return t.traverseFast(node, enter);
+};
+
+traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
+ const keys = t.VISITOR_KEYS[node.type];
+ if (!keys) return;
+ const context = new _context.default(scope, opts, state, parentPath);
+
+ for (const key of keys) {
+ if (skipKeys && skipKeys[key]) continue;
+ if (context.visit(node, key)) return;
+ }
+};
+
+traverse.clearNode = function (node, opts) {
+ t.removeProperties(node, opts);
+ cache.path.delete(node);
+};
+
+traverse.removeProperties = function (tree, opts) {
+ t.traverseFast(tree, traverse.clearNode, opts);
+ return tree;
+};
+
+function hasDenylistedType(path, state) {
+ if (path.node.type === state.type) {
+ state.has = true;
+ path.stop();
+ }
+}
+
+traverse.hasType = function (tree, type, denylistTypes) {
+ if (denylistTypes == null ? void 0 : denylistTypes.includes(tree.type)) return false;
+ if (tree.type === type) return true;
+ const state = {
+ has: false,
+ type: type
+ };
+ traverse(tree, {
+ noScope: true,
+ denylist: denylistTypes,
+ enter: hasDenylistedType
+ }, null, state);
+ return state.has;
+};
+
+traverse.cache = cache; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js
new file mode 100644
index 00000000000..d2c7908d0d4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/ancestry.js
@@ -0,0 +1,182 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findParent = findParent;
+exports.find = find;
+exports.getFunctionParent = getFunctionParent;
+exports.getStatementParent = getStatementParent;
+exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
+exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
+exports.getAncestry = getAncestry;
+exports.isAncestor = isAncestor;
+exports.isDescendant = isDescendant;
+exports.inType = inType;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _index = _interopRequireDefault(require("./index"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function findParent(callback) {
+ let path = this;
+
+ while (path = path.parentPath) {
+ if (callback(path)) return path;
+ }
+
+ return null;
+}
+
+function find(callback) {
+ let path = this;
+
+ do {
+ if (callback(path)) return path;
+ } while (path = path.parentPath);
+
+ return null;
+}
+
+function getFunctionParent() {
+ return this.findParent(p => p.isFunction());
+}
+
+function getStatementParent() {
+ let path = this;
+
+ do {
+ if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
+ break;
+ } else {
+ path = path.parentPath;
+ }
+ } while (path);
+
+ if (path && (path.isProgram() || path.isFile())) {
+ throw new Error("File/Program node, we can't possibly find a statement parent to this");
+ }
+
+ return path;
+}
+
+function getEarliestCommonAncestorFrom(paths) {
+ return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
+ let earliest;
+ const keys = t.VISITOR_KEYS[deepest.type];
+
+ for (const ancestry of ancestries) {
+ const path = ancestry[i + 1];
+
+ if (!earliest) {
+ earliest = path;
+ continue;
+ }
+
+ if (path.listKey && earliest.listKey === path.listKey) {
+ if (path.key < earliest.key) {
+ earliest = path;
+ continue;
+ }
+ }
+
+ const earliestKeyIndex = keys.indexOf(earliest.parentKey);
+ const currentKeyIndex = keys.indexOf(path.parentKey);
+
+ if (earliestKeyIndex > currentKeyIndex) {
+ earliest = path;
+ }
+ }
+
+ return earliest;
+ });
+}
+
+function getDeepestCommonAncestorFrom(paths, filter) {
+ if (!paths.length) {
+ return this;
+ }
+
+ if (paths.length === 1) {
+ return paths[0];
+ }
+
+ let minDepth = Infinity;
+ let lastCommonIndex, lastCommon;
+ const ancestries = paths.map(path => {
+ const ancestry = [];
+
+ do {
+ ancestry.unshift(path);
+ } while ((path = path.parentPath) && path !== this);
+
+ if (ancestry.length < minDepth) {
+ minDepth = ancestry.length;
+ }
+
+ return ancestry;
+ });
+ const first = ancestries[0];
+
+ depthLoop: for (let i = 0; i < minDepth; i++) {
+ const shouldMatch = first[i];
+
+ for (const ancestry of ancestries) {
+ if (ancestry[i] !== shouldMatch) {
+ break depthLoop;
+ }
+ }
+
+ lastCommonIndex = i;
+ lastCommon = shouldMatch;
+ }
+
+ if (lastCommon) {
+ if (filter) {
+ return filter(lastCommon, lastCommonIndex, ancestries);
+ } else {
+ return lastCommon;
+ }
+ } else {
+ throw new Error("Couldn't find intersection");
+ }
+}
+
+function getAncestry() {
+ let path = this;
+ const paths = [];
+
+ do {
+ paths.push(path);
+ } while (path = path.parentPath);
+
+ return paths;
+}
+
+function isAncestor(maybeDescendant) {
+ return maybeDescendant.isDescendant(this);
+}
+
+function isDescendant(maybeAncestor) {
+ return !!this.findParent(parent => parent === maybeAncestor);
+}
+
+function inType() {
+ let path = this;
+
+ while (path) {
+ for (const type of arguments) {
+ if (path.node.type === type) return true;
+ }
+
+ path = path.parentPath;
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js
new file mode 100644
index 00000000000..1e7f770243d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/comments.js
@@ -0,0 +1,41 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
+exports.addComment = addComment;
+exports.addComments = addComments;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function shareCommentsWithSiblings() {
+ if (typeof this.key === "string") return;
+ const node = this.node;
+ if (!node) return;
+ const trailing = node.trailingComments;
+ const leading = node.leadingComments;
+ if (!trailing && !leading) return;
+ const prev = this.getSibling(this.key - 1);
+ const next = this.getSibling(this.key + 1);
+ const hasPrev = Boolean(prev.node);
+ const hasNext = Boolean(next.node);
+
+ if (hasPrev && !hasNext) {
+ prev.addComments("trailing", trailing);
+ } else if (hasNext && !hasPrev) {
+ next.addComments("leading", leading);
+ }
+}
+
+function addComment(type, content, line) {
+ t.addComment(this.node, type, content, line);
+}
+
+function addComments(type, comments) {
+ t.addComments(this.node, type, comments);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js
new file mode 100644
index 00000000000..47ae8e8f6e1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/context.js
@@ -0,0 +1,253 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.call = call;
+exports._call = _call;
+exports.isBlacklisted = exports.isDenylisted = isDenylisted;
+exports.visit = visit;
+exports.skip = skip;
+exports.skipKey = skipKey;
+exports.stop = stop;
+exports.setScope = setScope;
+exports.setContext = setContext;
+exports.resync = resync;
+exports._resyncParent = _resyncParent;
+exports._resyncKey = _resyncKey;
+exports._resyncList = _resyncList;
+exports._resyncRemoved = _resyncRemoved;
+exports.popContext = popContext;
+exports.pushContext = pushContext;
+exports.setup = setup;
+exports.setKey = setKey;
+exports.requeue = requeue;
+exports._getQueueContexts = _getQueueContexts;
+
+var _index = _interopRequireDefault(require("../index"));
+
+var _index2 = require("./index");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function call(key) {
+ const opts = this.opts;
+ this.debug(key);
+
+ if (this.node) {
+ if (this._call(opts[key])) return true;
+ }
+
+ if (this.node) {
+ return this._call(opts[this.node.type] && opts[this.node.type][key]);
+ }
+
+ return false;
+}
+
+function _call(fns) {
+ if (!fns) return false;
+
+ for (const fn of fns) {
+ if (!fn) continue;
+ const node = this.node;
+ if (!node) return true;
+ const ret = fn.call(this.state, this, this.state);
+
+ if (ret && typeof ret === "object" && typeof ret.then === "function") {
+ throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+
+ if (ret) {
+ throw new Error(`Unexpected return value from visitor method ${fn}`);
+ }
+
+ if (this.node !== node) return true;
+ if (this._traverseFlags > 0) return true;
+ }
+
+ return false;
+}
+
+function isDenylisted() {
+ var _this$opts$denylist;
+
+ const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
+ return denylist && denylist.indexOf(this.node.type) > -1;
+}
+
+function visit() {
+ if (!this.node) {
+ return false;
+ }
+
+ if (this.isDenylisted()) {
+ return false;
+ }
+
+ if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
+ return false;
+ }
+
+ if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
+ this.debug("Skip...");
+ return this.shouldStop;
+ }
+
+ this.debug("Recursing into...");
+
+ _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
+
+ this.call("exit");
+ return this.shouldStop;
+}
+
+function skip() {
+ this.shouldSkip = true;
+}
+
+function skipKey(key) {
+ if (this.skipKeys == null) {
+ this.skipKeys = {};
+ }
+
+ this.skipKeys[key] = true;
+}
+
+function stop() {
+ this._traverseFlags |= _index2.SHOULD_SKIP | _index2.SHOULD_STOP;
+}
+
+function setScope() {
+ if (this.opts && this.opts.noScope) return;
+ let path = this.parentPath;
+ let target;
+
+ while (path && !target) {
+ if (path.opts && path.opts.noScope) return;
+ target = path.scope;
+ path = path.parentPath;
+ }
+
+ this.scope = this.getScope(target);
+ if (this.scope) this.scope.init();
+}
+
+function setContext(context) {
+ if (this.skipKeys != null) {
+ this.skipKeys = {};
+ }
+
+ this._traverseFlags = 0;
+
+ if (context) {
+ this.context = context;
+ this.state = context.state;
+ this.opts = context.opts;
+ }
+
+ this.setScope();
+ return this;
+}
+
+function resync() {
+ if (this.removed) return;
+
+ this._resyncParent();
+
+ this._resyncList();
+
+ this._resyncKey();
+}
+
+function _resyncParent() {
+ if (this.parentPath) {
+ this.parent = this.parentPath.node;
+ }
+}
+
+function _resyncKey() {
+ if (!this.container) return;
+ if (this.node === this.container[this.key]) return;
+
+ if (Array.isArray(this.container)) {
+ for (let i = 0; i < this.container.length; i++) {
+ if (this.container[i] === this.node) {
+ return this.setKey(i);
+ }
+ }
+ } else {
+ for (const key of Object.keys(this.container)) {
+ if (this.container[key] === this.node) {
+ return this.setKey(key);
+ }
+ }
+ }
+
+ this.key = null;
+}
+
+function _resyncList() {
+ if (!this.parent || !this.inList) return;
+ const newContainer = this.parent[this.listKey];
+ if (this.container === newContainer) return;
+ this.container = newContainer || null;
+}
+
+function _resyncRemoved() {
+ if (this.key == null || !this.container || this.container[this.key] !== this.node) {
+ this._markRemoved();
+ }
+}
+
+function popContext() {
+ this.contexts.pop();
+
+ if (this.contexts.length > 0) {
+ this.setContext(this.contexts[this.contexts.length - 1]);
+ } else {
+ this.setContext(undefined);
+ }
+}
+
+function pushContext(context) {
+ this.contexts.push(context);
+ this.setContext(context);
+}
+
+function setup(parentPath, container, listKey, key) {
+ this.listKey = listKey;
+ this.container = container;
+ this.parentPath = parentPath || this.parentPath;
+ this.setKey(key);
+}
+
+function setKey(key) {
+ var _this$node;
+
+ this.key = key;
+ this.node = this.container[this.key];
+ this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
+}
+
+function requeue(pathToQueue = this) {
+ if (pathToQueue.removed) return;
+ const contexts = this.contexts;
+
+ for (const context of contexts) {
+ context.maybeQueue(pathToQueue);
+ }
+}
+
+function _getQueueContexts() {
+ let path = this;
+ let contexts = this.contexts;
+
+ while (!contexts.length) {
+ path = path.parentPath;
+ if (!path) break;
+ contexts = path.contexts;
+ }
+
+ return contexts;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js
new file mode 100644
index 00000000000..f6a1198791c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/conversion.js
@@ -0,0 +1,428 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.toComputedKey = toComputedKey;
+exports.ensureBlock = ensureBlock;
+exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
+exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
+exports.arrowFunctionToExpression = arrowFunctionToExpression;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function toComputedKey() {
+ const node = this.node;
+ let key;
+
+ if (this.isMemberExpression()) {
+ key = node.property;
+ } else if (this.isProperty() || this.isMethod()) {
+ key = node.key;
+ } else {
+ throw new ReferenceError("todo");
+ }
+
+ if (!node.computed) {
+ if (t.isIdentifier(key)) key = t.stringLiteral(key.name);
+ }
+
+ return key;
+}
+
+function ensureBlock() {
+ const body = this.get("body");
+ const bodyNode = body.node;
+
+ if (Array.isArray(body)) {
+ throw new Error("Can't convert array path to a block statement");
+ }
+
+ if (!bodyNode) {
+ throw new Error("Can't convert node without a body");
+ }
+
+ if (body.isBlockStatement()) {
+ return bodyNode;
+ }
+
+ const statements = [];
+ let stringPath = "body";
+ let key;
+ let listKey;
+
+ if (body.isStatement()) {
+ listKey = "body";
+ key = 0;
+ statements.push(body.node);
+ } else {
+ stringPath += ".body.0";
+
+ if (this.isFunction()) {
+ key = "argument";
+ statements.push(t.returnStatement(body.node));
+ } else {
+ key = "expression";
+ statements.push(t.expressionStatement(body.node));
+ }
+ }
+
+ this.node.body = t.blockStatement(statements);
+ const parentPath = this.get(stringPath);
+ body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
+ return this.node;
+}
+
+function arrowFunctionToShadowed() {
+ if (!this.isArrowFunctionExpression()) return;
+ this.arrowFunctionToExpression();
+}
+
+function unwrapFunctionEnvironment() {
+ if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
+ throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
+ }
+
+ hoistFunctionEnvironment(this);
+}
+
+function arrowFunctionToExpression({
+ allowInsertArrow = true,
+ specCompliant = false
+} = {}) {
+ if (!this.isArrowFunctionExpression()) {
+ throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
+ }
+
+ const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow);
+ this.ensureBlock();
+ this.node.type = "FunctionExpression";
+
+ if (specCompliant) {
+ const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
+
+ if (checkBinding) {
+ this.parentPath.scope.push({
+ id: checkBinding,
+ init: t.objectExpression([])
+ });
+ }
+
+ this.get("body").unshiftContainer("body", t.expressionStatement(t.callExpression(this.hub.addHelper("newArrowCheck"), [t.thisExpression(), checkBinding ? t.identifier(checkBinding.name) : t.identifier(thisBinding)])));
+ this.replaceWith(t.callExpression(t.memberExpression((0, _helperFunctionName.default)(this, true) || this.node, t.identifier("bind")), [checkBinding ? t.identifier(checkBinding.name) : t.thisExpression()]));
+ }
+}
+
+function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) {
+ const thisEnvFn = fnPath.findParent(p => {
+ return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
+ static: false
+ });
+ });
+ const inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
+
+ if (thisEnvFn.isClassProperty()) {
+ throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
+ }
+
+ const {
+ thisPaths,
+ argumentsPaths,
+ newTargetPaths,
+ superProps,
+ superCalls
+ } = getScopeInformation(fnPath);
+
+ if (inConstructor && superCalls.length > 0) {
+ if (!allowInsertArrow) {
+ throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
+ }
+
+ const allSuperCalls = [];
+ thisEnvFn.traverse({
+ Function(child) {
+ if (child.isArrowFunctionExpression()) return;
+ child.skip();
+ },
+
+ ClassProperty(child) {
+ child.skip();
+ },
+
+ CallExpression(child) {
+ if (!child.get("callee").isSuper()) return;
+ allSuperCalls.push(child);
+ }
+
+ });
+ const superBinding = getSuperBinding(thisEnvFn);
+ allSuperCalls.forEach(superCall => {
+ const callee = t.identifier(superBinding);
+ callee.loc = superCall.node.callee.loc;
+ superCall.get("callee").replaceWith(callee);
+ });
+ }
+
+ if (argumentsPaths.length > 0) {
+ const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t.identifier("arguments"));
+ argumentsPaths.forEach(argumentsChild => {
+ const argsRef = t.identifier(argumentsBinding);
+ argsRef.loc = argumentsChild.node.loc;
+ argumentsChild.replaceWith(argsRef);
+ });
+ }
+
+ if (newTargetPaths.length > 0) {
+ const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t.metaProperty(t.identifier("new"), t.identifier("target")));
+ newTargetPaths.forEach(targetChild => {
+ const targetRef = t.identifier(newTargetBinding);
+ targetRef.loc = targetChild.node.loc;
+ targetChild.replaceWith(targetRef);
+ });
+ }
+
+ if (superProps.length > 0) {
+ if (!allowInsertArrow) {
+ throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
+ }
+
+ const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
+ flatSuperProps.forEach(superProp => {
+ const key = superProp.node.computed ? "" : superProp.get("property").node.name;
+ const isAssignment = superProp.parentPath.isAssignmentExpression({
+ left: superProp.node
+ });
+ const isCall = superProp.parentPath.isCallExpression({
+ callee: superProp.node
+ });
+ const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
+ const args = [];
+
+ if (superProp.node.computed) {
+ args.push(superProp.get("property").node);
+ }
+
+ if (isAssignment) {
+ const value = superProp.parentPath.node.right;
+ args.push(value);
+ }
+
+ const call = t.callExpression(t.identifier(superBinding), args);
+
+ if (isCall) {
+ superProp.parentPath.unshiftContainer("arguments", t.thisExpression());
+ superProp.replaceWith(t.memberExpression(call, t.identifier("call")));
+ thisPaths.push(superProp.parentPath.get("arguments.0"));
+ } else if (isAssignment) {
+ superProp.parentPath.replaceWith(call);
+ } else {
+ superProp.replaceWith(call);
+ }
+ });
+ }
+
+ let thisBinding;
+
+ if (thisPaths.length > 0 || specCompliant) {
+ thisBinding = getThisBinding(thisEnvFn, inConstructor);
+
+ if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) {
+ thisPaths.forEach(thisChild => {
+ const thisRef = thisChild.isJSX() ? t.jsxIdentifier(thisBinding) : t.identifier(thisBinding);
+ thisRef.loc = thisChild.node.loc;
+ thisChild.replaceWith(thisRef);
+ });
+ if (specCompliant) thisBinding = null;
+ }
+ }
+
+ return thisBinding;
+}
+
+function standardizeSuperProperty(superProp) {
+ if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
+ const assignmentPath = superProp.parentPath;
+ const op = assignmentPath.node.operator.slice(0, -1);
+ const value = assignmentPath.node.right;
+ assignmentPath.node.operator = "=";
+
+ if (superProp.node.computed) {
+ const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
+ assignmentPath.get("left").replaceWith(t.memberExpression(superProp.node.object, t.assignmentExpression("=", tmp, superProp.node.property), true));
+ assignmentPath.get("right").replaceWith(t.binaryExpression(op, t.memberExpression(superProp.node.object, t.identifier(tmp.name), true), value));
+ } else {
+ assignmentPath.get("left").replaceWith(t.memberExpression(superProp.node.object, superProp.node.property));
+ assignmentPath.get("right").replaceWith(t.binaryExpression(op, t.memberExpression(superProp.node.object, t.identifier(superProp.node.property.name)), value));
+ }
+
+ return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
+ } else if (superProp.parentPath.isUpdateExpression()) {
+ const updateExpr = superProp.parentPath;
+ const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
+ const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
+ const parts = [t.assignmentExpression("=", tmp, t.memberExpression(superProp.node.object, computedKey ? t.assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t.assignmentExpression("=", t.memberExpression(superProp.node.object, computedKey ? t.identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t.binaryExpression("+", t.identifier(tmp.name), t.numericLiteral(1)))];
+
+ if (!superProp.parentPath.node.prefix) {
+ parts.push(t.identifier(tmp.name));
+ }
+
+ updateExpr.replaceWith(t.sequenceExpression(parts));
+ const left = updateExpr.get("expressions.0.right");
+ const right = updateExpr.get("expressions.1.left");
+ return [left, right];
+ }
+
+ return [superProp];
+}
+
+function hasSuperClass(thisEnvFn) {
+ return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
+}
+
+function getThisBinding(thisEnvFn, inConstructor) {
+ return getBinding(thisEnvFn, "this", thisBinding => {
+ if (!inConstructor || !hasSuperClass(thisEnvFn)) return t.thisExpression();
+ const supers = new WeakSet();
+ thisEnvFn.traverse({
+ Function(child) {
+ if (child.isArrowFunctionExpression()) return;
+ child.skip();
+ },
+
+ ClassProperty(child) {
+ child.skip();
+ },
+
+ CallExpression(child) {
+ if (!child.get("callee").isSuper()) return;
+ if (supers.has(child.node)) return;
+ supers.add(child.node);
+ child.replaceWithMultiple([child.node, t.assignmentExpression("=", t.identifier(thisBinding), t.identifier("this"))]);
+ }
+
+ });
+ });
+}
+
+function getSuperBinding(thisEnvFn) {
+ return getBinding(thisEnvFn, "supercall", () => {
+ const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
+ return t.arrowFunctionExpression([t.restElement(argsBinding)], t.callExpression(t.super(), [t.spreadElement(t.identifier(argsBinding.name))]));
+ });
+}
+
+function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
+ const op = isAssignment ? "set" : "get";
+ return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
+ const argsList = [];
+ let fnBody;
+
+ if (propName) {
+ fnBody = t.memberExpression(t.super(), t.identifier(propName));
+ } else {
+ const method = thisEnvFn.scope.generateUidIdentifier("prop");
+ argsList.unshift(method);
+ fnBody = t.memberExpression(t.super(), t.identifier(method.name), true);
+ }
+
+ if (isAssignment) {
+ const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
+ argsList.push(valueIdent);
+ fnBody = t.assignmentExpression("=", fnBody, t.identifier(valueIdent.name));
+ }
+
+ return t.arrowFunctionExpression(argsList, fnBody);
+ });
+}
+
+function getBinding(thisEnvFn, key, init) {
+ const cacheKey = "binding:" + key;
+ let data = thisEnvFn.getData(cacheKey);
+
+ if (!data) {
+ const id = thisEnvFn.scope.generateUidIdentifier(key);
+ data = id.name;
+ thisEnvFn.setData(cacheKey, data);
+ thisEnvFn.scope.push({
+ id: id,
+ init: init(data)
+ });
+ }
+
+ return data;
+}
+
+function getScopeInformation(fnPath) {
+ const thisPaths = [];
+ const argumentsPaths = [];
+ const newTargetPaths = [];
+ const superProps = [];
+ const superCalls = [];
+ fnPath.traverse({
+ ClassProperty(child) {
+ child.skip();
+ },
+
+ Function(child) {
+ if (child.isArrowFunctionExpression()) return;
+ child.skip();
+ },
+
+ ThisExpression(child) {
+ thisPaths.push(child);
+ },
+
+ JSXIdentifier(child) {
+ if (child.node.name !== "this") return;
+
+ if (!child.parentPath.isJSXMemberExpression({
+ object: child.node
+ }) && !child.parentPath.isJSXOpeningElement({
+ name: child.node
+ })) {
+ return;
+ }
+
+ thisPaths.push(child);
+ },
+
+ CallExpression(child) {
+ if (child.get("callee").isSuper()) superCalls.push(child);
+ },
+
+ MemberExpression(child) {
+ if (child.get("object").isSuper()) superProps.push(child);
+ },
+
+ ReferencedIdentifier(child) {
+ if (child.node.name !== "arguments") return;
+ argumentsPaths.push(child);
+ },
+
+ MetaProperty(child) {
+ if (!child.get("meta").isIdentifier({
+ name: "new"
+ })) return;
+ if (!child.get("property").isIdentifier({
+ name: "target"
+ })) return;
+ newTargetPaths.push(child);
+ }
+
+ });
+ return {
+ thisPaths,
+ argumentsPaths,
+ newTargetPaths,
+ superProps,
+ superCalls
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js
new file mode 100644
index 00000000000..61dfd0b039b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/evaluation.js
@@ -0,0 +1,404 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.evaluateTruthy = evaluateTruthy;
+exports.evaluate = evaluate;
+const VALID_CALLEES = ["String", "Number", "Math"];
+const INVALID_METHODS = ["random"];
+
+function evaluateTruthy() {
+ const res = this.evaluate();
+ if (res.confident) return !!res.value;
+}
+
+function deopt(path, state) {
+ if (!state.confident) return;
+ state.deoptPath = path;
+ state.confident = false;
+}
+
+function evaluateCached(path, state) {
+ const {
+ node
+ } = path;
+ const {
+ seen
+ } = state;
+
+ if (seen.has(node)) {
+ const existing = seen.get(node);
+
+ if (existing.resolved) {
+ return existing.value;
+ } else {
+ deopt(path, state);
+ return;
+ }
+ } else {
+ const item = {
+ resolved: false
+ };
+ seen.set(node, item);
+
+ const val = _evaluate(path, state);
+
+ if (state.confident) {
+ item.resolved = true;
+ item.value = val;
+ }
+
+ return val;
+ }
+}
+
+function _evaluate(path, state) {
+ if (!state.confident) return;
+ const {
+ node
+ } = path;
+
+ if (path.isSequenceExpression()) {
+ const exprs = path.get("expressions");
+ return evaluateCached(exprs[exprs.length - 1], state);
+ }
+
+ if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
+ return node.value;
+ }
+
+ if (path.isNullLiteral()) {
+ return null;
+ }
+
+ if (path.isTemplateLiteral()) {
+ return evaluateQuasis(path, node.quasis, state);
+ }
+
+ if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
+ const object = path.get("tag.object");
+ const {
+ node: {
+ name
+ }
+ } = object;
+ const property = path.get("tag.property");
+
+ if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") {
+ return evaluateQuasis(path, node.quasi.quasis, state, true);
+ }
+ }
+
+ if (path.isConditionalExpression()) {
+ const testResult = evaluateCached(path.get("test"), state);
+ if (!state.confident) return;
+
+ if (testResult) {
+ return evaluateCached(path.get("consequent"), state);
+ } else {
+ return evaluateCached(path.get("alternate"), state);
+ }
+ }
+
+ if (path.isExpressionWrapper()) {
+ return evaluateCached(path.get("expression"), state);
+ }
+
+ if (path.isMemberExpression() && !path.parentPath.isCallExpression({
+ callee: node
+ })) {
+ const property = path.get("property");
+ const object = path.get("object");
+
+ if (object.isLiteral() && property.isIdentifier()) {
+ const value = object.node.value;
+ const type = typeof value;
+
+ if (type === "number" || type === "string") {
+ return value[property.node.name];
+ }
+ }
+ }
+
+ if (path.isReferencedIdentifier()) {
+ const binding = path.scope.getBinding(node.name);
+
+ if (binding && binding.constantViolations.length > 0) {
+ return deopt(binding.path, state);
+ }
+
+ if (binding && path.node.start < binding.path.node.end) {
+ return deopt(binding.path, state);
+ }
+
+ if (binding == null ? void 0 : binding.hasValue) {
+ return binding.value;
+ } else {
+ if (node.name === "undefined") {
+ return binding ? deopt(binding.path, state) : undefined;
+ } else if (node.name === "Infinity") {
+ return binding ? deopt(binding.path, state) : Infinity;
+ } else if (node.name === "NaN") {
+ return binding ? deopt(binding.path, state) : NaN;
+ }
+
+ const resolved = path.resolve();
+
+ if (resolved === path) {
+ return deopt(path, state);
+ } else {
+ return evaluateCached(resolved, state);
+ }
+ }
+ }
+
+ if (path.isUnaryExpression({
+ prefix: true
+ })) {
+ if (node.operator === "void") {
+ return undefined;
+ }
+
+ const argument = path.get("argument");
+
+ if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
+ return "function";
+ }
+
+ const arg = evaluateCached(argument, state);
+ if (!state.confident) return;
+
+ switch (node.operator) {
+ case "!":
+ return !arg;
+
+ case "+":
+ return +arg;
+
+ case "-":
+ return -arg;
+
+ case "~":
+ return ~arg;
+
+ case "typeof":
+ return typeof arg;
+ }
+ }
+
+ if (path.isArrayExpression()) {
+ const arr = [];
+ const elems = path.get("elements");
+
+ for (const elem of elems) {
+ const elemValue = elem.evaluate();
+
+ if (elemValue.confident) {
+ arr.push(elemValue.value);
+ } else {
+ return deopt(elemValue.deopt, state);
+ }
+ }
+
+ return arr;
+ }
+
+ if (path.isObjectExpression()) {
+ const obj = {};
+ const props = path.get("properties");
+
+ for (const prop of props) {
+ if (prop.isObjectMethod() || prop.isSpreadElement()) {
+ return deopt(prop, state);
+ }
+
+ const keyPath = prop.get("key");
+ let key = keyPath;
+
+ if (prop.node.computed) {
+ key = key.evaluate();
+
+ if (!key.confident) {
+ return deopt(key.deopt, state);
+ }
+
+ key = key.value;
+ } else if (key.isIdentifier()) {
+ key = key.node.name;
+ } else {
+ key = key.node.value;
+ }
+
+ const valuePath = prop.get("value");
+ let value = valuePath.evaluate();
+
+ if (!value.confident) {
+ return deopt(value.deopt, state);
+ }
+
+ value = value.value;
+ obj[key] = value;
+ }
+
+ return obj;
+ }
+
+ if (path.isLogicalExpression()) {
+ const wasConfident = state.confident;
+ const left = evaluateCached(path.get("left"), state);
+ const leftConfident = state.confident;
+ state.confident = wasConfident;
+ const right = evaluateCached(path.get("right"), state);
+ const rightConfident = state.confident;
+
+ switch (node.operator) {
+ case "||":
+ state.confident = leftConfident && (!!left || rightConfident);
+ if (!state.confident) return;
+ return left || right;
+
+ case "&&":
+ state.confident = leftConfident && (!left || rightConfident);
+ if (!state.confident) return;
+ return left && right;
+ }
+ }
+
+ if (path.isBinaryExpression()) {
+ const left = evaluateCached(path.get("left"), state);
+ if (!state.confident) return;
+ const right = evaluateCached(path.get("right"), state);
+ if (!state.confident) return;
+
+ switch (node.operator) {
+ case "-":
+ return left - right;
+
+ case "+":
+ return left + right;
+
+ case "/":
+ return left / right;
+
+ case "*":
+ return left * right;
+
+ case "%":
+ return left % right;
+
+ case "**":
+ return Math.pow(left, right);
+
+ case "<":
+ return left < right;
+
+ case ">":
+ return left > right;
+
+ case "<=":
+ return left <= right;
+
+ case ">=":
+ return left >= right;
+
+ case "==":
+ return left == right;
+
+ case "!=":
+ return left != right;
+
+ case "===":
+ return left === right;
+
+ case "!==":
+ return left !== right;
+
+ case "|":
+ return left | right;
+
+ case "&":
+ return left & right;
+
+ case "^":
+ return left ^ right;
+
+ case "<<":
+ return left << right;
+
+ case ">>":
+ return left >> right;
+
+ case ">>>":
+ return left >>> right;
+ }
+ }
+
+ if (path.isCallExpression()) {
+ const callee = path.get("callee");
+ let context;
+ let func;
+
+ if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
+ func = global[node.callee.name];
+ }
+
+ if (callee.isMemberExpression()) {
+ const object = callee.get("object");
+ const property = callee.get("property");
+
+ if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
+ context = global[object.node.name];
+ func = context[property.node.name];
+ }
+
+ if (object.isLiteral() && property.isIdentifier()) {
+ const type = typeof object.node.value;
+
+ if (type === "string" || type === "number") {
+ context = object.node.value;
+ func = context[property.node.name];
+ }
+ }
+ }
+
+ if (func) {
+ const args = path.get("arguments").map(arg => evaluateCached(arg, state));
+ if (!state.confident) return;
+ return func.apply(context, args);
+ }
+ }
+
+ deopt(path, state);
+}
+
+function evaluateQuasis(path, quasis, state, raw = false) {
+ let str = "";
+ let i = 0;
+ const exprs = path.get("expressions");
+
+ for (const elem of quasis) {
+ if (!state.confident) break;
+ str += raw ? elem.value.raw : elem.value.cooked;
+ const expr = exprs[i++];
+ if (expr) str += String(evaluateCached(expr, state));
+ }
+
+ if (!state.confident) return;
+ return str;
+}
+
+function evaluate() {
+ const state = {
+ confident: true,
+ deoptPath: null,
+ seen: new Map()
+ };
+ let value = evaluateCached(this, state);
+ if (!state.confident) value = undefined;
+ return {
+ confident: state.confident,
+ deopt: state.deoptPath,
+ value: value
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js
new file mode 100644
index 00000000000..4134df72494
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/family.js
@@ -0,0 +1,303 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getOpposite = getOpposite;
+exports.getCompletionRecords = getCompletionRecords;
+exports.getSibling = getSibling;
+exports.getPrevSibling = getPrevSibling;
+exports.getNextSibling = getNextSibling;
+exports.getAllNextSiblings = getAllNextSiblings;
+exports.getAllPrevSiblings = getAllPrevSiblings;
+exports.get = get;
+exports._getKey = _getKey;
+exports._getPattern = _getPattern;
+exports.getBindingIdentifiers = getBindingIdentifiers;
+exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
+exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
+exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
+
+var _index = _interopRequireDefault(require("./index"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getOpposite() {
+ if (this.key === "left") {
+ return this.getSibling("right");
+ } else if (this.key === "right") {
+ return this.getSibling("left");
+ }
+}
+
+function addCompletionRecords(path, paths) {
+ if (path) return paths.concat(path.getCompletionRecords());
+ return paths;
+}
+
+function findBreak(statements) {
+ let breakStatement;
+
+ if (!Array.isArray(statements)) {
+ statements = [statements];
+ }
+
+ for (const statement of statements) {
+ if (statement.isDoExpression() || statement.isProgram() || statement.isBlockStatement() || statement.isCatchClause() || statement.isLabeledStatement()) {
+ breakStatement = findBreak(statement.get("body"));
+ } else if (statement.isIfStatement()) {
+ var _findBreak;
+
+ breakStatement = (_findBreak = findBreak(statement.get("consequent"))) != null ? _findBreak : findBreak(statement.get("alternate"));
+ } else if (statement.isTryStatement()) {
+ var _findBreak2;
+
+ breakStatement = (_findBreak2 = findBreak(statement.get("block"))) != null ? _findBreak2 : findBreak(statement.get("handler"));
+ } else if (statement.isBreakStatement()) {
+ breakStatement = statement;
+ }
+
+ if (breakStatement) {
+ return breakStatement;
+ }
+ }
+
+ return null;
+}
+
+function completionRecordForSwitch(cases, paths) {
+ let isLastCaseWithConsequent = true;
+
+ for (let i = cases.length - 1; i >= 0; i--) {
+ const switchCase = cases[i];
+ const consequent = switchCase.get("consequent");
+ let breakStatement = findBreak(consequent);
+
+ if (breakStatement) {
+ while (breakStatement.key === 0 && breakStatement.parentPath.isBlockStatement()) {
+ breakStatement = breakStatement.parentPath;
+ }
+
+ const prevSibling = breakStatement.getPrevSibling();
+
+ if (breakStatement.key > 0 && (prevSibling.isExpressionStatement() || prevSibling.isBlockStatement())) {
+ paths = addCompletionRecords(prevSibling, paths);
+ breakStatement.remove();
+ } else {
+ breakStatement.replaceWith(breakStatement.scope.buildUndefinedNode());
+ paths = addCompletionRecords(breakStatement, paths);
+ }
+ } else if (isLastCaseWithConsequent) {
+ const statementFinder = statement => !statement.isBlockStatement() || statement.get("body").some(statementFinder);
+
+ const hasConsequent = consequent.some(statementFinder);
+
+ if (hasConsequent) {
+ paths = addCompletionRecords(consequent[consequent.length - 1], paths);
+ isLastCaseWithConsequent = false;
+ }
+ }
+ }
+
+ return paths;
+}
+
+function getCompletionRecords() {
+ let paths = [];
+
+ if (this.isIfStatement()) {
+ paths = addCompletionRecords(this.get("consequent"), paths);
+ paths = addCompletionRecords(this.get("alternate"), paths);
+ } else if (this.isDoExpression() || this.isFor() || this.isWhile()) {
+ paths = addCompletionRecords(this.get("body"), paths);
+ } else if (this.isProgram() || this.isBlockStatement()) {
+ paths = addCompletionRecords(this.get("body").pop(), paths);
+ } else if (this.isFunction()) {
+ return this.get("body").getCompletionRecords();
+ } else if (this.isTryStatement()) {
+ paths = addCompletionRecords(this.get("block"), paths);
+ paths = addCompletionRecords(this.get("handler"), paths);
+ } else if (this.isCatchClause()) {
+ paths = addCompletionRecords(this.get("body"), paths);
+ } else if (this.isSwitchStatement()) {
+ paths = completionRecordForSwitch(this.get("cases"), paths);
+ } else {
+ paths.push(this);
+ }
+
+ return paths;
+}
+
+function getSibling(key) {
+ return _index.default.get({
+ parentPath: this.parentPath,
+ parent: this.parent,
+ container: this.container,
+ listKey: this.listKey,
+ key: key
+ }).setContext(this.context);
+}
+
+function getPrevSibling() {
+ return this.getSibling(this.key - 1);
+}
+
+function getNextSibling() {
+ return this.getSibling(this.key + 1);
+}
+
+function getAllNextSiblings() {
+ let _key = this.key;
+ let sibling = this.getSibling(++_key);
+ const siblings = [];
+
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(++_key);
+ }
+
+ return siblings;
+}
+
+function getAllPrevSiblings() {
+ let _key = this.key;
+ let sibling = this.getSibling(--_key);
+ const siblings = [];
+
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(--_key);
+ }
+
+ return siblings;
+}
+
+function get(key, context = true) {
+ if (context === true) context = this.context;
+ const parts = key.split(".");
+
+ if (parts.length === 1) {
+ return this._getKey(key, context);
+ } else {
+ return this._getPattern(parts, context);
+ }
+}
+
+function _getKey(key, context) {
+ const node = this.node;
+ const container = node[key];
+
+ if (Array.isArray(container)) {
+ return container.map((_, i) => {
+ return _index.default.get({
+ listKey: key,
+ parentPath: this,
+ parent: node,
+ container: container,
+ key: i
+ }).setContext(context);
+ });
+ } else {
+ return _index.default.get({
+ parentPath: this,
+ parent: node,
+ container: node,
+ key: key
+ }).setContext(context);
+ }
+}
+
+function _getPattern(parts, context) {
+ let path = this;
+
+ for (const part of parts) {
+ if (part === ".") {
+ path = path.parentPath;
+ } else {
+ if (Array.isArray(path)) {
+ path = path[part];
+ } else {
+ path = path.get(part, context);
+ }
+ }
+ }
+
+ return path;
+}
+
+function getBindingIdentifiers(duplicates) {
+ return t.getBindingIdentifiers(this.node, duplicates);
+}
+
+function getOuterBindingIdentifiers(duplicates) {
+ return t.getOuterBindingIdentifiers(this.node, duplicates);
+}
+
+function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
+ const path = this;
+ let search = [].concat(path);
+ const ids = Object.create(null);
+
+ while (search.length) {
+ const id = search.shift();
+ if (!id) continue;
+ if (!id.node) continue;
+ const keys = t.getBindingIdentifiers.keys[id.node.type];
+
+ if (id.isIdentifier()) {
+ if (duplicates) {
+ const _ids = ids[id.node.name] = ids[id.node.name] || [];
+
+ _ids.push(id);
+ } else {
+ ids[id.node.name] = id;
+ }
+
+ continue;
+ }
+
+ if (id.isExportDeclaration()) {
+ const declaration = id.get("declaration");
+
+ if (declaration.isDeclaration()) {
+ search.push(declaration);
+ }
+
+ continue;
+ }
+
+ if (outerOnly) {
+ if (id.isFunctionDeclaration()) {
+ search.push(id.get("id"));
+ continue;
+ }
+
+ if (id.isFunctionExpression()) {
+ continue;
+ }
+ }
+
+ if (keys) {
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+ const child = id.get(key);
+
+ if (Array.isArray(child) || child.node) {
+ search = search.concat(child);
+ }
+ }
+ }
+ }
+
+ return ids;
+}
+
+function getOuterBindingIdentifierPaths(duplicates) {
+ return this.getBindingIdentifierPaths(duplicates, true);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js
new file mode 100644
index 00000000000..f4aa9ba1714
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/index.js
@@ -0,0 +1,250 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.SHOULD_SKIP = exports.SHOULD_STOP = exports.REMOVED = void 0;
+
+var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types"));
+
+var _debug = _interopRequireDefault(require("debug"));
+
+var _index = _interopRequireDefault(require("../index"));
+
+var _scope = _interopRequireDefault(require("../scope"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _cache = require("../cache");
+
+var _generator = _interopRequireDefault(require("@babel/generator"));
+
+var NodePath_ancestry = _interopRequireWildcard(require("./ancestry"));
+
+var NodePath_inference = _interopRequireWildcard(require("./inference"));
+
+var NodePath_replacement = _interopRequireWildcard(require("./replacement"));
+
+var NodePath_evaluation = _interopRequireWildcard(require("./evaluation"));
+
+var NodePath_conversion = _interopRequireWildcard(require("./conversion"));
+
+var NodePath_introspection = _interopRequireWildcard(require("./introspection"));
+
+var NodePath_context = _interopRequireWildcard(require("./context"));
+
+var NodePath_removal = _interopRequireWildcard(require("./removal"));
+
+var NodePath_modification = _interopRequireWildcard(require("./modification"));
+
+var NodePath_family = _interopRequireWildcard(require("./family"));
+
+var NodePath_comments = _interopRequireWildcard(require("./comments"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const debug = (0, _debug.default)("babel");
+const REMOVED = 1 << 0;
+exports.REMOVED = REMOVED;
+const SHOULD_STOP = 1 << 1;
+exports.SHOULD_STOP = SHOULD_STOP;
+const SHOULD_SKIP = 1 << 2;
+exports.SHOULD_SKIP = SHOULD_SKIP;
+
+class NodePath {
+ constructor(hub, parent) {
+ this.contexts = [];
+ this.state = null;
+ this.opts = null;
+ this._traverseFlags = 0;
+ this.skipKeys = null;
+ this.parentPath = null;
+ this.container = null;
+ this.listKey = null;
+ this.key = null;
+ this.node = null;
+ this.type = null;
+ this.parent = parent;
+ this.hub = hub;
+ this.data = null;
+ this.context = null;
+ this.scope = null;
+ }
+
+ static get({
+ hub,
+ parentPath,
+ parent,
+ container,
+ listKey,
+ key
+ }) {
+ if (!hub && parentPath) {
+ hub = parentPath.hub;
+ }
+
+ if (!parent) {
+ throw new Error("To get a node path the parent needs to exist");
+ }
+
+ const targetNode = container[key];
+
+ let paths = _cache.path.get(parent);
+
+ if (!paths) {
+ paths = new Map();
+
+ _cache.path.set(parent, paths);
+ }
+
+ let path = paths.get(targetNode);
+
+ if (!path) {
+ path = new NodePath(hub, parent);
+ if (targetNode) paths.set(targetNode, path);
+ }
+
+ path.setup(parentPath, container, listKey, key);
+ return path;
+ }
+
+ getScope(scope) {
+ return this.isScope() ? new _scope.default(this) : scope;
+ }
+
+ setData(key, val) {
+ if (this.data == null) {
+ this.data = Object.create(null);
+ }
+
+ return this.data[key] = val;
+ }
+
+ getData(key, def) {
+ if (this.data == null) {
+ this.data = Object.create(null);
+ }
+
+ let val = this.data[key];
+ if (val === undefined && def !== undefined) val = this.data[key] = def;
+ return val;
+ }
+
+ buildCodeFrameError(msg, Error = SyntaxError) {
+ return this.hub.buildError(this.node, msg, Error);
+ }
+
+ traverse(visitor, state) {
+ (0, _index.default)(this.node, visitor, this.scope, state, this);
+ }
+
+ set(key, node) {
+ t.validate(this.node, key, node);
+ this.node[key] = node;
+ }
+
+ getPathLocation() {
+ const parts = [];
+ let path = this;
+
+ do {
+ let key = path.key;
+ if (path.inList) key = `${path.listKey}[${key}]`;
+ parts.unshift(key);
+ } while (path = path.parentPath);
+
+ return parts.join(".");
+ }
+
+ debug(message) {
+ if (!debug.enabled) return;
+ debug(`${this.getPathLocation()} ${this.type}: ${message}`);
+ }
+
+ toString() {
+ return (0, _generator.default)(this.node).code;
+ }
+
+ get inList() {
+ return !!this.listKey;
+ }
+
+ set inList(inList) {
+ if (!inList) {
+ this.listKey = null;
+ }
+ }
+
+ get parentKey() {
+ return this.listKey || this.key;
+ }
+
+ get shouldSkip() {
+ return !!(this._traverseFlags & SHOULD_SKIP);
+ }
+
+ set shouldSkip(v) {
+ if (v) {
+ this._traverseFlags |= SHOULD_SKIP;
+ } else {
+ this._traverseFlags &= ~SHOULD_SKIP;
+ }
+ }
+
+ get shouldStop() {
+ return !!(this._traverseFlags & SHOULD_STOP);
+ }
+
+ set shouldStop(v) {
+ if (v) {
+ this._traverseFlags |= SHOULD_STOP;
+ } else {
+ this._traverseFlags &= ~SHOULD_STOP;
+ }
+ }
+
+ get removed() {
+ return !!(this._traverseFlags & REMOVED);
+ }
+
+ set removed(v) {
+ if (v) {
+ this._traverseFlags |= REMOVED;
+ } else {
+ this._traverseFlags &= ~REMOVED;
+ }
+ }
+
+}
+
+exports.default = NodePath;
+Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
+
+for (const type of t.TYPES) {
+ const typeKey = `is${type}`;
+ const fn = t[typeKey];
+
+ NodePath.prototype[typeKey] = function (opts) {
+ return fn(this.node, opts);
+ };
+
+ NodePath.prototype[`assert${type}`] = function (opts) {
+ if (!fn(this.node, opts)) {
+ throw new TypeError(`Expected node path of type ${type}`);
+ }
+ };
+}
+
+for (const type of Object.keys(virtualTypes)) {
+ if (type[0] === "_") continue;
+ if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
+ const virtualType = virtualTypes[type];
+
+ NodePath.prototype[`is${type}`] = function (opts) {
+ return virtualType.checkPath(this, opts);
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js
new file mode 100644
index 00000000000..85efbe3b697
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/index.js
@@ -0,0 +1,140 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getTypeAnnotation = getTypeAnnotation;
+exports._getTypeAnnotation = _getTypeAnnotation;
+exports.isBaseType = isBaseType;
+exports.couldBeBaseType = couldBeBaseType;
+exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
+exports.isGenericType = isGenericType;
+
+var inferers = _interopRequireWildcard(require("./inferers"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function getTypeAnnotation() {
+ if (this.typeAnnotation) return this.typeAnnotation;
+ let type = this._getTypeAnnotation() || t.anyTypeAnnotation();
+ if (t.isTypeAnnotation(type)) type = type.typeAnnotation;
+ return this.typeAnnotation = type;
+}
+
+const typeAnnotationInferringNodes = new WeakSet();
+
+function _getTypeAnnotation() {
+ const node = this.node;
+
+ if (!node) {
+ if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
+ const declar = this.parentPath.parentPath;
+ const declarParent = declar.parentPath;
+
+ if (declar.key === "left" && declarParent.isForInStatement()) {
+ return t.stringTypeAnnotation();
+ }
+
+ if (declar.key === "left" && declarParent.isForOfStatement()) {
+ return t.anyTypeAnnotation();
+ }
+
+ return t.voidTypeAnnotation();
+ } else {
+ return;
+ }
+ }
+
+ if (node.typeAnnotation) {
+ return node.typeAnnotation;
+ }
+
+ if (typeAnnotationInferringNodes.has(node)) {
+ return;
+ }
+
+ typeAnnotationInferringNodes.add(node);
+
+ try {
+ var _inferer;
+
+ let inferer = inferers[node.type];
+
+ if (inferer) {
+ return inferer.call(this, node);
+ }
+
+ inferer = inferers[this.parentPath.type];
+
+ if ((_inferer = inferer) == null ? void 0 : _inferer.validParent) {
+ return this.parentPath.getTypeAnnotation();
+ }
+ } finally {
+ typeAnnotationInferringNodes.delete(node);
+ }
+}
+
+function isBaseType(baseName, soft) {
+ return _isBaseType(baseName, this.getTypeAnnotation(), soft);
+}
+
+function _isBaseType(baseName, type, soft) {
+ if (baseName === "string") {
+ return t.isStringTypeAnnotation(type);
+ } else if (baseName === "number") {
+ return t.isNumberTypeAnnotation(type);
+ } else if (baseName === "boolean") {
+ return t.isBooleanTypeAnnotation(type);
+ } else if (baseName === "any") {
+ return t.isAnyTypeAnnotation(type);
+ } else if (baseName === "mixed") {
+ return t.isMixedTypeAnnotation(type);
+ } else if (baseName === "empty") {
+ return t.isEmptyTypeAnnotation(type);
+ } else if (baseName === "void") {
+ return t.isVoidTypeAnnotation(type);
+ } else {
+ if (soft) {
+ return false;
+ } else {
+ throw new Error(`Unknown base type ${baseName}`);
+ }
+ }
+}
+
+function couldBeBaseType(name) {
+ const type = this.getTypeAnnotation();
+ if (t.isAnyTypeAnnotation(type)) return true;
+
+ if (t.isUnionTypeAnnotation(type)) {
+ for (const type2 of type.types) {
+ if (t.isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
+ return true;
+ }
+ }
+
+ return false;
+ } else {
+ return _isBaseType(name, type, true);
+ }
+}
+
+function baseTypeStrictlyMatches(right) {
+ const left = this.getTypeAnnotation();
+ right = right.getTypeAnnotation();
+
+ if (!t.isAnyTypeAnnotation(left) && t.isFlowBaseAnnotation(left)) {
+ return right.type === left.type;
+ }
+}
+
+function isGenericType(genericName) {
+ const type = this.getTypeAnnotation();
+ return t.isGenericTypeAnnotation(type) && t.isIdentifier(type.id, {
+ name: genericName
+ });
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
new file mode 100644
index 00000000000..d890af241f1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
@@ -0,0 +1,199 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _default(node) {
+ if (!this.isReferenced()) return;
+ const binding = this.scope.getBinding(node.name);
+
+ if (binding) {
+ if (binding.identifier.typeAnnotation) {
+ return binding.identifier.typeAnnotation;
+ } else {
+ return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
+ }
+ }
+
+ if (node.name === "undefined") {
+ return t.voidTypeAnnotation();
+ } else if (node.name === "NaN" || node.name === "Infinity") {
+ return t.numberTypeAnnotation();
+ } else if (node.name === "arguments") {}
+}
+
+function getTypeAnnotationBindingConstantViolations(binding, path, name) {
+ const types = [];
+ const functionConstantViolations = [];
+ let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
+ const testType = getConditionalAnnotation(binding, path, name);
+
+ if (testType) {
+ const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
+ constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0);
+ types.push(testType.typeAnnotation);
+ }
+
+ if (constantViolations.length) {
+ constantViolations = constantViolations.concat(functionConstantViolations);
+
+ for (const violation of constantViolations) {
+ types.push(violation.getTypeAnnotation());
+ }
+ }
+
+ if (!types.length) {
+ return;
+ }
+
+ if (t.isTSTypeAnnotation(types[0]) && t.createTSUnionType) {
+ return t.createTSUnionType(types);
+ }
+
+ if (t.createFlowUnionType) {
+ return t.createFlowUnionType(types);
+ }
+
+ return t.createUnionTypeAnnotation(types);
+}
+
+function getConstantViolationsBefore(binding, path, functions) {
+ const violations = binding.constantViolations.slice();
+ violations.unshift(binding.path);
+ return violations.filter(violation => {
+ violation = violation.resolve();
+
+ const status = violation._guessExecutionStatusRelativeTo(path);
+
+ if (functions && status === "unknown") functions.push(violation);
+ return status === "before";
+ });
+}
+
+function inferAnnotationFromBinaryExpression(name, path) {
+ const operator = path.node.operator;
+ const right = path.get("right").resolve();
+ const left = path.get("left").resolve();
+ let target;
+
+ if (left.isIdentifier({
+ name
+ })) {
+ target = right;
+ } else if (right.isIdentifier({
+ name
+ })) {
+ target = left;
+ }
+
+ if (target) {
+ if (operator === "===") {
+ return target.getTypeAnnotation();
+ }
+
+ if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.numberTypeAnnotation();
+ }
+
+ return;
+ }
+
+ if (operator !== "===" && operator !== "==") return;
+ let typeofPath;
+ let typePath;
+
+ if (left.isUnaryExpression({
+ operator: "typeof"
+ })) {
+ typeofPath = left;
+ typePath = right;
+ } else if (right.isUnaryExpression({
+ operator: "typeof"
+ })) {
+ typeofPath = right;
+ typePath = left;
+ }
+
+ if (!typeofPath) return;
+ if (!typeofPath.get("argument").isIdentifier({
+ name
+ })) return;
+ typePath = typePath.resolve();
+ if (!typePath.isLiteral()) return;
+ const typeValue = typePath.node.value;
+ if (typeof typeValue !== "string") return;
+ return t.createTypeAnnotationBasedOnTypeof(typeValue);
+}
+
+function getParentConditionalPath(binding, path, name) {
+ let parentPath;
+
+ while (parentPath = path.parentPath) {
+ if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
+ if (path.key === "test") {
+ return;
+ }
+
+ return parentPath;
+ }
+
+ if (parentPath.isFunction()) {
+ if (parentPath.parentPath.scope.getBinding(name) !== binding) return;
+ }
+
+ path = parentPath;
+ }
+}
+
+function getConditionalAnnotation(binding, path, name) {
+ const ifStatement = getParentConditionalPath(binding, path, name);
+ if (!ifStatement) return;
+ const test = ifStatement.get("test");
+ const paths = [test];
+ const types = [];
+
+ for (let i = 0; i < paths.length; i++) {
+ const path = paths[i];
+
+ if (path.isLogicalExpression()) {
+ if (path.node.operator === "&&") {
+ paths.push(path.get("left"));
+ paths.push(path.get("right"));
+ }
+ } else if (path.isBinaryExpression()) {
+ const type = inferAnnotationFromBinaryExpression(name, path);
+ if (type) types.push(type);
+ }
+ }
+
+ if (types.length) {
+ if (t.isTSTypeAnnotation(types[0]) && t.createTSUnionType) {
+ return {
+ typeAnnotation: t.createTSUnionType(types),
+ ifStatement
+ };
+ }
+
+ if (t.createFlowUnionType) {
+ return {
+ typeAnnotation: t.createFlowUnionType(types),
+ ifStatement
+ };
+ }
+
+ return {
+ typeAnnotation: t.createUnionTypeAnnotation(types),
+ ifStatement
+ };
+ }
+
+ return getConditionalAnnotation(ifStatement, name);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js
new file mode 100644
index 00000000000..a187c92b276
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/inference/inferers.js
@@ -0,0 +1,243 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.VariableDeclarator = VariableDeclarator;
+exports.TypeCastExpression = TypeCastExpression;
+exports.NewExpression = NewExpression;
+exports.TemplateLiteral = TemplateLiteral;
+exports.UnaryExpression = UnaryExpression;
+exports.BinaryExpression = BinaryExpression;
+exports.LogicalExpression = LogicalExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.SequenceExpression = SequenceExpression;
+exports.ParenthesizedExpression = ParenthesizedExpression;
+exports.AssignmentExpression = AssignmentExpression;
+exports.UpdateExpression = UpdateExpression;
+exports.StringLiteral = StringLiteral;
+exports.NumericLiteral = NumericLiteral;
+exports.BooleanLiteral = BooleanLiteral;
+exports.NullLiteral = NullLiteral;
+exports.RegExpLiteral = RegExpLiteral;
+exports.ObjectExpression = ObjectExpression;
+exports.ArrayExpression = ArrayExpression;
+exports.RestElement = RestElement;
+exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
+exports.CallExpression = CallExpression;
+exports.TaggedTemplateExpression = TaggedTemplateExpression;
+Object.defineProperty(exports, "Identifier", {
+ enumerable: true,
+ get: function () {
+ return _infererReference.default;
+ }
+});
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _infererReference = _interopRequireDefault(require("./inferer-reference"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function VariableDeclarator() {
+ var _type;
+
+ const id = this.get("id");
+ if (!id.isIdentifier()) return;
+ const init = this.get("init");
+ let type = init.getTypeAnnotation();
+
+ if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
+ if (init.isCallExpression() && init.get("callee").isIdentifier({
+ name: "Array"
+ }) && !init.scope.hasBinding("Array", true)) {
+ type = ArrayExpression();
+ }
+ }
+
+ return type;
+}
+
+function TypeCastExpression(node) {
+ return node.typeAnnotation;
+}
+
+TypeCastExpression.validParent = true;
+
+function NewExpression(node) {
+ if (this.get("callee").isIdentifier()) {
+ return t.genericTypeAnnotation(node.callee);
+ }
+}
+
+function TemplateLiteral() {
+ return t.stringTypeAnnotation();
+}
+
+function UnaryExpression(node) {
+ const operator = node.operator;
+
+ if (operator === "void") {
+ return t.voidTypeAnnotation();
+ } else if (t.NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.numberTypeAnnotation();
+ } else if (t.STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.stringTypeAnnotation();
+ } else if (t.BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.booleanTypeAnnotation();
+ }
+}
+
+function BinaryExpression(node) {
+ const operator = node.operator;
+
+ if (t.NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.numberTypeAnnotation();
+ } else if (t.BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return t.booleanTypeAnnotation();
+ } else if (operator === "+") {
+ const right = this.get("right");
+ const left = this.get("left");
+
+ if (left.isBaseType("number") && right.isBaseType("number")) {
+ return t.numberTypeAnnotation();
+ } else if (left.isBaseType("string") || right.isBaseType("string")) {
+ return t.stringTypeAnnotation();
+ }
+
+ return t.unionTypeAnnotation([t.stringTypeAnnotation(), t.numberTypeAnnotation()]);
+ }
+}
+
+function LogicalExpression() {
+ const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
+
+ if (t.isTSTypeAnnotation(argumentTypes[0]) && t.createTSUnionType) {
+ return t.createTSUnionType(argumentTypes);
+ }
+
+ if (t.createFlowUnionType) {
+ return t.createFlowUnionType(argumentTypes);
+ }
+
+ return t.createUnionTypeAnnotation(argumentTypes);
+}
+
+function ConditionalExpression() {
+ const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
+
+ if (t.isTSTypeAnnotation(argumentTypes[0]) && t.createTSUnionType) {
+ return t.createTSUnionType(argumentTypes);
+ }
+
+ if (t.createFlowUnionType) {
+ return t.createFlowUnionType(argumentTypes);
+ }
+
+ return t.createUnionTypeAnnotation(argumentTypes);
+}
+
+function SequenceExpression() {
+ return this.get("expressions").pop().getTypeAnnotation();
+}
+
+function ParenthesizedExpression() {
+ return this.get("expression").getTypeAnnotation();
+}
+
+function AssignmentExpression() {
+ return this.get("right").getTypeAnnotation();
+}
+
+function UpdateExpression(node) {
+ const operator = node.operator;
+
+ if (operator === "++" || operator === "--") {
+ return t.numberTypeAnnotation();
+ }
+}
+
+function StringLiteral() {
+ return t.stringTypeAnnotation();
+}
+
+function NumericLiteral() {
+ return t.numberTypeAnnotation();
+}
+
+function BooleanLiteral() {
+ return t.booleanTypeAnnotation();
+}
+
+function NullLiteral() {
+ return t.nullLiteralTypeAnnotation();
+}
+
+function RegExpLiteral() {
+ return t.genericTypeAnnotation(t.identifier("RegExp"));
+}
+
+function ObjectExpression() {
+ return t.genericTypeAnnotation(t.identifier("Object"));
+}
+
+function ArrayExpression() {
+ return t.genericTypeAnnotation(t.identifier("Array"));
+}
+
+function RestElement() {
+ return ArrayExpression();
+}
+
+RestElement.validParent = true;
+
+function Func() {
+ return t.genericTypeAnnotation(t.identifier("Function"));
+}
+
+const isArrayFrom = t.buildMatchMemberExpression("Array.from");
+const isObjectKeys = t.buildMatchMemberExpression("Object.keys");
+const isObjectValues = t.buildMatchMemberExpression("Object.values");
+const isObjectEntries = t.buildMatchMemberExpression("Object.entries");
+
+function CallExpression() {
+ const {
+ callee
+ } = this.node;
+
+ if (isObjectKeys(callee)) {
+ return t.arrayTypeAnnotation(t.stringTypeAnnotation());
+ } else if (isArrayFrom(callee) || isObjectValues(callee)) {
+ return t.arrayTypeAnnotation(t.anyTypeAnnotation());
+ } else if (isObjectEntries(callee)) {
+ return t.arrayTypeAnnotation(t.tupleTypeAnnotation([t.stringTypeAnnotation(), t.anyTypeAnnotation()]));
+ }
+
+ return resolveCall(this.get("callee"));
+}
+
+function TaggedTemplateExpression() {
+ return resolveCall(this.get("tag"));
+}
+
+function resolveCall(callee) {
+ callee = callee.resolve();
+
+ if (callee.isFunction()) {
+ if (callee.is("async")) {
+ if (callee.is("generator")) {
+ return t.genericTypeAnnotation(t.identifier("AsyncIterator"));
+ } else {
+ return t.genericTypeAnnotation(t.identifier("Promise"));
+ }
+ } else {
+ if (callee.node.returnType) {
+ return callee.node.returnType;
+ } else {}
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js
new file mode 100644
index 00000000000..718a6c85da0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/introspection.js
@@ -0,0 +1,419 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.matchesPattern = matchesPattern;
+exports.has = has;
+exports.isStatic = isStatic;
+exports.isnt = isnt;
+exports.equals = equals;
+exports.isNodeType = isNodeType;
+exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
+exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
+exports.isCompletionRecord = isCompletionRecord;
+exports.isStatementOrBlock = isStatementOrBlock;
+exports.referencesImport = referencesImport;
+exports.getSource = getSource;
+exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
+exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
+exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
+exports.resolve = resolve;
+exports._resolve = _resolve;
+exports.isConstantExpression = isConstantExpression;
+exports.isInStrictMode = isInStrictMode;
+exports.is = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function matchesPattern(pattern, allowPartial) {
+ return t.matchesPattern(this.node, pattern, allowPartial);
+}
+
+function has(key) {
+ const val = this.node && this.node[key];
+
+ if (val && Array.isArray(val)) {
+ return !!val.length;
+ } else {
+ return !!val;
+ }
+}
+
+function isStatic() {
+ return this.scope.isStatic(this.node);
+}
+
+const is = has;
+exports.is = is;
+
+function isnt(key) {
+ return !this.has(key);
+}
+
+function equals(key, value) {
+ return this.node[key] === value;
+}
+
+function isNodeType(type) {
+ return t.isType(this.type, type);
+}
+
+function canHaveVariableDeclarationOrExpression() {
+ return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
+}
+
+function canSwapBetweenExpressionAndStatement(replacement) {
+ if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
+ return false;
+ }
+
+ if (this.isExpression()) {
+ return t.isBlockStatement(replacement);
+ } else if (this.isBlockStatement()) {
+ return t.isExpression(replacement);
+ }
+
+ return false;
+}
+
+function isCompletionRecord(allowInsideFunction) {
+ let path = this;
+ let first = true;
+
+ do {
+ const container = path.container;
+
+ if (path.isFunction() && !first) {
+ return !!allowInsideFunction;
+ }
+
+ first = false;
+
+ if (Array.isArray(container) && path.key !== container.length - 1) {
+ return false;
+ }
+ } while ((path = path.parentPath) && !path.isProgram());
+
+ return true;
+}
+
+function isStatementOrBlock() {
+ if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {
+ return false;
+ } else {
+ return t.STATEMENT_OR_BLOCK_KEYS.includes(this.key);
+ }
+}
+
+function referencesImport(moduleSource, importName) {
+ if (!this.isReferencedIdentifier()) return false;
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding || binding.kind !== "module") return false;
+ const path = binding.path;
+ const parent = path.parentPath;
+ if (!parent.isImportDeclaration()) return false;
+
+ if (parent.node.source.value === moduleSource) {
+ if (!importName) return true;
+ } else {
+ return false;
+ }
+
+ if (path.isImportDefaultSpecifier() && importName === "default") {
+ return true;
+ }
+
+ if (path.isImportNamespaceSpecifier() && importName === "*") {
+ return true;
+ }
+
+ if (path.isImportSpecifier() && path.node.imported.name === importName) {
+ return true;
+ }
+
+ return false;
+}
+
+function getSource() {
+ const node = this.node;
+
+ if (node.end) {
+ const code = this.hub.getCode();
+ if (code) return code.slice(node.start, node.end);
+ }
+
+ return "";
+}
+
+function willIMaybeExecuteBefore(target) {
+ return this._guessExecutionStatusRelativeTo(target) !== "after";
+}
+
+function getOuterFunction(path) {
+ return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
+}
+
+function isExecutionUncertain(type, key) {
+ switch (type) {
+ case "LogicalExpression":
+ return key === "right";
+
+ case "ConditionalExpression":
+ case "IfStatement":
+ return key === "consequent" || key === "alternate";
+
+ case "WhileStatement":
+ case "DoWhileStatement":
+ case "ForInStatement":
+ case "ForOfStatement":
+ return key === "body";
+
+ case "ForStatement":
+ return key === "body" || key === "update";
+
+ case "SwitchStatement":
+ return key === "cases";
+
+ case "TryStatement":
+ return key === "handler";
+
+ case "AssignmentPattern":
+ return key === "right";
+
+ case "OptionalMemberExpression":
+ return key === "property";
+
+ case "OptionalCallExpression":
+ return key === "arguments";
+
+ default:
+ return false;
+ }
+}
+
+function isExecutionUncertainInList(paths, maxIndex) {
+ for (let i = 0; i < maxIndex; i++) {
+ const path = paths[i];
+
+ if (isExecutionUncertain(path.parent.type, path.parentKey)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function _guessExecutionStatusRelativeTo(target) {
+ const funcParent = {
+ this: getOuterFunction(this),
+ target: getOuterFunction(target)
+ };
+
+ if (funcParent.target.node !== funcParent.this.node) {
+ return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
+ }
+
+ const paths = {
+ target: target.getAncestry(),
+ this: this.getAncestry()
+ };
+ if (paths.target.indexOf(this) >= 0) return "after";
+ if (paths.this.indexOf(target) >= 0) return "before";
+ let commonPath;
+ const commonIndex = {
+ target: 0,
+ this: 0
+ };
+
+ while (!commonPath && commonIndex.this < paths.this.length) {
+ const path = paths.this[commonIndex.this];
+ commonIndex.target = paths.target.indexOf(path);
+
+ if (commonIndex.target >= 0) {
+ commonPath = path;
+ } else {
+ commonIndex.this++;
+ }
+ }
+
+ if (!commonPath) {
+ throw new Error("Internal Babel error - The two compared nodes" + " don't appear to belong to the same program.");
+ }
+
+ if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
+ return "unknown";
+ }
+
+ const divergence = {
+ this: paths.this[commonIndex.this - 1],
+ target: paths.target[commonIndex.target - 1]
+ };
+
+ if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
+ return divergence.target.key > divergence.this.key ? "before" : "after";
+ }
+
+ const keys = t.VISITOR_KEYS[commonPath.type];
+ const keyPosition = {
+ this: keys.indexOf(divergence.this.parentKey),
+ target: keys.indexOf(divergence.target.parentKey)
+ };
+ return keyPosition.target > keyPosition.this ? "before" : "after";
+}
+
+const executionOrderCheckedNodes = new WeakSet();
+
+function _guessExecutionStatusRelativeToDifferentFunctions(target) {
+ if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
+ return "unknown";
+ }
+
+ const binding = target.scope.getBinding(target.node.id.name);
+ if (!binding.references) return "before";
+ const referencePaths = binding.referencePaths;
+ let allStatus;
+
+ for (const path of referencePaths) {
+ const childOfFunction = !!path.find(path => path.node === target.node);
+ if (childOfFunction) continue;
+
+ if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
+ return "unknown";
+ }
+
+ if (executionOrderCheckedNodes.has(path.node)) continue;
+ executionOrderCheckedNodes.add(path.node);
+
+ const status = this._guessExecutionStatusRelativeTo(path);
+
+ executionOrderCheckedNodes.delete(path.node);
+
+ if (allStatus && allStatus !== status) {
+ return "unknown";
+ } else {
+ allStatus = status;
+ }
+ }
+
+ return allStatus;
+}
+
+function resolve(dangerous, resolved) {
+ return this._resolve(dangerous, resolved) || this;
+}
+
+function _resolve(dangerous, resolved) {
+ if (resolved && resolved.indexOf(this) >= 0) return;
+ resolved = resolved || [];
+ resolved.push(this);
+
+ if (this.isVariableDeclarator()) {
+ if (this.get("id").isIdentifier()) {
+ return this.get("init").resolve(dangerous, resolved);
+ } else {}
+ } else if (this.isReferencedIdentifier()) {
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding) return;
+ if (!binding.constant) return;
+ if (binding.kind === "module") return;
+
+ if (binding.path !== this) {
+ const ret = binding.path.resolve(dangerous, resolved);
+ if (this.find(parent => parent.node === ret.node)) return;
+ return ret;
+ }
+ } else if (this.isTypeCastExpression()) {
+ return this.get("expression").resolve(dangerous, resolved);
+ } else if (dangerous && this.isMemberExpression()) {
+ const targetKey = this.toComputedKey();
+ if (!t.isLiteral(targetKey)) return;
+ const targetName = targetKey.value;
+ const target = this.get("object").resolve(dangerous, resolved);
+
+ if (target.isObjectExpression()) {
+ const props = target.get("properties");
+
+ for (const prop of props) {
+ if (!prop.isProperty()) continue;
+ const key = prop.get("key");
+ let match = prop.isnt("computed") && key.isIdentifier({
+ name: targetName
+ });
+ match = match || key.isLiteral({
+ value: targetName
+ });
+ if (match) return prop.get("value").resolve(dangerous, resolved);
+ }
+ } else if (target.isArrayExpression() && !isNaN(+targetName)) {
+ const elems = target.get("elements");
+ const elem = elems[targetName];
+ if (elem) return elem.resolve(dangerous, resolved);
+ }
+ }
+}
+
+function isConstantExpression() {
+ if (this.isIdentifier()) {
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding) return false;
+ return binding.constant;
+ }
+
+ if (this.isLiteral()) {
+ if (this.isRegExpLiteral()) {
+ return false;
+ }
+
+ if (this.isTemplateLiteral()) {
+ return this.get("expressions").every(expression => expression.isConstantExpression());
+ }
+
+ return true;
+ }
+
+ if (this.isUnaryExpression()) {
+ if (this.get("operator").node !== "void") {
+ return false;
+ }
+
+ return this.get("argument").isConstantExpression();
+ }
+
+ if (this.isBinaryExpression()) {
+ return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
+ }
+
+ return false;
+}
+
+function isInStrictMode() {
+ const start = this.isProgram() ? this : this.parentPath;
+ const strictParent = start.find(path => {
+ if (path.isProgram({
+ sourceType: "module"
+ })) return true;
+ if (path.isClass()) return true;
+ if (!path.isProgram() && !path.isFunction()) return false;
+
+ if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
+ return false;
+ }
+
+ let {
+ node
+ } = path;
+ if (path.isFunction()) node = node.body;
+
+ for (const directive of node.directives) {
+ if (directive.value.value === "use strict") {
+ return true;
+ }
+ }
+ });
+ return !!strictParent;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js
new file mode 100644
index 00000000000..4d6644ad866
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/hoister.js
@@ -0,0 +1,193 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const referenceVisitor = {
+ ReferencedIdentifier(path, state) {
+ if (path.isJSXIdentifier() && t.react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
+ return;
+ }
+
+ if (path.node.name === "this") {
+ let scope = path.scope;
+
+ do {
+ if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
+ break;
+ }
+ } while (scope = scope.parent);
+
+ if (scope) state.breakOnScopePaths.push(scope.path);
+ }
+
+ const binding = path.scope.getBinding(path.node.name);
+ if (!binding) return;
+
+ for (const violation of binding.constantViolations) {
+ if (violation.scope !== binding.path.scope) {
+ state.mutableBinding = true;
+ path.stop();
+ return;
+ }
+ }
+
+ if (binding !== state.scope.getBinding(path.node.name)) return;
+ state.bindings[path.node.name] = binding;
+ }
+
+};
+
+class PathHoister {
+ constructor(path, scope) {
+ this.breakOnScopePaths = [];
+ this.bindings = {};
+ this.mutableBinding = false;
+ this.scopes = [];
+ this.scope = scope;
+ this.path = path;
+ this.attachAfter = false;
+ }
+
+ isCompatibleScope(scope) {
+ for (const key of Object.keys(this.bindings)) {
+ const binding = this.bindings[key];
+
+ if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ getCompatibleScopes() {
+ let scope = this.path.scope;
+
+ do {
+ if (this.isCompatibleScope(scope)) {
+ this.scopes.push(scope);
+ } else {
+ break;
+ }
+
+ if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
+ break;
+ }
+ } while (scope = scope.parent);
+ }
+
+ getAttachmentPath() {
+ let path = this._getAttachmentPath();
+
+ if (!path) return;
+ let targetScope = path.scope;
+
+ if (targetScope.path === path) {
+ targetScope = path.scope.parent;
+ }
+
+ if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
+ for (const name of Object.keys(this.bindings)) {
+ if (!targetScope.hasOwnBinding(name)) continue;
+ const binding = this.bindings[name];
+
+ if (binding.kind === "param" || binding.path.parentKey === "params") {
+ continue;
+ }
+
+ const bindingParentPath = this.getAttachmentParentForPath(binding.path);
+
+ if (bindingParentPath.key >= path.key) {
+ this.attachAfter = true;
+ path = binding.path;
+
+ for (const violationPath of binding.constantViolations) {
+ if (this.getAttachmentParentForPath(violationPath).key > path.key) {
+ path = violationPath;
+ }
+ }
+ }
+ }
+ }
+
+ return path;
+ }
+
+ _getAttachmentPath() {
+ const scopes = this.scopes;
+ const scope = scopes.pop();
+ if (!scope) return;
+
+ if (scope.path.isFunction()) {
+ if (this.hasOwnParamBindings(scope)) {
+ if (this.scope === scope) return;
+ const bodies = scope.path.get("body").get("body");
+
+ for (let i = 0; i < bodies.length; i++) {
+ if (bodies[i].node._blockHoist) continue;
+ return bodies[i];
+ }
+ } else {
+ return this.getNextScopeAttachmentParent();
+ }
+ } else if (scope.path.isProgram()) {
+ return this.getNextScopeAttachmentParent();
+ }
+ }
+
+ getNextScopeAttachmentParent() {
+ const scope = this.scopes.pop();
+ if (scope) return this.getAttachmentParentForPath(scope.path);
+ }
+
+ getAttachmentParentForPath(path) {
+ do {
+ if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
+ return path;
+ }
+ } while (path = path.parentPath);
+ }
+
+ hasOwnParamBindings(scope) {
+ for (const name of Object.keys(this.bindings)) {
+ if (!scope.hasOwnBinding(name)) continue;
+ const binding = this.bindings[name];
+ if (binding.kind === "param" && binding.constant) return true;
+ }
+
+ return false;
+ }
+
+ run() {
+ this.path.traverse(referenceVisitor, this);
+ if (this.mutableBinding) return;
+ this.getCompatibleScopes();
+ const attachTo = this.getAttachmentPath();
+ if (!attachTo) return;
+ if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
+ let uid = attachTo.scope.generateUidIdentifier("ref");
+ const declarator = t.variableDeclarator(uid, this.path.node);
+ const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
+ const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t.variableDeclaration("var", [declarator])]);
+ const parent = this.path.parentPath;
+
+ if (parent.isJSXElement() && this.path.container === parent.node.children) {
+ uid = t.JSXExpressionContainer(uid);
+ }
+
+ this.path.replaceWith(t.cloneNode(uid));
+ return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
+ }
+
+}
+
+exports.default = PathHoister; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
index 23ec8fe6d7e..23ec8fe6d7e 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
new file mode 100644
index 00000000000..505e9a4493d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
@@ -0,0 +1,210 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const ReferencedIdentifier = {
+ types: ["Identifier", "JSXIdentifier"],
+
+ checkPath(path, opts) {
+ const {
+ node,
+ parent
+ } = path;
+
+ if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
+ if (t.isJSXIdentifier(node, opts)) {
+ if (t.react.isCompatTag(node.name)) return false;
+ } else {
+ return false;
+ }
+ }
+
+ return t.isReferenced(node, parent, path.parentPath.parent);
+ }
+
+};
+exports.ReferencedIdentifier = ReferencedIdentifier;
+const ReferencedMemberExpression = {
+ types: ["MemberExpression"],
+
+ checkPath({
+ node,
+ parent
+ }) {
+ return t.isMemberExpression(node) && t.isReferenced(node, parent);
+ }
+
+};
+exports.ReferencedMemberExpression = ReferencedMemberExpression;
+const BindingIdentifier = {
+ types: ["Identifier"],
+
+ checkPath(path) {
+ const {
+ node,
+ parent
+ } = path;
+ const grandparent = path.parentPath.parent;
+ return t.isIdentifier(node) && t.isBinding(node, parent, grandparent);
+ }
+
+};
+exports.BindingIdentifier = BindingIdentifier;
+const Statement = {
+ types: ["Statement"],
+
+ checkPath({
+ node,
+ parent
+ }) {
+ if (t.isStatement(node)) {
+ if (t.isVariableDeclaration(node)) {
+ if (t.isForXStatement(parent, {
+ left: node
+ })) return false;
+ if (t.isForStatement(parent, {
+ init: node
+ })) return false;
+ }
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+};
+exports.Statement = Statement;
+const Expression = {
+ types: ["Expression"],
+
+ checkPath(path) {
+ if (path.isIdentifier()) {
+ return path.isReferencedIdentifier();
+ } else {
+ return t.isExpression(path.node);
+ }
+ }
+
+};
+exports.Expression = Expression;
+const Scope = {
+ types: ["Scopable", "Pattern"],
+
+ checkPath(path) {
+ return t.isScope(path.node, path.parent);
+ }
+
+};
+exports.Scope = Scope;
+const Referenced = {
+ checkPath(path) {
+ return t.isReferenced(path.node, path.parent);
+ }
+
+};
+exports.Referenced = Referenced;
+const BlockScoped = {
+ checkPath(path) {
+ return t.isBlockScoped(path.node);
+ }
+
+};
+exports.BlockScoped = BlockScoped;
+const Var = {
+ types: ["VariableDeclaration"],
+
+ checkPath(path) {
+ return t.isVar(path.node);
+ }
+
+};
+exports.Var = Var;
+const User = {
+ checkPath(path) {
+ return path.node && !!path.node.loc;
+ }
+
+};
+exports.User = User;
+const Generated = {
+ checkPath(path) {
+ return !path.isUser();
+ }
+
+};
+exports.Generated = Generated;
+const Pure = {
+ checkPath(path, opts) {
+ return path.scope.isPure(path.node, opts);
+ }
+
+};
+exports.Pure = Pure;
+const Flow = {
+ types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
+
+ checkPath({
+ node
+ }) {
+ if (t.isFlow(node)) {
+ return true;
+ } else if (t.isImportDeclaration(node)) {
+ return node.importKind === "type" || node.importKind === "typeof";
+ } else if (t.isExportDeclaration(node)) {
+ return node.exportKind === "type";
+ } else if (t.isImportSpecifier(node)) {
+ return node.importKind === "type" || node.importKind === "typeof";
+ } else {
+ return false;
+ }
+ }
+
+};
+exports.Flow = Flow;
+const RestProperty = {
+ types: ["RestElement"],
+
+ checkPath(path) {
+ return path.parentPath && path.parentPath.isObjectPattern();
+ }
+
+};
+exports.RestProperty = RestProperty;
+const SpreadProperty = {
+ types: ["RestElement"],
+
+ checkPath(path) {
+ return path.parentPath && path.parentPath.isObjectExpression();
+ }
+
+};
+exports.SpreadProperty = SpreadProperty;
+const ExistentialTypeParam = {
+ types: ["ExistsTypeAnnotation"]
+};
+exports.ExistentialTypeParam = ExistentialTypeParam;
+const NumericLiteralTypeAnnotation = {
+ types: ["NumberLiteralTypeAnnotation"]
+};
+exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
+const ForAwaitStatement = {
+ types: ["ForOfStatement"],
+
+ checkPath({
+ node
+ }) {
+ return node.await === true;
+ }
+
+};
+exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js
new file mode 100644
index 00000000000..e8bee5944c1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/modification.js
@@ -0,0 +1,214 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.insertBefore = insertBefore;
+exports._containerInsert = _containerInsert;
+exports._containerInsertBefore = _containerInsertBefore;
+exports._containerInsertAfter = _containerInsertAfter;
+exports.insertAfter = insertAfter;
+exports.updateSiblingKeys = updateSiblingKeys;
+exports._verifyNodeList = _verifyNodeList;
+exports.unshiftContainer = unshiftContainer;
+exports.pushContainer = pushContainer;
+exports.hoist = hoist;
+
+var _cache = require("../cache");
+
+var _hoister = _interopRequireDefault(require("./lib/hoister"));
+
+var _index = _interopRequireDefault(require("./index"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function insertBefore(nodes) {
+ this._assertUnremoved();
+
+ nodes = this._verifyNodeList(nodes);
+ const {
+ parentPath
+ } = this;
+
+ if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
+ return parentPath.insertBefore(nodes);
+ } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
+ if (this.node) nodes.push(this.node);
+ return this.replaceExpressionWithStatements(nodes);
+ } else if (Array.isArray(this.container)) {
+ return this._containerInsertBefore(nodes);
+ } else if (this.isStatementOrBlock()) {
+ const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
+ this.replaceWith(t.blockStatement(shouldInsertCurrentNode ? [this.node] : []));
+ return this.unshiftContainer("body", nodes);
+ } else {
+ throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
+ }
+}
+
+function _containerInsert(from, nodes) {
+ this.updateSiblingKeys(from, nodes.length);
+ const paths = [];
+ this.container.splice(from, 0, ...nodes);
+
+ for (let i = 0; i < nodes.length; i++) {
+ const to = from + i;
+ const path = this.getSibling(to);
+ paths.push(path);
+
+ if (this.context && this.context.queue) {
+ path.pushContext(this.context);
+ }
+ }
+
+ const contexts = this._getQueueContexts();
+
+ for (const path of paths) {
+ path.setScope();
+ path.debug("Inserted.");
+
+ for (const context of contexts) {
+ context.maybeQueue(path, true);
+ }
+ }
+
+ return paths;
+}
+
+function _containerInsertBefore(nodes) {
+ return this._containerInsert(this.key, nodes);
+}
+
+function _containerInsertAfter(nodes) {
+ return this._containerInsert(this.key + 1, nodes);
+}
+
+function insertAfter(nodes) {
+ this._assertUnremoved();
+
+ nodes = this._verifyNodeList(nodes);
+ const {
+ parentPath
+ } = this;
+
+ if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
+ return parentPath.insertAfter(nodes.map(node => {
+ return t.isExpression(node) ? t.expressionStatement(node) : node;
+ }));
+ } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
+ if (this.node) {
+ let {
+ scope
+ } = this;
+
+ if (parentPath.isMethod({
+ computed: true,
+ key: this.node
+ })) {
+ scope = scope.parent;
+ }
+
+ const temp = scope.generateDeclaredUidIdentifier();
+ nodes.unshift(t.expressionStatement(t.assignmentExpression("=", t.cloneNode(temp), this.node)));
+ nodes.push(t.expressionStatement(t.cloneNode(temp)));
+ }
+
+ return this.replaceExpressionWithStatements(nodes);
+ } else if (Array.isArray(this.container)) {
+ return this._containerInsertAfter(nodes);
+ } else if (this.isStatementOrBlock()) {
+ const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
+ this.replaceWith(t.blockStatement(shouldInsertCurrentNode ? [this.node] : []));
+ return this.pushContainer("body", nodes);
+ } else {
+ throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
+ }
+}
+
+function updateSiblingKeys(fromIndex, incrementBy) {
+ if (!this.parent) return;
+
+ const paths = _cache.path.get(this.parent);
+
+ for (const [, path] of paths) {
+ if (path.key >= fromIndex) {
+ path.key += incrementBy;
+ }
+ }
+}
+
+function _verifyNodeList(nodes) {
+ if (!nodes) {
+ return [];
+ }
+
+ if (nodes.constructor !== Array) {
+ nodes = [nodes];
+ }
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ let msg;
+
+ if (!node) {
+ msg = "has falsy node";
+ } else if (typeof node !== "object") {
+ msg = "contains a non-object node";
+ } else if (!node.type) {
+ msg = "without a type";
+ } else if (node instanceof _index.default) {
+ msg = "has a NodePath when it expected a raw object";
+ }
+
+ if (msg) {
+ const type = Array.isArray(node) ? "array" : typeof node;
+ throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
+ }
+ }
+
+ return nodes;
+}
+
+function unshiftContainer(listKey, nodes) {
+ this._assertUnremoved();
+
+ nodes = this._verifyNodeList(nodes);
+
+ const path = _index.default.get({
+ parentPath: this,
+ parent: this.node,
+ container: this.node[listKey],
+ listKey,
+ key: 0
+ });
+
+ return path._containerInsertBefore(nodes);
+}
+
+function pushContainer(listKey, nodes) {
+ this._assertUnremoved();
+
+ nodes = this._verifyNodeList(nodes);
+ const container = this.node[listKey];
+
+ const path = _index.default.get({
+ parentPath: this,
+ parent: this.node,
+ container: container,
+ listKey,
+ key: container.length
+ });
+
+ return path.replaceWithMultiple(nodes);
+}
+
+function hoist(scope = this.scope) {
+ const hoister = new _hoister.default(this, scope);
+ return hoister.run();
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js
new file mode 100644
index 00000000000..b3c04e126c7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/removal.js
@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.remove = remove;
+exports._removeFromScope = _removeFromScope;
+exports._callRemovalHooks = _callRemovalHooks;
+exports._remove = _remove;
+exports._markRemoved = _markRemoved;
+exports._assertUnremoved = _assertUnremoved;
+
+var _removalHooks = require("./lib/removal-hooks");
+
+var _cache = require("../cache");
+
+var _index = require("./index");
+
+function remove() {
+ var _this$opts;
+
+ this._assertUnremoved();
+
+ this.resync();
+
+ if (!((_this$opts = this.opts) == null ? void 0 : _this$opts.noScope)) {
+ this._removeFromScope();
+ }
+
+ if (this._callRemovalHooks()) {
+ this._markRemoved();
+
+ return;
+ }
+
+ this.shareCommentsWithSiblings();
+
+ this._remove();
+
+ this._markRemoved();
+}
+
+function _removeFromScope() {
+ const bindings = this.getBindingIdentifiers();
+ Object.keys(bindings).forEach(name => this.scope.removeBinding(name));
+}
+
+function _callRemovalHooks() {
+ for (const fn of _removalHooks.hooks) {
+ if (fn(this, this.parentPath)) return true;
+ }
+}
+
+function _remove() {
+ if (Array.isArray(this.container)) {
+ this.container.splice(this.key, 1);
+ this.updateSiblingKeys(this.key, -1);
+ } else {
+ this._replaceWith(null);
+ }
+}
+
+function _markRemoved() {
+ this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
+ if (this.parent) _cache.path.get(this.parent).delete(this.node);
+ this.node = null;
+}
+
+function _assertUnremoved() {
+ if (this.removed) {
+ throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js
new file mode 100644
index 00000000000..eea4b1d7180
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/path/replacement.js
@@ -0,0 +1,252 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.replaceWithMultiple = replaceWithMultiple;
+exports.replaceWithSourceString = replaceWithSourceString;
+exports.replaceWith = replaceWith;
+exports._replaceWith = _replaceWith;
+exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
+exports.replaceInline = replaceInline;
+
+var _codeFrame = require("@babel/code-frame");
+
+var _index = _interopRequireDefault(require("../index"));
+
+var _index2 = _interopRequireDefault(require("./index"));
+
+var _cache = require("../cache");
+
+var _parser = require("@babel/parser");
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const hoistVariablesVisitor = {
+ Function(path) {
+ path.skip();
+ },
+
+ VariableDeclaration(path) {
+ if (path.node.kind !== "var") return;
+ const bindings = path.getBindingIdentifiers();
+
+ for (const key of Object.keys(bindings)) {
+ path.scope.push({
+ id: bindings[key]
+ });
+ }
+
+ const exprs = [];
+
+ for (const declar of path.node.declarations) {
+ if (declar.init) {
+ exprs.push(t.expressionStatement(t.assignmentExpression("=", declar.id, declar.init)));
+ }
+ }
+
+ path.replaceWithMultiple(exprs);
+ }
+
+};
+
+function replaceWithMultiple(nodes) {
+ var _pathCache$get;
+
+ this.resync();
+ nodes = this._verifyNodeList(nodes);
+ t.inheritLeadingComments(nodes[0], this.node);
+ t.inheritTrailingComments(nodes[nodes.length - 1], this.node);
+ (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
+ this.node = this.container[this.key] = null;
+ const paths = this.insertAfter(nodes);
+
+ if (this.node) {
+ this.requeue();
+ } else {
+ this.remove();
+ }
+
+ return paths;
+}
+
+function replaceWithSourceString(replacement) {
+ this.resync();
+
+ try {
+ replacement = `(${replacement})`;
+ replacement = (0, _parser.parse)(replacement);
+ } catch (err) {
+ const loc = err.loc;
+
+ if (loc) {
+ err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
+ start: {
+ line: loc.line,
+ column: loc.column + 1
+ }
+ });
+ err.code = "BABEL_REPLACE_SOURCE_ERROR";
+ }
+
+ throw err;
+ }
+
+ replacement = replacement.program.body[0].expression;
+
+ _index.default.removeProperties(replacement);
+
+ return this.replaceWith(replacement);
+}
+
+function replaceWith(replacement) {
+ this.resync();
+
+ if (this.removed) {
+ throw new Error("You can't replace this node, we've already removed it");
+ }
+
+ if (replacement instanceof _index2.default) {
+ replacement = replacement.node;
+ }
+
+ if (!replacement) {
+ throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
+ }
+
+ if (this.node === replacement) {
+ return [this];
+ }
+
+ if (this.isProgram() && !t.isProgram(replacement)) {
+ throw new Error("You can only replace a Program root node with another Program node");
+ }
+
+ if (Array.isArray(replacement)) {
+ throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
+ }
+
+ if (typeof replacement === "string") {
+ throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
+ }
+
+ let nodePath = "";
+
+ if (this.isNodeType("Statement") && t.isExpression(replacement)) {
+ if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
+ replacement = t.expressionStatement(replacement);
+ nodePath = "expression";
+ }
+ }
+
+ if (this.isNodeType("Expression") && t.isStatement(replacement)) {
+ if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
+ return this.replaceExpressionWithStatements([replacement]);
+ }
+ }
+
+ const oldNode = this.node;
+
+ if (oldNode) {
+ t.inheritsComments(replacement, oldNode);
+ t.removeComments(oldNode);
+ }
+
+ this._replaceWith(replacement);
+
+ this.type = replacement.type;
+ this.setScope();
+ this.requeue();
+ return [nodePath ? this.get(nodePath) : this];
+}
+
+function _replaceWith(node) {
+ var _pathCache$get2;
+
+ if (!this.container) {
+ throw new ReferenceError("Container is falsy");
+ }
+
+ if (this.inList) {
+ t.validate(this.parent, this.key, [node]);
+ } else {
+ t.validate(this.parent, this.key, node);
+ }
+
+ this.debug(`Replace with ${node == null ? void 0 : node.type}`);
+ (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
+ this.node = this.container[this.key] = node;
+}
+
+function replaceExpressionWithStatements(nodes) {
+ this.resync();
+ const toSequenceExpression = t.toSequenceExpression(nodes, this.scope);
+
+ if (toSequenceExpression) {
+ return this.replaceWith(toSequenceExpression)[0].get("expressions");
+ }
+
+ const functionParent = this.getFunctionParent();
+ const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
+ const container = t.arrowFunctionExpression([], t.blockStatement(nodes));
+ this.replaceWith(t.callExpression(container, []));
+ this.traverse(hoistVariablesVisitor);
+ const completionRecords = this.get("callee").getCompletionRecords();
+
+ for (const path of completionRecords) {
+ if (!path.isExpressionStatement()) continue;
+ const loop = path.findParent(path => path.isLoop());
+
+ if (loop) {
+ let uid = loop.getData("expressionReplacementReturnUid");
+
+ if (!uid) {
+ const callee = this.get("callee");
+ uid = callee.scope.generateDeclaredUidIdentifier("ret");
+ callee.get("body").pushContainer("body", t.returnStatement(t.cloneNode(uid)));
+ loop.setData("expressionReplacementReturnUid", uid);
+ } else {
+ uid = t.identifier(uid.name);
+ }
+
+ path.get("expression").replaceWith(t.assignmentExpression("=", t.cloneNode(uid), path.node.expression));
+ } else {
+ path.replaceWith(t.returnStatement(path.node.expression));
+ }
+ }
+
+ const callee = this.get("callee");
+ callee.arrowFunctionToExpression();
+
+ if (isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t.FUNCTION_TYPES)) {
+ callee.set("async", true);
+ this.replaceWith(t.awaitExpression(this.node));
+ }
+
+ return callee.get("body.body");
+}
+
+function replaceInline(nodes) {
+ this.resync();
+
+ if (Array.isArray(nodes)) {
+ if (Array.isArray(this.container)) {
+ nodes = this._verifyNodeList(nodes);
+
+ const paths = this._containerInsertAfter(nodes);
+
+ this.remove();
+ return paths;
+ } else {
+ return this.replaceWithMultiple(nodes);
+ }
+ } else {
+ return this.replaceWith(nodes);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js
new file mode 100644
index 00000000000..50ce03b9495
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/binding.js
@@ -0,0 +1,71 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class Binding {
+ constructor({
+ identifier,
+ scope,
+ path,
+ kind
+ }) {
+ this.constantViolations = [];
+ this.constant = true;
+ this.referencePaths = [];
+ this.referenced = false;
+ this.references = 0;
+ this.identifier = identifier;
+ this.scope = scope;
+ this.path = path;
+ this.kind = kind;
+ this.clearValue();
+ }
+
+ deoptValue() {
+ this.clearValue();
+ this.hasDeoptedValue = true;
+ }
+
+ setValue(value) {
+ if (this.hasDeoptedValue) return;
+ this.hasValue = true;
+ this.value = value;
+ }
+
+ clearValue() {
+ this.hasDeoptedValue = false;
+ this.hasValue = false;
+ this.value = null;
+ }
+
+ reassign(path) {
+ this.constant = false;
+
+ if (this.constantViolations.indexOf(path) !== -1) {
+ return;
+ }
+
+ this.constantViolations.push(path);
+ }
+
+ reference(path) {
+ if (this.referencePaths.indexOf(path) !== -1) {
+ return;
+ }
+
+ this.referenced = true;
+ this.references++;
+ this.referencePaths.push(path);
+ }
+
+ dereference() {
+ this.references--;
+ this.referenced = !!this.references;
+ }
+
+}
+
+exports.default = Binding; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js
new file mode 100644
index 00000000000..165f79a02fe
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/index.js
@@ -0,0 +1,959 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _renamer = _interopRequireDefault(require("./lib/renamer"));
+
+var _index = _interopRequireDefault(require("../index"));
+
+var _binding = _interopRequireDefault(require("./binding"));
+
+var _globals = _interopRequireDefault(require("globals"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+var _cache = require("../cache");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function gatherNodeParts(node, parts) {
+ switch (node == null ? void 0 : node.type) {
+ default:
+ if (t.isModuleDeclaration(node)) {
+ if (node.source) {
+ gatherNodeParts(node.source, parts);
+ } else if (node.specifiers && node.specifiers.length) {
+ for (const e of node.specifiers) gatherNodeParts(e, parts);
+ } else if (node.declaration) {
+ gatherNodeParts(node.declaration, parts);
+ }
+ } else if (t.isModuleSpecifier(node)) {
+ gatherNodeParts(node.local, parts);
+ } else if (t.isLiteral(node)) {
+ parts.push(node.value);
+ }
+
+ break;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ case "JSXMemberExpression":
+ gatherNodeParts(node.object, parts);
+ gatherNodeParts(node.property, parts);
+ break;
+
+ case "Identifier":
+ case "JSXIdentifier":
+ parts.push(node.name);
+ break;
+
+ case "CallExpression":
+ case "OptionalCallExpression":
+ case "NewExpression":
+ gatherNodeParts(node.callee, parts);
+ break;
+
+ case "ObjectExpression":
+ case "ObjectPattern":
+ for (const e of node.properties) {
+ gatherNodeParts(e, parts);
+ }
+
+ break;
+
+ case "SpreadElement":
+ case "RestElement":
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "ObjectProperty":
+ case "ObjectMethod":
+ case "ClassProperty":
+ case "ClassMethod":
+ case "ClassPrivateProperty":
+ case "ClassPrivateMethod":
+ gatherNodeParts(node.key, parts);
+ break;
+
+ case "ThisExpression":
+ parts.push("this");
+ break;
+
+ case "Super":
+ parts.push("super");
+ break;
+
+ case "Import":
+ parts.push("import");
+ break;
+
+ case "DoExpression":
+ parts.push("do");
+ break;
+
+ case "YieldExpression":
+ parts.push("yield");
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "AwaitExpression":
+ parts.push("await");
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "AssignmentExpression":
+ gatherNodeParts(node.left, parts);
+ break;
+
+ case "VariableDeclarator":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "FunctionExpression":
+ case "FunctionDeclaration":
+ case "ClassExpression":
+ case "ClassDeclaration":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "PrivateName":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "ParenthesizedExpression":
+ gatherNodeParts(node.expression, parts);
+ break;
+
+ case "UnaryExpression":
+ case "UpdateExpression":
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "MetaProperty":
+ gatherNodeParts(node.meta, parts);
+ gatherNodeParts(node.property, parts);
+ break;
+
+ case "JSXElement":
+ gatherNodeParts(node.openingElement, parts);
+ break;
+
+ case "JSXOpeningElement":
+ parts.push(node.name);
+ break;
+
+ case "JSXFragment":
+ gatherNodeParts(node.openingFragment, parts);
+ break;
+
+ case "JSXOpeningFragment":
+ parts.push("Fragment");
+ break;
+
+ case "JSXNamespacedName":
+ gatherNodeParts(node.namespace, parts);
+ gatherNodeParts(node.name, parts);
+ break;
+ }
+}
+
+const collectorVisitor = {
+ For(path) {
+ for (const key of t.FOR_INIT_KEYS) {
+ const declar = path.get(key);
+
+ if (declar.isVar()) {
+ const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
+ parentScope.registerBinding("var", declar);
+ }
+ }
+ },
+
+ Declaration(path) {
+ if (path.isBlockScoped()) return;
+
+ if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) {
+ return;
+ }
+
+ const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
+ parent.registerDeclaration(path);
+ },
+
+ ReferencedIdentifier(path, state) {
+ state.references.push(path);
+ },
+
+ ForXStatement(path, state) {
+ const left = path.get("left");
+
+ if (left.isPattern() || left.isIdentifier()) {
+ state.constantViolations.push(path);
+ }
+ },
+
+ ExportDeclaration: {
+ exit(path) {
+ const {
+ node,
+ scope
+ } = path;
+ const declar = node.declaration;
+
+ if (t.isClassDeclaration(declar) || t.isFunctionDeclaration(declar)) {
+ const id = declar.id;
+ if (!id) return;
+ const binding = scope.getBinding(id.name);
+ if (binding) binding.reference(path);
+ } else if (t.isVariableDeclaration(declar)) {
+ for (const decl of declar.declarations) {
+ for (const name of Object.keys(t.getBindingIdentifiers(decl))) {
+ const binding = scope.getBinding(name);
+ if (binding) binding.reference(path);
+ }
+ }
+ }
+ }
+
+ },
+
+ LabeledStatement(path) {
+ path.scope.getProgramParent().addGlobal(path.node);
+ path.scope.getBlockParent().registerDeclaration(path);
+ },
+
+ AssignmentExpression(path, state) {
+ state.assignments.push(path);
+ },
+
+ UpdateExpression(path, state) {
+ state.constantViolations.push(path);
+ },
+
+ UnaryExpression(path, state) {
+ if (path.node.operator === "delete") {
+ state.constantViolations.push(path);
+ }
+ },
+
+ BlockScoped(path) {
+ let scope = path.scope;
+ if (scope.path === path) scope = scope.parent;
+ const parent = scope.getBlockParent();
+ parent.registerDeclaration(path);
+
+ if (path.isClassDeclaration() && path.node.id) {
+ const id = path.node.id;
+ const name = id.name;
+ path.scope.bindings[name] = path.scope.parent.getBinding(name);
+ }
+ },
+
+ Block(path) {
+ const paths = path.get("body");
+
+ for (const bodyPath of paths) {
+ if (bodyPath.isFunctionDeclaration()) {
+ path.scope.getBlockParent().registerDeclaration(bodyPath);
+ }
+ }
+ },
+
+ CatchClause(path) {
+ path.scope.registerBinding("let", path);
+ },
+
+ Function(path) {
+ if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t.NOT_LOCAL_BINDING]) {
+ path.scope.registerBinding("local", path.get("id"), path);
+ }
+
+ const params = path.get("params");
+
+ for (const param of params) {
+ path.scope.registerBinding("param", param);
+ }
+ },
+
+ ClassExpression(path) {
+ if (path.has("id") && !path.get("id").node[t.NOT_LOCAL_BINDING]) {
+ path.scope.registerBinding("local", path);
+ }
+ }
+
+};
+let uid = 0;
+
+class Scope {
+ constructor(path) {
+ const {
+ node
+ } = path;
+
+ const cached = _cache.scope.get(node);
+
+ if ((cached == null ? void 0 : cached.path) === path) {
+ return cached;
+ }
+
+ _cache.scope.set(node, this);
+
+ this.uid = uid++;
+ this.block = node;
+ this.path = path;
+ this.labels = new Map();
+ this.inited = false;
+ }
+
+ get parent() {
+ const parent = this.path.findParent(p => p.isScope());
+ return parent == null ? void 0 : parent.scope;
+ }
+
+ get parentBlock() {
+ return this.path.parent;
+ }
+
+ get hub() {
+ return this.path.hub;
+ }
+
+ traverse(node, opts, state) {
+ (0, _index.default)(node, opts, this, state, this.path);
+ }
+
+ generateDeclaredUidIdentifier(name) {
+ const id = this.generateUidIdentifier(name);
+ this.push({
+ id
+ });
+ return t.cloneNode(id);
+ }
+
+ generateUidIdentifier(name) {
+ return t.identifier(this.generateUid(name));
+ }
+
+ generateUid(name = "temp") {
+ name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
+ let uid;
+ let i = 1;
+
+ do {
+ uid = this._generateUid(name, i);
+ i++;
+ } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
+
+ const program = this.getProgramParent();
+ program.references[uid] = true;
+ program.uids[uid] = true;
+ return uid;
+ }
+
+ _generateUid(name, i) {
+ let id = name;
+ if (i > 1) id += i;
+ return `_${id}`;
+ }
+
+ generateUidBasedOnNode(node, defaultName) {
+ const parts = [];
+ gatherNodeParts(node, parts);
+ let id = parts.join("$");
+ id = id.replace(/^_/, "") || defaultName || "ref";
+ return this.generateUid(id.slice(0, 20));
+ }
+
+ generateUidIdentifierBasedOnNode(node, defaultName) {
+ return t.identifier(this.generateUidBasedOnNode(node, defaultName));
+ }
+
+ isStatic(node) {
+ if (t.isThisExpression(node) || t.isSuper(node)) {
+ return true;
+ }
+
+ if (t.isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+
+ if (binding) {
+ return binding.constant;
+ } else {
+ return this.hasBinding(node.name);
+ }
+ }
+
+ return false;
+ }
+
+ maybeGenerateMemoised(node, dontPush) {
+ if (this.isStatic(node)) {
+ return null;
+ } else {
+ const id = this.generateUidIdentifierBasedOnNode(node);
+
+ if (!dontPush) {
+ this.push({
+ id
+ });
+ return t.cloneNode(id);
+ }
+
+ return id;
+ }
+ }
+
+ checkBlockScopedCollisions(local, kind, name, id) {
+ if (kind === "param") return;
+ if (local.kind === "local") return;
+ const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
+
+ if (duplicate) {
+ throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError);
+ }
+ }
+
+ rename(oldName, newName, block) {
+ const binding = this.getBinding(oldName);
+
+ if (binding) {
+ newName = newName || this.generateUidIdentifier(oldName).name;
+ return new _renamer.default(binding, oldName, newName).rename(block);
+ }
+ }
+
+ _renameFromMap(map, oldName, newName, value) {
+ if (map[oldName]) {
+ map[newName] = value;
+ map[oldName] = null;
+ }
+ }
+
+ dump() {
+ const sep = "-".repeat(60);
+ console.log(sep);
+ let scope = this;
+
+ do {
+ console.log("#", scope.block.type);
+
+ for (const name of Object.keys(scope.bindings)) {
+ const binding = scope.bindings[name];
+ console.log(" -", name, {
+ constant: binding.constant,
+ references: binding.references,
+ violations: binding.constantViolations.length,
+ kind: binding.kind
+ });
+ }
+ } while (scope = scope.parent);
+
+ console.log(sep);
+ }
+
+ toArray(node, i, allowArrayLike) {
+ if (t.isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+
+ if ((binding == null ? void 0 : binding.constant) && binding.path.isGenericType("Array")) {
+ return node;
+ }
+ }
+
+ if (t.isArrayExpression(node)) {
+ return node;
+ }
+
+ if (t.isIdentifier(node, {
+ name: "arguments"
+ })) {
+ return t.callExpression(t.memberExpression(t.memberExpression(t.memberExpression(t.identifier("Array"), t.identifier("prototype")), t.identifier("slice")), t.identifier("call")), [node]);
+ }
+
+ let helperName;
+ const args = [node];
+
+ if (i === true) {
+ helperName = "toConsumableArray";
+ } else if (i) {
+ args.push(t.numericLiteral(i));
+ helperName = "slicedToArray";
+ } else {
+ helperName = "toArray";
+ }
+
+ if (allowArrayLike) {
+ args.unshift(this.hub.addHelper(helperName));
+ helperName = "maybeArrayLike";
+ }
+
+ return t.callExpression(this.hub.addHelper(helperName), args);
+ }
+
+ hasLabel(name) {
+ return !!this.getLabel(name);
+ }
+
+ getLabel(name) {
+ return this.labels.get(name);
+ }
+
+ registerLabel(path) {
+ this.labels.set(path.node.label.name, path);
+ }
+
+ registerDeclaration(path) {
+ if (path.isLabeledStatement()) {
+ this.registerLabel(path);
+ } else if (path.isFunctionDeclaration()) {
+ this.registerBinding("hoisted", path.get("id"), path);
+ } else if (path.isVariableDeclaration()) {
+ const declarations = path.get("declarations");
+
+ for (const declar of declarations) {
+ this.registerBinding(path.node.kind, declar);
+ }
+ } else if (path.isClassDeclaration()) {
+ this.registerBinding("let", path);
+ } else if (path.isImportDeclaration()) {
+ const specifiers = path.get("specifiers");
+
+ for (const specifier of specifiers) {
+ this.registerBinding("module", specifier);
+ }
+ } else if (path.isExportDeclaration()) {
+ const declar = path.get("declaration");
+
+ if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
+ this.registerDeclaration(declar);
+ }
+ } else {
+ this.registerBinding("unknown", path);
+ }
+ }
+
+ buildUndefinedNode() {
+ return t.unaryExpression("void", t.numericLiteral(0), true);
+ }
+
+ registerConstantViolation(path) {
+ const ids = path.getBindingIdentifiers();
+
+ for (const name of Object.keys(ids)) {
+ const binding = this.getBinding(name);
+ if (binding) binding.reassign(path);
+ }
+ }
+
+ registerBinding(kind, path, bindingPath = path) {
+ if (!kind) throw new ReferenceError("no `kind`");
+
+ if (path.isVariableDeclaration()) {
+ const declarators = path.get("declarations");
+
+ for (const declar of declarators) {
+ this.registerBinding(kind, declar);
+ }
+
+ return;
+ }
+
+ const parent = this.getProgramParent();
+ const ids = path.getOuterBindingIdentifiers(true);
+
+ for (const name of Object.keys(ids)) {
+ parent.references[name] = true;
+
+ for (const id of ids[name]) {
+ const local = this.getOwnBinding(name);
+
+ if (local) {
+ if (local.identifier === id) continue;
+ this.checkBlockScopedCollisions(local, kind, name, id);
+ }
+
+ if (local) {
+ this.registerConstantViolation(bindingPath);
+ } else {
+ this.bindings[name] = new _binding.default({
+ identifier: id,
+ scope: this,
+ path: bindingPath,
+ kind: kind
+ });
+ }
+ }
+ }
+ }
+
+ addGlobal(node) {
+ this.globals[node.name] = node;
+ }
+
+ hasUid(name) {
+ let scope = this;
+
+ do {
+ if (scope.uids[name]) return true;
+ } while (scope = scope.parent);
+
+ return false;
+ }
+
+ hasGlobal(name) {
+ let scope = this;
+
+ do {
+ if (scope.globals[name]) return true;
+ } while (scope = scope.parent);
+
+ return false;
+ }
+
+ hasReference(name) {
+ return !!this.getProgramParent().references[name];
+ }
+
+ isPure(node, constantsOnly) {
+ if (t.isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+ if (!binding) return false;
+ if (constantsOnly) return binding.constant;
+ return true;
+ } else if (t.isClass(node)) {
+ if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
+ return false;
+ }
+
+ return this.isPure(node.body, constantsOnly);
+ } else if (t.isClassBody(node)) {
+ for (const method of node.body) {
+ if (!this.isPure(method, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (t.isBinary(node)) {
+ return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
+ } else if (t.isArrayExpression(node)) {
+ for (const elem of node.elements) {
+ if (!this.isPure(elem, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (t.isObjectExpression(node)) {
+ for (const prop of node.properties) {
+ if (!this.isPure(prop, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (t.isMethod(node)) {
+ if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
+ if (node.kind === "get" || node.kind === "set") return false;
+ return true;
+ } else if (t.isProperty(node)) {
+ if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
+ return this.isPure(node.value, constantsOnly);
+ } else if (t.isUnaryExpression(node)) {
+ return this.isPure(node.argument, constantsOnly);
+ } else if (t.isTaggedTemplateExpression(node)) {
+ return t.matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
+ } else if (t.isTemplateLiteral(node)) {
+ for (const expression of node.expressions) {
+ if (!this.isPure(expression, constantsOnly)) return false;
+ }
+
+ return true;
+ } else {
+ return t.isPureish(node);
+ }
+ }
+
+ setData(key, val) {
+ return this.data[key] = val;
+ }
+
+ getData(key) {
+ let scope = this;
+
+ do {
+ const data = scope.data[key];
+ if (data != null) return data;
+ } while (scope = scope.parent);
+ }
+
+ removeData(key) {
+ let scope = this;
+
+ do {
+ const data = scope.data[key];
+ if (data != null) scope.data[key] = null;
+ } while (scope = scope.parent);
+ }
+
+ init() {
+ if (!this.inited) {
+ this.inited = true;
+ this.crawl();
+ }
+ }
+
+ crawl() {
+ const path = this.path;
+ this.references = Object.create(null);
+ this.bindings = Object.create(null);
+ this.globals = Object.create(null);
+ this.uids = Object.create(null);
+ this.data = Object.create(null);
+
+ if (path.isFunction()) {
+ if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[t.NOT_LOCAL_BINDING]) {
+ this.registerBinding("local", path.get("id"), path);
+ }
+
+ const params = path.get("params");
+
+ for (const param of params) {
+ this.registerBinding("param", param);
+ }
+ }
+
+ const programParent = this.getProgramParent();
+ if (programParent.crawling) return;
+ const state = {
+ references: [],
+ constantViolations: [],
+ assignments: []
+ };
+ this.crawling = true;
+ path.traverse(collectorVisitor, state);
+ this.crawling = false;
+
+ for (const path of state.assignments) {
+ const ids = path.getBindingIdentifiers();
+
+ for (const name of Object.keys(ids)) {
+ if (path.scope.getBinding(name)) continue;
+ programParent.addGlobal(ids[name]);
+ }
+
+ path.scope.registerConstantViolation(path);
+ }
+
+ for (const ref of state.references) {
+ const binding = ref.scope.getBinding(ref.node.name);
+
+ if (binding) {
+ binding.reference(ref);
+ } else {
+ programParent.addGlobal(ref.node);
+ }
+ }
+
+ for (const path of state.constantViolations) {
+ path.scope.registerConstantViolation(path);
+ }
+ }
+
+ push(opts) {
+ let path = this.path;
+
+ if (!path.isBlockStatement() && !path.isProgram()) {
+ path = this.getBlockParent().path;
+ }
+
+ if (path.isSwitchStatement()) {
+ path = (this.getFunctionParent() || this.getProgramParent()).path;
+ }
+
+ if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
+ path.ensureBlock();
+ path = path.get("body");
+ }
+
+ const unique = opts.unique;
+ const kind = opts.kind || "var";
+ const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
+ const dataKey = `declaration:${kind}:${blockHoist}`;
+ let declarPath = !unique && path.getData(dataKey);
+
+ if (!declarPath) {
+ const declar = t.variableDeclaration(kind, []);
+ declar._blockHoist = blockHoist;
+ [declarPath] = path.unshiftContainer("body", [declar]);
+ if (!unique) path.setData(dataKey, declarPath);
+ }
+
+ const declarator = t.variableDeclarator(opts.id, opts.init);
+ declarPath.node.declarations.push(declarator);
+ this.registerBinding(kind, declarPath.get("declarations").pop());
+ }
+
+ getProgramParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isProgram()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ throw new Error("Couldn't find a Program");
+ }
+
+ getFunctionParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isFunctionParent()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ return null;
+ }
+
+ getBlockParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isBlockParent()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
+ }
+
+ getAllBindings() {
+ const ids = Object.create(null);
+ let scope = this;
+
+ do {
+ for (const key of Object.keys(scope.bindings)) {
+ if (key in ids === false) {
+ ids[key] = scope.bindings[key];
+ }
+ }
+
+ scope = scope.parent;
+ } while (scope);
+
+ return ids;
+ }
+
+ getAllBindingsOfKind() {
+ const ids = Object.create(null);
+
+ for (const kind of arguments) {
+ let scope = this;
+
+ do {
+ for (const name of Object.keys(scope.bindings)) {
+ const binding = scope.bindings[name];
+ if (binding.kind === kind) ids[name] = binding;
+ }
+
+ scope = scope.parent;
+ } while (scope);
+ }
+
+ return ids;
+ }
+
+ bindingIdentifierEquals(name, node) {
+ return this.getBindingIdentifier(name) === node;
+ }
+
+ getBinding(name) {
+ let scope = this;
+ let previousPath;
+
+ do {
+ const binding = scope.getOwnBinding(name);
+
+ if (binding) {
+ var _previousPath;
+
+ if (((_previousPath = previousPath) == null ? void 0 : _previousPath.isPattern()) && binding.kind !== "param") {} else {
+ return binding;
+ }
+ }
+
+ previousPath = scope.path;
+ } while (scope = scope.parent);
+ }
+
+ getOwnBinding(name) {
+ return this.bindings[name];
+ }
+
+ getBindingIdentifier(name) {
+ var _this$getBinding;
+
+ return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier;
+ }
+
+ getOwnBindingIdentifier(name) {
+ const binding = this.bindings[name];
+ return binding == null ? void 0 : binding.identifier;
+ }
+
+ hasOwnBinding(name) {
+ return !!this.getOwnBinding(name);
+ }
+
+ hasBinding(name, noGlobals) {
+ if (!name) return false;
+ if (this.hasOwnBinding(name)) return true;
+ if (this.parentHasBinding(name, noGlobals)) return true;
+ if (this.hasUid(name)) return true;
+ if (!noGlobals && Scope.globals.includes(name)) return true;
+ if (!noGlobals && Scope.contextVariables.includes(name)) return true;
+ return false;
+ }
+
+ parentHasBinding(name, noGlobals) {
+ var _this$parent;
+
+ return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals);
+ }
+
+ moveBindingTo(name, scope) {
+ const info = this.getBinding(name);
+
+ if (info) {
+ info.scope.removeOwnBinding(name);
+ info.scope = scope;
+ scope.bindings[name] = info;
+ }
+ }
+
+ removeOwnBinding(name) {
+ delete this.bindings[name];
+ }
+
+ removeBinding(name) {
+ var _this$getBinding2;
+
+ (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name);
+ let scope = this;
+
+ do {
+ if (scope.uids[name]) {
+ scope.uids[name] = false;
+ }
+ } while (scope = scope.parent);
+ }
+
+}
+
+exports.default = Scope;
+Scope.globals = Object.keys(_globals.default.builtin);
+Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js
new file mode 100644
index 00000000000..6d1bb1847f4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/scope/lib/renamer.js
@@ -0,0 +1,125 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _binding = _interopRequireDefault(require("../binding"));
+
+var _helperSplitExportDeclaration = _interopRequireDefault(require("@babel/helper-split-export-declaration"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const renameVisitor = {
+ ReferencedIdentifier({
+ node
+ }, state) {
+ if (node.name === state.oldName) {
+ node.name = state.newName;
+ }
+ },
+
+ Scope(path, state) {
+ if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
+ path.skip();
+ }
+ },
+
+ "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
+ if (path.isVariableDeclaration()) return;
+ const ids = path.getOuterBindingIdentifiers();
+
+ for (const name in ids) {
+ if (name === state.oldName) ids[name].name = state.newName;
+ }
+ }
+
+};
+
+class Renamer {
+ constructor(binding, oldName, newName) {
+ this.newName = newName;
+ this.oldName = oldName;
+ this.binding = binding;
+ }
+
+ maybeConvertFromExportDeclaration(parentDeclar) {
+ const maybeExportDeclar = parentDeclar.parentPath;
+
+ if (!maybeExportDeclar.isExportDeclaration()) {
+ return;
+ }
+
+ if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
+ return;
+ }
+
+ (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
+ }
+
+ maybeConvertFromClassFunctionDeclaration(path) {
+ return;
+ if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
+ if (this.binding.kind !== "hoisted") return;
+ path.node.id = t.identifier(this.oldName);
+ path.node._blockHoist = 3;
+ path.replaceWith(t.variableDeclaration("let", [t.variableDeclarator(t.identifier(this.newName), t.toExpression(path.node))]));
+ }
+
+ maybeConvertFromClassFunctionExpression(path) {
+ return;
+ if (!path.isFunctionExpression() && !path.isClassExpression()) return;
+ if (this.binding.kind !== "local") return;
+ path.node.id = t.identifier(this.oldName);
+ this.binding.scope.parent.push({
+ id: t.identifier(this.newName)
+ });
+ path.replaceWith(t.assignmentExpression("=", t.identifier(this.newName), path.node));
+ }
+
+ rename(block) {
+ const {
+ binding,
+ oldName,
+ newName
+ } = this;
+ const {
+ scope,
+ path
+ } = binding;
+ const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression());
+
+ if (parentDeclar) {
+ const bindingIds = parentDeclar.getOuterBindingIdentifiers();
+
+ if (bindingIds[oldName] === binding.identifier) {
+ this.maybeConvertFromExportDeclaration(parentDeclar);
+ }
+ }
+
+ scope.traverse(block || scope.block, renameVisitor, this);
+
+ if (!block) {
+ scope.removeOwnBinding(oldName);
+ scope.bindings[newName] = binding;
+ this.binding.identifier.name = newName;
+ }
+
+ if (binding.type === "hoisted") {}
+
+ if (parentDeclar) {
+ this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
+ this.maybeConvertFromClassFunctionExpression(parentDeclar);
+ }
+ }
+
+}
+
+exports.default = Renamer; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js
new file mode 100644
index 00000000000..2a9ea697138
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/lib/visitors.js
@@ -0,0 +1,240 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.explode = explode;
+exports.verify = verify;
+exports.merge = merge;
+
+var virtualTypes = _interopRequireWildcard(require("./path/lib/virtual-types"));
+
+var t = _interopRequireWildcard(require("@babel/types"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function explode(visitor) {
+ if (visitor._exploded) return visitor;
+ visitor._exploded = true;
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const parts = nodeType.split("|");
+ if (parts.length === 1) continue;
+ const fns = visitor[nodeType];
+ delete visitor[nodeType];
+
+ for (const part of parts) {
+ visitor[part] = fns;
+ }
+ }
+
+ verify(visitor);
+ delete visitor.__esModule;
+ ensureEntranceObjects(visitor);
+ ensureCallbackArrays(visitor);
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const wrapper = virtualTypes[nodeType];
+ if (!wrapper) continue;
+ const fns = visitor[nodeType];
+
+ for (const type of Object.keys(fns)) {
+ fns[type] = wrapCheck(wrapper, fns[type]);
+ }
+
+ delete visitor[nodeType];
+
+ if (wrapper.types) {
+ for (const type of wrapper.types) {
+ if (visitor[type]) {
+ mergePair(visitor[type], fns);
+ } else {
+ visitor[type] = fns;
+ }
+ }
+ } else {
+ mergePair(visitor, fns);
+ }
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const fns = visitor[nodeType];
+ let aliases = t.FLIPPED_ALIAS_KEYS[nodeType];
+ const deprecratedKey = t.DEPRECATED_KEYS[nodeType];
+
+ if (deprecratedKey) {
+ console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecratedKey}`);
+ aliases = [deprecratedKey];
+ }
+
+ if (!aliases) continue;
+ delete visitor[nodeType];
+
+ for (const alias of aliases) {
+ const existing = visitor[alias];
+
+ if (existing) {
+ mergePair(existing, fns);
+ } else {
+ visitor[alias] = Object.assign({}, fns);
+ }
+ }
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ ensureCallbackArrays(visitor[nodeType]);
+ }
+
+ return visitor;
+}
+
+function verify(visitor) {
+ if (visitor._verified) return;
+
+ if (typeof visitor === "function") {
+ throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (nodeType === "enter" || nodeType === "exit") {
+ validateVisitorMethods(nodeType, visitor[nodeType]);
+ }
+
+ if (shouldIgnoreKey(nodeType)) continue;
+
+ if (t.TYPES.indexOf(nodeType) < 0) {
+ throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
+ }
+
+ const visitors = visitor[nodeType];
+
+ if (typeof visitors === "object") {
+ for (const visitorKey of Object.keys(visitors)) {
+ if (visitorKey === "enter" || visitorKey === "exit") {
+ validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
+ } else {
+ throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`);
+ }
+ }
+ }
+ }
+
+ visitor._verified = true;
+}
+
+function validateVisitorMethods(path, val) {
+ const fns = [].concat(val);
+
+ for (const fn of fns) {
+ if (typeof fn !== "function") {
+ throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
+ }
+ }
+}
+
+function merge(visitors, states = [], wrapper) {
+ const rootVisitor = {};
+
+ for (let i = 0; i < visitors.length; i++) {
+ const visitor = visitors[i];
+ const state = states[i];
+ explode(visitor);
+
+ for (const type of Object.keys(visitor)) {
+ let visitorType = visitor[type];
+
+ if (state || wrapper) {
+ visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
+ }
+
+ const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
+ mergePair(nodeVisitor, visitorType);
+ }
+ }
+
+ return rootVisitor;
+}
+
+function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
+ const newVisitor = {};
+
+ for (const key of Object.keys(oldVisitor)) {
+ let fns = oldVisitor[key];
+ if (!Array.isArray(fns)) continue;
+ fns = fns.map(function (fn) {
+ let newFn = fn;
+
+ if (state) {
+ newFn = function (path) {
+ return fn.call(state, path, state);
+ };
+ }
+
+ if (wrapper) {
+ newFn = wrapper(state.key, key, newFn);
+ }
+
+ if (newFn !== fn) {
+ newFn.toString = () => fn.toString();
+ }
+
+ return newFn;
+ });
+ newVisitor[key] = fns;
+ }
+
+ return newVisitor;
+}
+
+function ensureEntranceObjects(obj) {
+ for (const key of Object.keys(obj)) {
+ if (shouldIgnoreKey(key)) continue;
+ const fns = obj[key];
+
+ if (typeof fns === "function") {
+ obj[key] = {
+ enter: fns
+ };
+ }
+ }
+}
+
+function ensureCallbackArrays(obj) {
+ if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
+ if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
+}
+
+function wrapCheck(wrapper, fn) {
+ const newFn = function (path) {
+ if (wrapper.checkPath(path)) {
+ return fn.apply(this, arguments);
+ }
+ };
+
+ newFn.toString = () => fn.toString();
+
+ return newFn;
+}
+
+function shouldIgnoreKey(key) {
+ if (key[0] === "_") return true;
+ if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
+
+ if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
+ return true;
+ }
+
+ return false;
+}
+
+function mergePair(dest, src) {
+ for (const key of Object.keys(src)) {
+ dest[key] = [].concat(dest[key] || [], src[key]);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/traverse/package.json b/tools/node_modules/@babel/core/node_modules/@babel/traverse/package.json
new file mode 100644
index 00000000000..3a875cf8674
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/traverse/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "@babel/traverse",
+ "version": "7.12.9",
+ "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-traverse"
+ },
+ "main": "lib/index.js",
+ "dependencies": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.12.5",
+ "@babel/helper-function-name": "^7.10.4",
+ "@babel/helper-split-export-declaration": "^7.11.0",
+ "@babel/parser": "^7.12.7",
+ "@babel/types": "^7.12.7",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0",
+ "lodash": "^4.17.19"
+ },
+ "devDependencies": {
+ "@babel/helper-plugin-test-runner": "7.10.4"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/LICENSE b/tools/node_modules/@babel/core/node_modules/@babel/types/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/README.md b/tools/node_modules/@babel/core/node_modules/@babel/types/README.md
new file mode 100644
index 00000000000..0071bd7a9bc
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/README.md
@@ -0,0 +1,19 @@
+# @babel/types
+
+> Babel Types is a Lodash-esque utility library for AST nodes
+
+See our website [@babel/types](https://babeljs.io/docs/en/babel-types) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/types
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/types --dev
+```
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js
new file mode 100644
index 00000000000..e28a9e0f51b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/assertNode.js
@@ -0,0 +1,19 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = assertNode;
+
+var _isNode = _interopRequireDefault(require("../validators/isNode"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function assertNode(node) {
+ if (!(0, _isNode.default)(node)) {
+ var _node$type;
+
+ const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
+ throw new TypeError(`Not a valid node of type "${type}"`);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js
new file mode 100644
index 00000000000..659c4196f3e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/asserts/generated/index.js
@@ -0,0 +1,1474 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.assertArrayExpression = assertArrayExpression;
+exports.assertAssignmentExpression = assertAssignmentExpression;
+exports.assertBinaryExpression = assertBinaryExpression;
+exports.assertInterpreterDirective = assertInterpreterDirective;
+exports.assertDirective = assertDirective;
+exports.assertDirectiveLiteral = assertDirectiveLiteral;
+exports.assertBlockStatement = assertBlockStatement;
+exports.assertBreakStatement = assertBreakStatement;
+exports.assertCallExpression = assertCallExpression;
+exports.assertCatchClause = assertCatchClause;
+exports.assertConditionalExpression = assertConditionalExpression;
+exports.assertContinueStatement = assertContinueStatement;
+exports.assertDebuggerStatement = assertDebuggerStatement;
+exports.assertDoWhileStatement = assertDoWhileStatement;
+exports.assertEmptyStatement = assertEmptyStatement;
+exports.assertExpressionStatement = assertExpressionStatement;
+exports.assertFile = assertFile;
+exports.assertForInStatement = assertForInStatement;
+exports.assertForStatement = assertForStatement;
+exports.assertFunctionDeclaration = assertFunctionDeclaration;
+exports.assertFunctionExpression = assertFunctionExpression;
+exports.assertIdentifier = assertIdentifier;
+exports.assertIfStatement = assertIfStatement;
+exports.assertLabeledStatement = assertLabeledStatement;
+exports.assertStringLiteral = assertStringLiteral;
+exports.assertNumericLiteral = assertNumericLiteral;
+exports.assertNullLiteral = assertNullLiteral;
+exports.assertBooleanLiteral = assertBooleanLiteral;
+exports.assertRegExpLiteral = assertRegExpLiteral;
+exports.assertLogicalExpression = assertLogicalExpression;
+exports.assertMemberExpression = assertMemberExpression;
+exports.assertNewExpression = assertNewExpression;
+exports.assertProgram = assertProgram;
+exports.assertObjectExpression = assertObjectExpression;
+exports.assertObjectMethod = assertObjectMethod;
+exports.assertObjectProperty = assertObjectProperty;
+exports.assertRestElement = assertRestElement;
+exports.assertReturnStatement = assertReturnStatement;
+exports.assertSequenceExpression = assertSequenceExpression;
+exports.assertParenthesizedExpression = assertParenthesizedExpression;
+exports.assertSwitchCase = assertSwitchCase;
+exports.assertSwitchStatement = assertSwitchStatement;
+exports.assertThisExpression = assertThisExpression;
+exports.assertThrowStatement = assertThrowStatement;
+exports.assertTryStatement = assertTryStatement;
+exports.assertUnaryExpression = assertUnaryExpression;
+exports.assertUpdateExpression = assertUpdateExpression;
+exports.assertVariableDeclaration = assertVariableDeclaration;
+exports.assertVariableDeclarator = assertVariableDeclarator;
+exports.assertWhileStatement = assertWhileStatement;
+exports.assertWithStatement = assertWithStatement;
+exports.assertAssignmentPattern = assertAssignmentPattern;
+exports.assertArrayPattern = assertArrayPattern;
+exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
+exports.assertClassBody = assertClassBody;
+exports.assertClassExpression = assertClassExpression;
+exports.assertClassDeclaration = assertClassDeclaration;
+exports.assertExportAllDeclaration = assertExportAllDeclaration;
+exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
+exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
+exports.assertExportSpecifier = assertExportSpecifier;
+exports.assertForOfStatement = assertForOfStatement;
+exports.assertImportDeclaration = assertImportDeclaration;
+exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
+exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
+exports.assertImportSpecifier = assertImportSpecifier;
+exports.assertMetaProperty = assertMetaProperty;
+exports.assertClassMethod = assertClassMethod;
+exports.assertObjectPattern = assertObjectPattern;
+exports.assertSpreadElement = assertSpreadElement;
+exports.assertSuper = assertSuper;
+exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
+exports.assertTemplateElement = assertTemplateElement;
+exports.assertTemplateLiteral = assertTemplateLiteral;
+exports.assertYieldExpression = assertYieldExpression;
+exports.assertAwaitExpression = assertAwaitExpression;
+exports.assertImport = assertImport;
+exports.assertBigIntLiteral = assertBigIntLiteral;
+exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
+exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
+exports.assertOptionalCallExpression = assertOptionalCallExpression;
+exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
+exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
+exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
+exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
+exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
+exports.assertClassImplements = assertClassImplements;
+exports.assertDeclareClass = assertDeclareClass;
+exports.assertDeclareFunction = assertDeclareFunction;
+exports.assertDeclareInterface = assertDeclareInterface;
+exports.assertDeclareModule = assertDeclareModule;
+exports.assertDeclareModuleExports = assertDeclareModuleExports;
+exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
+exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
+exports.assertDeclareVariable = assertDeclareVariable;
+exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
+exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
+exports.assertDeclaredPredicate = assertDeclaredPredicate;
+exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
+exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
+exports.assertFunctionTypeParam = assertFunctionTypeParam;
+exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
+exports.assertInferredPredicate = assertInferredPredicate;
+exports.assertInterfaceExtends = assertInterfaceExtends;
+exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
+exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
+exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
+exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
+exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
+exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
+exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
+exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
+exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
+exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
+exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
+exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
+exports.assertObjectTypeProperty = assertObjectTypeProperty;
+exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
+exports.assertOpaqueType = assertOpaqueType;
+exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
+exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
+exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
+exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
+exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
+exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
+exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
+exports.assertTypeAlias = assertTypeAlias;
+exports.assertTypeAnnotation = assertTypeAnnotation;
+exports.assertTypeCastExpression = assertTypeCastExpression;
+exports.assertTypeParameter = assertTypeParameter;
+exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
+exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
+exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
+exports.assertVariance = assertVariance;
+exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
+exports.assertEnumDeclaration = assertEnumDeclaration;
+exports.assertEnumBooleanBody = assertEnumBooleanBody;
+exports.assertEnumNumberBody = assertEnumNumberBody;
+exports.assertEnumStringBody = assertEnumStringBody;
+exports.assertEnumSymbolBody = assertEnumSymbolBody;
+exports.assertEnumBooleanMember = assertEnumBooleanMember;
+exports.assertEnumNumberMember = assertEnumNumberMember;
+exports.assertEnumStringMember = assertEnumStringMember;
+exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
+exports.assertJSXAttribute = assertJSXAttribute;
+exports.assertJSXClosingElement = assertJSXClosingElement;
+exports.assertJSXElement = assertJSXElement;
+exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
+exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
+exports.assertJSXSpreadChild = assertJSXSpreadChild;
+exports.assertJSXIdentifier = assertJSXIdentifier;
+exports.assertJSXMemberExpression = assertJSXMemberExpression;
+exports.assertJSXNamespacedName = assertJSXNamespacedName;
+exports.assertJSXOpeningElement = assertJSXOpeningElement;
+exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
+exports.assertJSXText = assertJSXText;
+exports.assertJSXFragment = assertJSXFragment;
+exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
+exports.assertJSXClosingFragment = assertJSXClosingFragment;
+exports.assertNoop = assertNoop;
+exports.assertPlaceholder = assertPlaceholder;
+exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
+exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
+exports.assertBindExpression = assertBindExpression;
+exports.assertClassProperty = assertClassProperty;
+exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
+exports.assertPipelineBareFunction = assertPipelineBareFunction;
+exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
+exports.assertClassPrivateProperty = assertClassPrivateProperty;
+exports.assertClassPrivateMethod = assertClassPrivateMethod;
+exports.assertImportAttribute = assertImportAttribute;
+exports.assertDecorator = assertDecorator;
+exports.assertDoExpression = assertDoExpression;
+exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
+exports.assertPrivateName = assertPrivateName;
+exports.assertRecordExpression = assertRecordExpression;
+exports.assertTupleExpression = assertTupleExpression;
+exports.assertDecimalLiteral = assertDecimalLiteral;
+exports.assertStaticBlock = assertStaticBlock;
+exports.assertTSParameterProperty = assertTSParameterProperty;
+exports.assertTSDeclareFunction = assertTSDeclareFunction;
+exports.assertTSDeclareMethod = assertTSDeclareMethod;
+exports.assertTSQualifiedName = assertTSQualifiedName;
+exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
+exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
+exports.assertTSPropertySignature = assertTSPropertySignature;
+exports.assertTSMethodSignature = assertTSMethodSignature;
+exports.assertTSIndexSignature = assertTSIndexSignature;
+exports.assertTSAnyKeyword = assertTSAnyKeyword;
+exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
+exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
+exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
+exports.assertTSNeverKeyword = assertTSNeverKeyword;
+exports.assertTSNullKeyword = assertTSNullKeyword;
+exports.assertTSNumberKeyword = assertTSNumberKeyword;
+exports.assertTSObjectKeyword = assertTSObjectKeyword;
+exports.assertTSStringKeyword = assertTSStringKeyword;
+exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
+exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
+exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
+exports.assertTSVoidKeyword = assertTSVoidKeyword;
+exports.assertTSThisType = assertTSThisType;
+exports.assertTSFunctionType = assertTSFunctionType;
+exports.assertTSConstructorType = assertTSConstructorType;
+exports.assertTSTypeReference = assertTSTypeReference;
+exports.assertTSTypePredicate = assertTSTypePredicate;
+exports.assertTSTypeQuery = assertTSTypeQuery;
+exports.assertTSTypeLiteral = assertTSTypeLiteral;
+exports.assertTSArrayType = assertTSArrayType;
+exports.assertTSTupleType = assertTSTupleType;
+exports.assertTSOptionalType = assertTSOptionalType;
+exports.assertTSRestType = assertTSRestType;
+exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
+exports.assertTSUnionType = assertTSUnionType;
+exports.assertTSIntersectionType = assertTSIntersectionType;
+exports.assertTSConditionalType = assertTSConditionalType;
+exports.assertTSInferType = assertTSInferType;
+exports.assertTSParenthesizedType = assertTSParenthesizedType;
+exports.assertTSTypeOperator = assertTSTypeOperator;
+exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
+exports.assertTSMappedType = assertTSMappedType;
+exports.assertTSLiteralType = assertTSLiteralType;
+exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
+exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
+exports.assertTSInterfaceBody = assertTSInterfaceBody;
+exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
+exports.assertTSAsExpression = assertTSAsExpression;
+exports.assertTSTypeAssertion = assertTSTypeAssertion;
+exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
+exports.assertTSEnumMember = assertTSEnumMember;
+exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
+exports.assertTSModuleBlock = assertTSModuleBlock;
+exports.assertTSImportType = assertTSImportType;
+exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
+exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
+exports.assertTSNonNullExpression = assertTSNonNullExpression;
+exports.assertTSExportAssignment = assertTSExportAssignment;
+exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
+exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
+exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
+exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
+exports.assertTSTypeParameter = assertTSTypeParameter;
+exports.assertExpression = assertExpression;
+exports.assertBinary = assertBinary;
+exports.assertScopable = assertScopable;
+exports.assertBlockParent = assertBlockParent;
+exports.assertBlock = assertBlock;
+exports.assertStatement = assertStatement;
+exports.assertTerminatorless = assertTerminatorless;
+exports.assertCompletionStatement = assertCompletionStatement;
+exports.assertConditional = assertConditional;
+exports.assertLoop = assertLoop;
+exports.assertWhile = assertWhile;
+exports.assertExpressionWrapper = assertExpressionWrapper;
+exports.assertFor = assertFor;
+exports.assertForXStatement = assertForXStatement;
+exports.assertFunction = assertFunction;
+exports.assertFunctionParent = assertFunctionParent;
+exports.assertPureish = assertPureish;
+exports.assertDeclaration = assertDeclaration;
+exports.assertPatternLike = assertPatternLike;
+exports.assertLVal = assertLVal;
+exports.assertTSEntityName = assertTSEntityName;
+exports.assertLiteral = assertLiteral;
+exports.assertImmutable = assertImmutable;
+exports.assertUserWhitespacable = assertUserWhitespacable;
+exports.assertMethod = assertMethod;
+exports.assertObjectMember = assertObjectMember;
+exports.assertProperty = assertProperty;
+exports.assertUnaryLike = assertUnaryLike;
+exports.assertPattern = assertPattern;
+exports.assertClass = assertClass;
+exports.assertModuleDeclaration = assertModuleDeclaration;
+exports.assertExportDeclaration = assertExportDeclaration;
+exports.assertModuleSpecifier = assertModuleSpecifier;
+exports.assertFlow = assertFlow;
+exports.assertFlowType = assertFlowType;
+exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
+exports.assertFlowDeclaration = assertFlowDeclaration;
+exports.assertFlowPredicate = assertFlowPredicate;
+exports.assertEnumBody = assertEnumBody;
+exports.assertEnumMember = assertEnumMember;
+exports.assertJSX = assertJSX;
+exports.assertPrivate = assertPrivate;
+exports.assertTSTypeElement = assertTSTypeElement;
+exports.assertTSType = assertTSType;
+exports.assertTSBaseType = assertTSBaseType;
+exports.assertNumberLiteral = assertNumberLiteral;
+exports.assertRegexLiteral = assertRegexLiteral;
+exports.assertRestProperty = assertRestProperty;
+exports.assertSpreadProperty = assertSpreadProperty;
+
+var _is = _interopRequireDefault(require("../../validators/is"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function assert(type, node, opts) {
+ if (!(0, _is.default)(type, node, opts)) {
+ throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, ` + `but instead got "${node.type}".`);
+ }
+}
+
+function assertArrayExpression(node, opts = {}) {
+ assert("ArrayExpression", node, opts);
+}
+
+function assertAssignmentExpression(node, opts = {}) {
+ assert("AssignmentExpression", node, opts);
+}
+
+function assertBinaryExpression(node, opts = {}) {
+ assert("BinaryExpression", node, opts);
+}
+
+function assertInterpreterDirective(node, opts = {}) {
+ assert("InterpreterDirective", node, opts);
+}
+
+function assertDirective(node, opts = {}) {
+ assert("Directive", node, opts);
+}
+
+function assertDirectiveLiteral(node, opts = {}) {
+ assert("DirectiveLiteral", node, opts);
+}
+
+function assertBlockStatement(node, opts = {}) {
+ assert("BlockStatement", node, opts);
+}
+
+function assertBreakStatement(node, opts = {}) {
+ assert("BreakStatement", node, opts);
+}
+
+function assertCallExpression(node, opts = {}) {
+ assert("CallExpression", node, opts);
+}
+
+function assertCatchClause(node, opts = {}) {
+ assert("CatchClause", node, opts);
+}
+
+function assertConditionalExpression(node, opts = {}) {
+ assert("ConditionalExpression", node, opts);
+}
+
+function assertContinueStatement(node, opts = {}) {
+ assert("ContinueStatement", node, opts);
+}
+
+function assertDebuggerStatement(node, opts = {}) {
+ assert("DebuggerStatement", node, opts);
+}
+
+function assertDoWhileStatement(node, opts = {}) {
+ assert("DoWhileStatement", node, opts);
+}
+
+function assertEmptyStatement(node, opts = {}) {
+ assert("EmptyStatement", node, opts);
+}
+
+function assertExpressionStatement(node, opts = {}) {
+ assert("ExpressionStatement", node, opts);
+}
+
+function assertFile(node, opts = {}) {
+ assert("File", node, opts);
+}
+
+function assertForInStatement(node, opts = {}) {
+ assert("ForInStatement", node, opts);
+}
+
+function assertForStatement(node, opts = {}) {
+ assert("ForStatement", node, opts);
+}
+
+function assertFunctionDeclaration(node, opts = {}) {
+ assert("FunctionDeclaration", node, opts);
+}
+
+function assertFunctionExpression(node, opts = {}) {
+ assert("FunctionExpression", node, opts);
+}
+
+function assertIdentifier(node, opts = {}) {
+ assert("Identifier", node, opts);
+}
+
+function assertIfStatement(node, opts = {}) {
+ assert("IfStatement", node, opts);
+}
+
+function assertLabeledStatement(node, opts = {}) {
+ assert("LabeledStatement", node, opts);
+}
+
+function assertStringLiteral(node, opts = {}) {
+ assert("StringLiteral", node, opts);
+}
+
+function assertNumericLiteral(node, opts = {}) {
+ assert("NumericLiteral", node, opts);
+}
+
+function assertNullLiteral(node, opts = {}) {
+ assert("NullLiteral", node, opts);
+}
+
+function assertBooleanLiteral(node, opts = {}) {
+ assert("BooleanLiteral", node, opts);
+}
+
+function assertRegExpLiteral(node, opts = {}) {
+ assert("RegExpLiteral", node, opts);
+}
+
+function assertLogicalExpression(node, opts = {}) {
+ assert("LogicalExpression", node, opts);
+}
+
+function assertMemberExpression(node, opts = {}) {
+ assert("MemberExpression", node, opts);
+}
+
+function assertNewExpression(node, opts = {}) {
+ assert("NewExpression", node, opts);
+}
+
+function assertProgram(node, opts = {}) {
+ assert("Program", node, opts);
+}
+
+function assertObjectExpression(node, opts = {}) {
+ assert("ObjectExpression", node, opts);
+}
+
+function assertObjectMethod(node, opts = {}) {
+ assert("ObjectMethod", node, opts);
+}
+
+function assertObjectProperty(node, opts = {}) {
+ assert("ObjectProperty", node, opts);
+}
+
+function assertRestElement(node, opts = {}) {
+ assert("RestElement", node, opts);
+}
+
+function assertReturnStatement(node, opts = {}) {
+ assert("ReturnStatement", node, opts);
+}
+
+function assertSequenceExpression(node, opts = {}) {
+ assert("SequenceExpression", node, opts);
+}
+
+function assertParenthesizedExpression(node, opts = {}) {
+ assert("ParenthesizedExpression", node, opts);
+}
+
+function assertSwitchCase(node, opts = {}) {
+ assert("SwitchCase", node, opts);
+}
+
+function assertSwitchStatement(node, opts = {}) {
+ assert("SwitchStatement", node, opts);
+}
+
+function assertThisExpression(node, opts = {}) {
+ assert("ThisExpression", node, opts);
+}
+
+function assertThrowStatement(node, opts = {}) {
+ assert("ThrowStatement", node, opts);
+}
+
+function assertTryStatement(node, opts = {}) {
+ assert("TryStatement", node, opts);
+}
+
+function assertUnaryExpression(node, opts = {}) {
+ assert("UnaryExpression", node, opts);
+}
+
+function assertUpdateExpression(node, opts = {}) {
+ assert("UpdateExpression", node, opts);
+}
+
+function assertVariableDeclaration(node, opts = {}) {
+ assert("VariableDeclaration", node, opts);
+}
+
+function assertVariableDeclarator(node, opts = {}) {
+ assert("VariableDeclarator", node, opts);
+}
+
+function assertWhileStatement(node, opts = {}) {
+ assert("WhileStatement", node, opts);
+}
+
+function assertWithStatement(node, opts = {}) {
+ assert("WithStatement", node, opts);
+}
+
+function assertAssignmentPattern(node, opts = {}) {
+ assert("AssignmentPattern", node, opts);
+}
+
+function assertArrayPattern(node, opts = {}) {
+ assert("ArrayPattern", node, opts);
+}
+
+function assertArrowFunctionExpression(node, opts = {}) {
+ assert("ArrowFunctionExpression", node, opts);
+}
+
+function assertClassBody(node, opts = {}) {
+ assert("ClassBody", node, opts);
+}
+
+function assertClassExpression(node, opts = {}) {
+ assert("ClassExpression", node, opts);
+}
+
+function assertClassDeclaration(node, opts = {}) {
+ assert("ClassDeclaration", node, opts);
+}
+
+function assertExportAllDeclaration(node, opts = {}) {
+ assert("ExportAllDeclaration", node, opts);
+}
+
+function assertExportDefaultDeclaration(node, opts = {}) {
+ assert("ExportDefaultDeclaration", node, opts);
+}
+
+function assertExportNamedDeclaration(node, opts = {}) {
+ assert("ExportNamedDeclaration", node, opts);
+}
+
+function assertExportSpecifier(node, opts = {}) {
+ assert("ExportSpecifier", node, opts);
+}
+
+function assertForOfStatement(node, opts = {}) {
+ assert("ForOfStatement", node, opts);
+}
+
+function assertImportDeclaration(node, opts = {}) {
+ assert("ImportDeclaration", node, opts);
+}
+
+function assertImportDefaultSpecifier(node, opts = {}) {
+ assert("ImportDefaultSpecifier", node, opts);
+}
+
+function assertImportNamespaceSpecifier(node, opts = {}) {
+ assert("ImportNamespaceSpecifier", node, opts);
+}
+
+function assertImportSpecifier(node, opts = {}) {
+ assert("ImportSpecifier", node, opts);
+}
+
+function assertMetaProperty(node, opts = {}) {
+ assert("MetaProperty", node, opts);
+}
+
+function assertClassMethod(node, opts = {}) {
+ assert("ClassMethod", node, opts);
+}
+
+function assertObjectPattern(node, opts = {}) {
+ assert("ObjectPattern", node, opts);
+}
+
+function assertSpreadElement(node, opts = {}) {
+ assert("SpreadElement", node, opts);
+}
+
+function assertSuper(node, opts = {}) {
+ assert("Super", node, opts);
+}
+
+function assertTaggedTemplateExpression(node, opts = {}) {
+ assert("TaggedTemplateExpression", node, opts);
+}
+
+function assertTemplateElement(node, opts = {}) {
+ assert("TemplateElement", node, opts);
+}
+
+function assertTemplateLiteral(node, opts = {}) {
+ assert("TemplateLiteral", node, opts);
+}
+
+function assertYieldExpression(node, opts = {}) {
+ assert("YieldExpression", node, opts);
+}
+
+function assertAwaitExpression(node, opts = {}) {
+ assert("AwaitExpression", node, opts);
+}
+
+function assertImport(node, opts = {}) {
+ assert("Import", node, opts);
+}
+
+function assertBigIntLiteral(node, opts = {}) {
+ assert("BigIntLiteral", node, opts);
+}
+
+function assertExportNamespaceSpecifier(node, opts = {}) {
+ assert("ExportNamespaceSpecifier", node, opts);
+}
+
+function assertOptionalMemberExpression(node, opts = {}) {
+ assert("OptionalMemberExpression", node, opts);
+}
+
+function assertOptionalCallExpression(node, opts = {}) {
+ assert("OptionalCallExpression", node, opts);
+}
+
+function assertAnyTypeAnnotation(node, opts = {}) {
+ assert("AnyTypeAnnotation", node, opts);
+}
+
+function assertArrayTypeAnnotation(node, opts = {}) {
+ assert("ArrayTypeAnnotation", node, opts);
+}
+
+function assertBooleanTypeAnnotation(node, opts = {}) {
+ assert("BooleanTypeAnnotation", node, opts);
+}
+
+function assertBooleanLiteralTypeAnnotation(node, opts = {}) {
+ assert("BooleanLiteralTypeAnnotation", node, opts);
+}
+
+function assertNullLiteralTypeAnnotation(node, opts = {}) {
+ assert("NullLiteralTypeAnnotation", node, opts);
+}
+
+function assertClassImplements(node, opts = {}) {
+ assert("ClassImplements", node, opts);
+}
+
+function assertDeclareClass(node, opts = {}) {
+ assert("DeclareClass", node, opts);
+}
+
+function assertDeclareFunction(node, opts = {}) {
+ assert("DeclareFunction", node, opts);
+}
+
+function assertDeclareInterface(node, opts = {}) {
+ assert("DeclareInterface", node, opts);
+}
+
+function assertDeclareModule(node, opts = {}) {
+ assert("DeclareModule", node, opts);
+}
+
+function assertDeclareModuleExports(node, opts = {}) {
+ assert("DeclareModuleExports", node, opts);
+}
+
+function assertDeclareTypeAlias(node, opts = {}) {
+ assert("DeclareTypeAlias", node, opts);
+}
+
+function assertDeclareOpaqueType(node, opts = {}) {
+ assert("DeclareOpaqueType", node, opts);
+}
+
+function assertDeclareVariable(node, opts = {}) {
+ assert("DeclareVariable", node, opts);
+}
+
+function assertDeclareExportDeclaration(node, opts = {}) {
+ assert("DeclareExportDeclaration", node, opts);
+}
+
+function assertDeclareExportAllDeclaration(node, opts = {}) {
+ assert("DeclareExportAllDeclaration", node, opts);
+}
+
+function assertDeclaredPredicate(node, opts = {}) {
+ assert("DeclaredPredicate", node, opts);
+}
+
+function assertExistsTypeAnnotation(node, opts = {}) {
+ assert("ExistsTypeAnnotation", node, opts);
+}
+
+function assertFunctionTypeAnnotation(node, opts = {}) {
+ assert("FunctionTypeAnnotation", node, opts);
+}
+
+function assertFunctionTypeParam(node, opts = {}) {
+ assert("FunctionTypeParam", node, opts);
+}
+
+function assertGenericTypeAnnotation(node, opts = {}) {
+ assert("GenericTypeAnnotation", node, opts);
+}
+
+function assertInferredPredicate(node, opts = {}) {
+ assert("InferredPredicate", node, opts);
+}
+
+function assertInterfaceExtends(node, opts = {}) {
+ assert("InterfaceExtends", node, opts);
+}
+
+function assertInterfaceDeclaration(node, opts = {}) {
+ assert("InterfaceDeclaration", node, opts);
+}
+
+function assertInterfaceTypeAnnotation(node, opts = {}) {
+ assert("InterfaceTypeAnnotation", node, opts);
+}
+
+function assertIntersectionTypeAnnotation(node, opts = {}) {
+ assert("IntersectionTypeAnnotation", node, opts);
+}
+
+function assertMixedTypeAnnotation(node, opts = {}) {
+ assert("MixedTypeAnnotation", node, opts);
+}
+
+function assertEmptyTypeAnnotation(node, opts = {}) {
+ assert("EmptyTypeAnnotation", node, opts);
+}
+
+function assertNullableTypeAnnotation(node, opts = {}) {
+ assert("NullableTypeAnnotation", node, opts);
+}
+
+function assertNumberLiteralTypeAnnotation(node, opts = {}) {
+ assert("NumberLiteralTypeAnnotation", node, opts);
+}
+
+function assertNumberTypeAnnotation(node, opts = {}) {
+ assert("NumberTypeAnnotation", node, opts);
+}
+
+function assertObjectTypeAnnotation(node, opts = {}) {
+ assert("ObjectTypeAnnotation", node, opts);
+}
+
+function assertObjectTypeInternalSlot(node, opts = {}) {
+ assert("ObjectTypeInternalSlot", node, opts);
+}
+
+function assertObjectTypeCallProperty(node, opts = {}) {
+ assert("ObjectTypeCallProperty", node, opts);
+}
+
+function assertObjectTypeIndexer(node, opts = {}) {
+ assert("ObjectTypeIndexer", node, opts);
+}
+
+function assertObjectTypeProperty(node, opts = {}) {
+ assert("ObjectTypeProperty", node, opts);
+}
+
+function assertObjectTypeSpreadProperty(node, opts = {}) {
+ assert("ObjectTypeSpreadProperty", node, opts);
+}
+
+function assertOpaqueType(node, opts = {}) {
+ assert("OpaqueType", node, opts);
+}
+
+function assertQualifiedTypeIdentifier(node, opts = {}) {
+ assert("QualifiedTypeIdentifier", node, opts);
+}
+
+function assertStringLiteralTypeAnnotation(node, opts = {}) {
+ assert("StringLiteralTypeAnnotation", node, opts);
+}
+
+function assertStringTypeAnnotation(node, opts = {}) {
+ assert("StringTypeAnnotation", node, opts);
+}
+
+function assertSymbolTypeAnnotation(node, opts = {}) {
+ assert("SymbolTypeAnnotation", node, opts);
+}
+
+function assertThisTypeAnnotation(node, opts = {}) {
+ assert("ThisTypeAnnotation", node, opts);
+}
+
+function assertTupleTypeAnnotation(node, opts = {}) {
+ assert("TupleTypeAnnotation", node, opts);
+}
+
+function assertTypeofTypeAnnotation(node, opts = {}) {
+ assert("TypeofTypeAnnotation", node, opts);
+}
+
+function assertTypeAlias(node, opts = {}) {
+ assert("TypeAlias", node, opts);
+}
+
+function assertTypeAnnotation(node, opts = {}) {
+ assert("TypeAnnotation", node, opts);
+}
+
+function assertTypeCastExpression(node, opts = {}) {
+ assert("TypeCastExpression", node, opts);
+}
+
+function assertTypeParameter(node, opts = {}) {
+ assert("TypeParameter", node, opts);
+}
+
+function assertTypeParameterDeclaration(node, opts = {}) {
+ assert("TypeParameterDeclaration", node, opts);
+}
+
+function assertTypeParameterInstantiation(node, opts = {}) {
+ assert("TypeParameterInstantiation", node, opts);
+}
+
+function assertUnionTypeAnnotation(node, opts = {}) {
+ assert("UnionTypeAnnotation", node, opts);
+}
+
+function assertVariance(node, opts = {}) {
+ assert("Variance", node, opts);
+}
+
+function assertVoidTypeAnnotation(node, opts = {}) {
+ assert("VoidTypeAnnotation", node, opts);
+}
+
+function assertEnumDeclaration(node, opts = {}) {
+ assert("EnumDeclaration", node, opts);
+}
+
+function assertEnumBooleanBody(node, opts = {}) {
+ assert("EnumBooleanBody", node, opts);
+}
+
+function assertEnumNumberBody(node, opts = {}) {
+ assert("EnumNumberBody", node, opts);
+}
+
+function assertEnumStringBody(node, opts = {}) {
+ assert("EnumStringBody", node, opts);
+}
+
+function assertEnumSymbolBody(node, opts = {}) {
+ assert("EnumSymbolBody", node, opts);
+}
+
+function assertEnumBooleanMember(node, opts = {}) {
+ assert("EnumBooleanMember", node, opts);
+}
+
+function assertEnumNumberMember(node, opts = {}) {
+ assert("EnumNumberMember", node, opts);
+}
+
+function assertEnumStringMember(node, opts = {}) {
+ assert("EnumStringMember", node, opts);
+}
+
+function assertEnumDefaultedMember(node, opts = {}) {
+ assert("EnumDefaultedMember", node, opts);
+}
+
+function assertJSXAttribute(node, opts = {}) {
+ assert("JSXAttribute", node, opts);
+}
+
+function assertJSXClosingElement(node, opts = {}) {
+ assert("JSXClosingElement", node, opts);
+}
+
+function assertJSXElement(node, opts = {}) {
+ assert("JSXElement", node, opts);
+}
+
+function assertJSXEmptyExpression(node, opts = {}) {
+ assert("JSXEmptyExpression", node, opts);
+}
+
+function assertJSXExpressionContainer(node, opts = {}) {
+ assert("JSXExpressionContainer", node, opts);
+}
+
+function assertJSXSpreadChild(node, opts = {}) {
+ assert("JSXSpreadChild", node, opts);
+}
+
+function assertJSXIdentifier(node, opts = {}) {
+ assert("JSXIdentifier", node, opts);
+}
+
+function assertJSXMemberExpression(node, opts = {}) {
+ assert("JSXMemberExpression", node, opts);
+}
+
+function assertJSXNamespacedName(node, opts = {}) {
+ assert("JSXNamespacedName", node, opts);
+}
+
+function assertJSXOpeningElement(node, opts = {}) {
+ assert("JSXOpeningElement", node, opts);
+}
+
+function assertJSXSpreadAttribute(node, opts = {}) {
+ assert("JSXSpreadAttribute", node, opts);
+}
+
+function assertJSXText(node, opts = {}) {
+ assert("JSXText", node, opts);
+}
+
+function assertJSXFragment(node, opts = {}) {
+ assert("JSXFragment", node, opts);
+}
+
+function assertJSXOpeningFragment(node, opts = {}) {
+ assert("JSXOpeningFragment", node, opts);
+}
+
+function assertJSXClosingFragment(node, opts = {}) {
+ assert("JSXClosingFragment", node, opts);
+}
+
+function assertNoop(node, opts = {}) {
+ assert("Noop", node, opts);
+}
+
+function assertPlaceholder(node, opts = {}) {
+ assert("Placeholder", node, opts);
+}
+
+function assertV8IntrinsicIdentifier(node, opts = {}) {
+ assert("V8IntrinsicIdentifier", node, opts);
+}
+
+function assertArgumentPlaceholder(node, opts = {}) {
+ assert("ArgumentPlaceholder", node, opts);
+}
+
+function assertBindExpression(node, opts = {}) {
+ assert("BindExpression", node, opts);
+}
+
+function assertClassProperty(node, opts = {}) {
+ assert("ClassProperty", node, opts);
+}
+
+function assertPipelineTopicExpression(node, opts = {}) {
+ assert("PipelineTopicExpression", node, opts);
+}
+
+function assertPipelineBareFunction(node, opts = {}) {
+ assert("PipelineBareFunction", node, opts);
+}
+
+function assertPipelinePrimaryTopicReference(node, opts = {}) {
+ assert("PipelinePrimaryTopicReference", node, opts);
+}
+
+function assertClassPrivateProperty(node, opts = {}) {
+ assert("ClassPrivateProperty", node, opts);
+}
+
+function assertClassPrivateMethod(node, opts = {}) {
+ assert("ClassPrivateMethod", node, opts);
+}
+
+function assertImportAttribute(node, opts = {}) {
+ assert("ImportAttribute", node, opts);
+}
+
+function assertDecorator(node, opts = {}) {
+ assert("Decorator", node, opts);
+}
+
+function assertDoExpression(node, opts = {}) {
+ assert("DoExpression", node, opts);
+}
+
+function assertExportDefaultSpecifier(node, opts = {}) {
+ assert("ExportDefaultSpecifier", node, opts);
+}
+
+function assertPrivateName(node, opts = {}) {
+ assert("PrivateName", node, opts);
+}
+
+function assertRecordExpression(node, opts = {}) {
+ assert("RecordExpression", node, opts);
+}
+
+function assertTupleExpression(node, opts = {}) {
+ assert("TupleExpression", node, opts);
+}
+
+function assertDecimalLiteral(node, opts = {}) {
+ assert("DecimalLiteral", node, opts);
+}
+
+function assertStaticBlock(node, opts = {}) {
+ assert("StaticBlock", node, opts);
+}
+
+function assertTSParameterProperty(node, opts = {}) {
+ assert("TSParameterProperty", node, opts);
+}
+
+function assertTSDeclareFunction(node, opts = {}) {
+ assert("TSDeclareFunction", node, opts);
+}
+
+function assertTSDeclareMethod(node, opts = {}) {
+ assert("TSDeclareMethod", node, opts);
+}
+
+function assertTSQualifiedName(node, opts = {}) {
+ assert("TSQualifiedName", node, opts);
+}
+
+function assertTSCallSignatureDeclaration(node, opts = {}) {
+ assert("TSCallSignatureDeclaration", node, opts);
+}
+
+function assertTSConstructSignatureDeclaration(node, opts = {}) {
+ assert("TSConstructSignatureDeclaration", node, opts);
+}
+
+function assertTSPropertySignature(node, opts = {}) {
+ assert("TSPropertySignature", node, opts);
+}
+
+function assertTSMethodSignature(node, opts = {}) {
+ assert("TSMethodSignature", node, opts);
+}
+
+function assertTSIndexSignature(node, opts = {}) {
+ assert("TSIndexSignature", node, opts);
+}
+
+function assertTSAnyKeyword(node, opts = {}) {
+ assert("TSAnyKeyword", node, opts);
+}
+
+function assertTSBooleanKeyword(node, opts = {}) {
+ assert("TSBooleanKeyword", node, opts);
+}
+
+function assertTSBigIntKeyword(node, opts = {}) {
+ assert("TSBigIntKeyword", node, opts);
+}
+
+function assertTSIntrinsicKeyword(node, opts = {}) {
+ assert("TSIntrinsicKeyword", node, opts);
+}
+
+function assertTSNeverKeyword(node, opts = {}) {
+ assert("TSNeverKeyword", node, opts);
+}
+
+function assertTSNullKeyword(node, opts = {}) {
+ assert("TSNullKeyword", node, opts);
+}
+
+function assertTSNumberKeyword(node, opts = {}) {
+ assert("TSNumberKeyword", node, opts);
+}
+
+function assertTSObjectKeyword(node, opts = {}) {
+ assert("TSObjectKeyword", node, opts);
+}
+
+function assertTSStringKeyword(node, opts = {}) {
+ assert("TSStringKeyword", node, opts);
+}
+
+function assertTSSymbolKeyword(node, opts = {}) {
+ assert("TSSymbolKeyword", node, opts);
+}
+
+function assertTSUndefinedKeyword(node, opts = {}) {
+ assert("TSUndefinedKeyword", node, opts);
+}
+
+function assertTSUnknownKeyword(node, opts = {}) {
+ assert("TSUnknownKeyword", node, opts);
+}
+
+function assertTSVoidKeyword(node, opts = {}) {
+ assert("TSVoidKeyword", node, opts);
+}
+
+function assertTSThisType(node, opts = {}) {
+ assert("TSThisType", node, opts);
+}
+
+function assertTSFunctionType(node, opts = {}) {
+ assert("TSFunctionType", node, opts);
+}
+
+function assertTSConstructorType(node, opts = {}) {
+ assert("TSConstructorType", node, opts);
+}
+
+function assertTSTypeReference(node, opts = {}) {
+ assert("TSTypeReference", node, opts);
+}
+
+function assertTSTypePredicate(node, opts = {}) {
+ assert("TSTypePredicate", node, opts);
+}
+
+function assertTSTypeQuery(node, opts = {}) {
+ assert("TSTypeQuery", node, opts);
+}
+
+function assertTSTypeLiteral(node, opts = {}) {
+ assert("TSTypeLiteral", node, opts);
+}
+
+function assertTSArrayType(node, opts = {}) {
+ assert("TSArrayType", node, opts);
+}
+
+function assertTSTupleType(node, opts = {}) {
+ assert("TSTupleType", node, opts);
+}
+
+function assertTSOptionalType(node, opts = {}) {
+ assert("TSOptionalType", node, opts);
+}
+
+function assertTSRestType(node, opts = {}) {
+ assert("TSRestType", node, opts);
+}
+
+function assertTSNamedTupleMember(node, opts = {}) {
+ assert("TSNamedTupleMember", node, opts);
+}
+
+function assertTSUnionType(node, opts = {}) {
+ assert("TSUnionType", node, opts);
+}
+
+function assertTSIntersectionType(node, opts = {}) {
+ assert("TSIntersectionType", node, opts);
+}
+
+function assertTSConditionalType(node, opts = {}) {
+ assert("TSConditionalType", node, opts);
+}
+
+function assertTSInferType(node, opts = {}) {
+ assert("TSInferType", node, opts);
+}
+
+function assertTSParenthesizedType(node, opts = {}) {
+ assert("TSParenthesizedType", node, opts);
+}
+
+function assertTSTypeOperator(node, opts = {}) {
+ assert("TSTypeOperator", node, opts);
+}
+
+function assertTSIndexedAccessType(node, opts = {}) {
+ assert("TSIndexedAccessType", node, opts);
+}
+
+function assertTSMappedType(node, opts = {}) {
+ assert("TSMappedType", node, opts);
+}
+
+function assertTSLiteralType(node, opts = {}) {
+ assert("TSLiteralType", node, opts);
+}
+
+function assertTSExpressionWithTypeArguments(node, opts = {}) {
+ assert("TSExpressionWithTypeArguments", node, opts);
+}
+
+function assertTSInterfaceDeclaration(node, opts = {}) {
+ assert("TSInterfaceDeclaration", node, opts);
+}
+
+function assertTSInterfaceBody(node, opts = {}) {
+ assert("TSInterfaceBody", node, opts);
+}
+
+function assertTSTypeAliasDeclaration(node, opts = {}) {
+ assert("TSTypeAliasDeclaration", node, opts);
+}
+
+function assertTSAsExpression(node, opts = {}) {
+ assert("TSAsExpression", node, opts);
+}
+
+function assertTSTypeAssertion(node, opts = {}) {
+ assert("TSTypeAssertion", node, opts);
+}
+
+function assertTSEnumDeclaration(node, opts = {}) {
+ assert("TSEnumDeclaration", node, opts);
+}
+
+function assertTSEnumMember(node, opts = {}) {
+ assert("TSEnumMember", node, opts);
+}
+
+function assertTSModuleDeclaration(node, opts = {}) {
+ assert("TSModuleDeclaration", node, opts);
+}
+
+function assertTSModuleBlock(node, opts = {}) {
+ assert("TSModuleBlock", node, opts);
+}
+
+function assertTSImportType(node, opts = {}) {
+ assert("TSImportType", node, opts);
+}
+
+function assertTSImportEqualsDeclaration(node, opts = {}) {
+ assert("TSImportEqualsDeclaration", node, opts);
+}
+
+function assertTSExternalModuleReference(node, opts = {}) {
+ assert("TSExternalModuleReference", node, opts);
+}
+
+function assertTSNonNullExpression(node, opts = {}) {
+ assert("TSNonNullExpression", node, opts);
+}
+
+function assertTSExportAssignment(node, opts = {}) {
+ assert("TSExportAssignment", node, opts);
+}
+
+function assertTSNamespaceExportDeclaration(node, opts = {}) {
+ assert("TSNamespaceExportDeclaration", node, opts);
+}
+
+function assertTSTypeAnnotation(node, opts = {}) {
+ assert("TSTypeAnnotation", node, opts);
+}
+
+function assertTSTypeParameterInstantiation(node, opts = {}) {
+ assert("TSTypeParameterInstantiation", node, opts);
+}
+
+function assertTSTypeParameterDeclaration(node, opts = {}) {
+ assert("TSTypeParameterDeclaration", node, opts);
+}
+
+function assertTSTypeParameter(node, opts = {}) {
+ assert("TSTypeParameter", node, opts);
+}
+
+function assertExpression(node, opts = {}) {
+ assert("Expression", node, opts);
+}
+
+function assertBinary(node, opts = {}) {
+ assert("Binary", node, opts);
+}
+
+function assertScopable(node, opts = {}) {
+ assert("Scopable", node, opts);
+}
+
+function assertBlockParent(node, opts = {}) {
+ assert("BlockParent", node, opts);
+}
+
+function assertBlock(node, opts = {}) {
+ assert("Block", node, opts);
+}
+
+function assertStatement(node, opts = {}) {
+ assert("Statement", node, opts);
+}
+
+function assertTerminatorless(node, opts = {}) {
+ assert("Terminatorless", node, opts);
+}
+
+function assertCompletionStatement(node, opts = {}) {
+ assert("CompletionStatement", node, opts);
+}
+
+function assertConditional(node, opts = {}) {
+ assert("Conditional", node, opts);
+}
+
+function assertLoop(node, opts = {}) {
+ assert("Loop", node, opts);
+}
+
+function assertWhile(node, opts = {}) {
+ assert("While", node, opts);
+}
+
+function assertExpressionWrapper(node, opts = {}) {
+ assert("ExpressionWrapper", node, opts);
+}
+
+function assertFor(node, opts = {}) {
+ assert("For", node, opts);
+}
+
+function assertForXStatement(node, opts = {}) {
+ assert("ForXStatement", node, opts);
+}
+
+function assertFunction(node, opts = {}) {
+ assert("Function", node, opts);
+}
+
+function assertFunctionParent(node, opts = {}) {
+ assert("FunctionParent", node, opts);
+}
+
+function assertPureish(node, opts = {}) {
+ assert("Pureish", node, opts);
+}
+
+function assertDeclaration(node, opts = {}) {
+ assert("Declaration", node, opts);
+}
+
+function assertPatternLike(node, opts = {}) {
+ assert("PatternLike", node, opts);
+}
+
+function assertLVal(node, opts = {}) {
+ assert("LVal", node, opts);
+}
+
+function assertTSEntityName(node, opts = {}) {
+ assert("TSEntityName", node, opts);
+}
+
+function assertLiteral(node, opts = {}) {
+ assert("Literal", node, opts);
+}
+
+function assertImmutable(node, opts = {}) {
+ assert("Immutable", node, opts);
+}
+
+function assertUserWhitespacable(node, opts = {}) {
+ assert("UserWhitespacable", node, opts);
+}
+
+function assertMethod(node, opts = {}) {
+ assert("Method", node, opts);
+}
+
+function assertObjectMember(node, opts = {}) {
+ assert("ObjectMember", node, opts);
+}
+
+function assertProperty(node, opts = {}) {
+ assert("Property", node, opts);
+}
+
+function assertUnaryLike(node, opts = {}) {
+ assert("UnaryLike", node, opts);
+}
+
+function assertPattern(node, opts = {}) {
+ assert("Pattern", node, opts);
+}
+
+function assertClass(node, opts = {}) {
+ assert("Class", node, opts);
+}
+
+function assertModuleDeclaration(node, opts = {}) {
+ assert("ModuleDeclaration", node, opts);
+}
+
+function assertExportDeclaration(node, opts = {}) {
+ assert("ExportDeclaration", node, opts);
+}
+
+function assertModuleSpecifier(node, opts = {}) {
+ assert("ModuleSpecifier", node, opts);
+}
+
+function assertFlow(node, opts = {}) {
+ assert("Flow", node, opts);
+}
+
+function assertFlowType(node, opts = {}) {
+ assert("FlowType", node, opts);
+}
+
+function assertFlowBaseAnnotation(node, opts = {}) {
+ assert("FlowBaseAnnotation", node, opts);
+}
+
+function assertFlowDeclaration(node, opts = {}) {
+ assert("FlowDeclaration", node, opts);
+}
+
+function assertFlowPredicate(node, opts = {}) {
+ assert("FlowPredicate", node, opts);
+}
+
+function assertEnumBody(node, opts = {}) {
+ assert("EnumBody", node, opts);
+}
+
+function assertEnumMember(node, opts = {}) {
+ assert("EnumMember", node, opts);
+}
+
+function assertJSX(node, opts = {}) {
+ assert("JSX", node, opts);
+}
+
+function assertPrivate(node, opts = {}) {
+ assert("Private", node, opts);
+}
+
+function assertTSTypeElement(node, opts = {}) {
+ assert("TSTypeElement", node, opts);
+}
+
+function assertTSType(node, opts = {}) {
+ assert("TSType", node, opts);
+}
+
+function assertTSBaseType(node, opts = {}) {
+ assert("TSBaseType", node, opts);
+}
+
+function assertNumberLiteral(node, opts) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ assert("NumberLiteral", node, opts);
+}
+
+function assertRegexLiteral(node, opts) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ assert("RegexLiteral", node, opts);
+}
+
+function assertRestProperty(node, opts) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ assert("RestProperty", node, opts);
+}
+
+function assertSpreadProperty(node, opts) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ assert("SpreadProperty", node, opts);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js
new file mode 100644
index 00000000000..812cc179330
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/builder.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = builder;
+
+var _clone = _interopRequireDefault(require("lodash/clone"));
+
+var _definitions = require("../definitions");
+
+var _validate = _interopRequireDefault(require("../validators/validate"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function builder(type, ...args) {
+ const keys = _definitions.BUILDER_KEYS[type];
+ const countArgs = args.length;
+
+ if (countArgs > keys.length) {
+ throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`);
+ }
+
+ const node = {
+ type
+ };
+ let i = 0;
+ keys.forEach(key => {
+ const field = _definitions.NODE_FIELDS[type][key];
+ let arg;
+ if (i < countArgs) arg = args[i];
+ if (arg === undefined) arg = (0, _clone.default)(field.default);
+ node[key] = arg;
+ i++;
+ });
+
+ for (const key of Object.keys(node)) {
+ (0, _validate.default)(node, key, node[key]);
+ }
+
+ return node;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
new file mode 100644
index 00000000000..a91391ffdcf
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = createFlowUnionType;
+
+var _generated = require("../generated");
+
+var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function createFlowUnionType(types) {
+ const flattened = (0, _removeTypeDuplicates.default)(types);
+
+ if (flattened.length === 1) {
+ return flattened[0];
+ } else {
+ return (0, _generated.unionTypeAnnotation)(flattened);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
index 4724335f2ab..4724335f2ab 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js
new file mode 100644
index 00000000000..18152119ac7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/generated/index.js
@@ -0,0 +1,1243 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArrayExpression = exports.arrayExpression = arrayExpression;
+exports.AssignmentExpression = exports.assignmentExpression = assignmentExpression;
+exports.BinaryExpression = exports.binaryExpression = binaryExpression;
+exports.InterpreterDirective = exports.interpreterDirective = interpreterDirective;
+exports.Directive = exports.directive = directive;
+exports.DirectiveLiteral = exports.directiveLiteral = directiveLiteral;
+exports.BlockStatement = exports.blockStatement = blockStatement;
+exports.BreakStatement = exports.breakStatement = breakStatement;
+exports.CallExpression = exports.callExpression = callExpression;
+exports.CatchClause = exports.catchClause = catchClause;
+exports.ConditionalExpression = exports.conditionalExpression = conditionalExpression;
+exports.ContinueStatement = exports.continueStatement = continueStatement;
+exports.DebuggerStatement = exports.debuggerStatement = debuggerStatement;
+exports.DoWhileStatement = exports.doWhileStatement = doWhileStatement;
+exports.EmptyStatement = exports.emptyStatement = emptyStatement;
+exports.ExpressionStatement = exports.expressionStatement = expressionStatement;
+exports.File = exports.file = file;
+exports.ForInStatement = exports.forInStatement = forInStatement;
+exports.ForStatement = exports.forStatement = forStatement;
+exports.FunctionDeclaration = exports.functionDeclaration = functionDeclaration;
+exports.FunctionExpression = exports.functionExpression = functionExpression;
+exports.Identifier = exports.identifier = identifier;
+exports.IfStatement = exports.ifStatement = ifStatement;
+exports.LabeledStatement = exports.labeledStatement = labeledStatement;
+exports.StringLiteral = exports.stringLiteral = stringLiteral;
+exports.NumericLiteral = exports.numericLiteral = numericLiteral;
+exports.NullLiteral = exports.nullLiteral = nullLiteral;
+exports.BooleanLiteral = exports.booleanLiteral = booleanLiteral;
+exports.RegExpLiteral = exports.regExpLiteral = regExpLiteral;
+exports.LogicalExpression = exports.logicalExpression = logicalExpression;
+exports.MemberExpression = exports.memberExpression = memberExpression;
+exports.NewExpression = exports.newExpression = newExpression;
+exports.Program = exports.program = program;
+exports.ObjectExpression = exports.objectExpression = objectExpression;
+exports.ObjectMethod = exports.objectMethod = objectMethod;
+exports.ObjectProperty = exports.objectProperty = objectProperty;
+exports.RestElement = exports.restElement = restElement;
+exports.ReturnStatement = exports.returnStatement = returnStatement;
+exports.SequenceExpression = exports.sequenceExpression = sequenceExpression;
+exports.ParenthesizedExpression = exports.parenthesizedExpression = parenthesizedExpression;
+exports.SwitchCase = exports.switchCase = switchCase;
+exports.SwitchStatement = exports.switchStatement = switchStatement;
+exports.ThisExpression = exports.thisExpression = thisExpression;
+exports.ThrowStatement = exports.throwStatement = throwStatement;
+exports.TryStatement = exports.tryStatement = tryStatement;
+exports.UnaryExpression = exports.unaryExpression = unaryExpression;
+exports.UpdateExpression = exports.updateExpression = updateExpression;
+exports.VariableDeclaration = exports.variableDeclaration = variableDeclaration;
+exports.VariableDeclarator = exports.variableDeclarator = variableDeclarator;
+exports.WhileStatement = exports.whileStatement = whileStatement;
+exports.WithStatement = exports.withStatement = withStatement;
+exports.AssignmentPattern = exports.assignmentPattern = assignmentPattern;
+exports.ArrayPattern = exports.arrayPattern = arrayPattern;
+exports.ArrowFunctionExpression = exports.arrowFunctionExpression = arrowFunctionExpression;
+exports.ClassBody = exports.classBody = classBody;
+exports.ClassExpression = exports.classExpression = classExpression;
+exports.ClassDeclaration = exports.classDeclaration = classDeclaration;
+exports.ExportAllDeclaration = exports.exportAllDeclaration = exportAllDeclaration;
+exports.ExportDefaultDeclaration = exports.exportDefaultDeclaration = exportDefaultDeclaration;
+exports.ExportNamedDeclaration = exports.exportNamedDeclaration = exportNamedDeclaration;
+exports.ExportSpecifier = exports.exportSpecifier = exportSpecifier;
+exports.ForOfStatement = exports.forOfStatement = forOfStatement;
+exports.ImportDeclaration = exports.importDeclaration = importDeclaration;
+exports.ImportDefaultSpecifier = exports.importDefaultSpecifier = importDefaultSpecifier;
+exports.ImportNamespaceSpecifier = exports.importNamespaceSpecifier = importNamespaceSpecifier;
+exports.ImportSpecifier = exports.importSpecifier = importSpecifier;
+exports.MetaProperty = exports.metaProperty = metaProperty;
+exports.ClassMethod = exports.classMethod = classMethod;
+exports.ObjectPattern = exports.objectPattern = objectPattern;
+exports.SpreadElement = exports.spreadElement = spreadElement;
+exports.super = exports.Super = _super;
+exports.TaggedTemplateExpression = exports.taggedTemplateExpression = taggedTemplateExpression;
+exports.TemplateElement = exports.templateElement = templateElement;
+exports.TemplateLiteral = exports.templateLiteral = templateLiteral;
+exports.YieldExpression = exports.yieldExpression = yieldExpression;
+exports.AwaitExpression = exports.awaitExpression = awaitExpression;
+exports.import = exports.Import = _import;
+exports.BigIntLiteral = exports.bigIntLiteral = bigIntLiteral;
+exports.ExportNamespaceSpecifier = exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
+exports.OptionalMemberExpression = exports.optionalMemberExpression = optionalMemberExpression;
+exports.OptionalCallExpression = exports.optionalCallExpression = optionalCallExpression;
+exports.AnyTypeAnnotation = exports.anyTypeAnnotation = anyTypeAnnotation;
+exports.ArrayTypeAnnotation = exports.arrayTypeAnnotation = arrayTypeAnnotation;
+exports.BooleanTypeAnnotation = exports.booleanTypeAnnotation = booleanTypeAnnotation;
+exports.BooleanLiteralTypeAnnotation = exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
+exports.NullLiteralTypeAnnotation = exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
+exports.ClassImplements = exports.classImplements = classImplements;
+exports.DeclareClass = exports.declareClass = declareClass;
+exports.DeclareFunction = exports.declareFunction = declareFunction;
+exports.DeclareInterface = exports.declareInterface = declareInterface;
+exports.DeclareModule = exports.declareModule = declareModule;
+exports.DeclareModuleExports = exports.declareModuleExports = declareModuleExports;
+exports.DeclareTypeAlias = exports.declareTypeAlias = declareTypeAlias;
+exports.DeclareOpaqueType = exports.declareOpaqueType = declareOpaqueType;
+exports.DeclareVariable = exports.declareVariable = declareVariable;
+exports.DeclareExportDeclaration = exports.declareExportDeclaration = declareExportDeclaration;
+exports.DeclareExportAllDeclaration = exports.declareExportAllDeclaration = declareExportAllDeclaration;
+exports.DeclaredPredicate = exports.declaredPredicate = declaredPredicate;
+exports.ExistsTypeAnnotation = exports.existsTypeAnnotation = existsTypeAnnotation;
+exports.FunctionTypeAnnotation = exports.functionTypeAnnotation = functionTypeAnnotation;
+exports.FunctionTypeParam = exports.functionTypeParam = functionTypeParam;
+exports.GenericTypeAnnotation = exports.genericTypeAnnotation = genericTypeAnnotation;
+exports.InferredPredicate = exports.inferredPredicate = inferredPredicate;
+exports.InterfaceExtends = exports.interfaceExtends = interfaceExtends;
+exports.InterfaceDeclaration = exports.interfaceDeclaration = interfaceDeclaration;
+exports.InterfaceTypeAnnotation = exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
+exports.IntersectionTypeAnnotation = exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
+exports.MixedTypeAnnotation = exports.mixedTypeAnnotation = mixedTypeAnnotation;
+exports.EmptyTypeAnnotation = exports.emptyTypeAnnotation = emptyTypeAnnotation;
+exports.NullableTypeAnnotation = exports.nullableTypeAnnotation = nullableTypeAnnotation;
+exports.NumberLiteralTypeAnnotation = exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
+exports.NumberTypeAnnotation = exports.numberTypeAnnotation = numberTypeAnnotation;
+exports.ObjectTypeAnnotation = exports.objectTypeAnnotation = objectTypeAnnotation;
+exports.ObjectTypeInternalSlot = exports.objectTypeInternalSlot = objectTypeInternalSlot;
+exports.ObjectTypeCallProperty = exports.objectTypeCallProperty = objectTypeCallProperty;
+exports.ObjectTypeIndexer = exports.objectTypeIndexer = objectTypeIndexer;
+exports.ObjectTypeProperty = exports.objectTypeProperty = objectTypeProperty;
+exports.ObjectTypeSpreadProperty = exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
+exports.OpaqueType = exports.opaqueType = opaqueType;
+exports.QualifiedTypeIdentifier = exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
+exports.StringLiteralTypeAnnotation = exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
+exports.StringTypeAnnotation = exports.stringTypeAnnotation = stringTypeAnnotation;
+exports.SymbolTypeAnnotation = exports.symbolTypeAnnotation = symbolTypeAnnotation;
+exports.ThisTypeAnnotation = exports.thisTypeAnnotation = thisTypeAnnotation;
+exports.TupleTypeAnnotation = exports.tupleTypeAnnotation = tupleTypeAnnotation;
+exports.TypeofTypeAnnotation = exports.typeofTypeAnnotation = typeofTypeAnnotation;
+exports.TypeAlias = exports.typeAlias = typeAlias;
+exports.TypeAnnotation = exports.typeAnnotation = typeAnnotation;
+exports.TypeCastExpression = exports.typeCastExpression = typeCastExpression;
+exports.TypeParameter = exports.typeParameter = typeParameter;
+exports.TypeParameterDeclaration = exports.typeParameterDeclaration = typeParameterDeclaration;
+exports.TypeParameterInstantiation = exports.typeParameterInstantiation = typeParameterInstantiation;
+exports.UnionTypeAnnotation = exports.unionTypeAnnotation = unionTypeAnnotation;
+exports.Variance = exports.variance = variance;
+exports.VoidTypeAnnotation = exports.voidTypeAnnotation = voidTypeAnnotation;
+exports.EnumDeclaration = exports.enumDeclaration = enumDeclaration;
+exports.EnumBooleanBody = exports.enumBooleanBody = enumBooleanBody;
+exports.EnumNumberBody = exports.enumNumberBody = enumNumberBody;
+exports.EnumStringBody = exports.enumStringBody = enumStringBody;
+exports.EnumSymbolBody = exports.enumSymbolBody = enumSymbolBody;
+exports.EnumBooleanMember = exports.enumBooleanMember = enumBooleanMember;
+exports.EnumNumberMember = exports.enumNumberMember = enumNumberMember;
+exports.EnumStringMember = exports.enumStringMember = enumStringMember;
+exports.EnumDefaultedMember = exports.enumDefaultedMember = enumDefaultedMember;
+exports.jSXAttribute = exports.JSXAttribute = exports.jsxAttribute = jsxAttribute;
+exports.jSXClosingElement = exports.JSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
+exports.jSXElement = exports.JSXElement = exports.jsxElement = jsxElement;
+exports.jSXEmptyExpression = exports.JSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
+exports.jSXExpressionContainer = exports.JSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
+exports.jSXSpreadChild = exports.JSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
+exports.jSXIdentifier = exports.JSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
+exports.jSXMemberExpression = exports.JSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
+exports.jSXNamespacedName = exports.JSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
+exports.jSXOpeningElement = exports.JSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
+exports.jSXSpreadAttribute = exports.JSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
+exports.jSXText = exports.JSXText = exports.jsxText = jsxText;
+exports.jSXFragment = exports.JSXFragment = exports.jsxFragment = jsxFragment;
+exports.jSXOpeningFragment = exports.JSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
+exports.jSXClosingFragment = exports.JSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
+exports.Noop = exports.noop = noop;
+exports.Placeholder = exports.placeholder = placeholder;
+exports.V8IntrinsicIdentifier = exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
+exports.ArgumentPlaceholder = exports.argumentPlaceholder = argumentPlaceholder;
+exports.BindExpression = exports.bindExpression = bindExpression;
+exports.ClassProperty = exports.classProperty = classProperty;
+exports.PipelineTopicExpression = exports.pipelineTopicExpression = pipelineTopicExpression;
+exports.PipelineBareFunction = exports.pipelineBareFunction = pipelineBareFunction;
+exports.PipelinePrimaryTopicReference = exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
+exports.ClassPrivateProperty = exports.classPrivateProperty = classPrivateProperty;
+exports.ClassPrivateMethod = exports.classPrivateMethod = classPrivateMethod;
+exports.ImportAttribute = exports.importAttribute = importAttribute;
+exports.Decorator = exports.decorator = decorator;
+exports.DoExpression = exports.doExpression = doExpression;
+exports.ExportDefaultSpecifier = exports.exportDefaultSpecifier = exportDefaultSpecifier;
+exports.PrivateName = exports.privateName = privateName;
+exports.RecordExpression = exports.recordExpression = recordExpression;
+exports.TupleExpression = exports.tupleExpression = tupleExpression;
+exports.DecimalLiteral = exports.decimalLiteral = decimalLiteral;
+exports.StaticBlock = exports.staticBlock = staticBlock;
+exports.tSParameterProperty = exports.TSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
+exports.tSDeclareFunction = exports.TSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
+exports.tSDeclareMethod = exports.TSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
+exports.tSQualifiedName = exports.TSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
+exports.tSCallSignatureDeclaration = exports.TSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
+exports.tSConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
+exports.tSPropertySignature = exports.TSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
+exports.tSMethodSignature = exports.TSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
+exports.tSIndexSignature = exports.TSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
+exports.tSAnyKeyword = exports.TSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
+exports.tSBooleanKeyword = exports.TSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
+exports.tSBigIntKeyword = exports.TSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
+exports.tSIntrinsicKeyword = exports.TSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
+exports.tSNeverKeyword = exports.TSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
+exports.tSNullKeyword = exports.TSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
+exports.tSNumberKeyword = exports.TSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
+exports.tSObjectKeyword = exports.TSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
+exports.tSStringKeyword = exports.TSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
+exports.tSSymbolKeyword = exports.TSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
+exports.tSUndefinedKeyword = exports.TSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
+exports.tSUnknownKeyword = exports.TSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
+exports.tSVoidKeyword = exports.TSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
+exports.tSThisType = exports.TSThisType = exports.tsThisType = tsThisType;
+exports.tSFunctionType = exports.TSFunctionType = exports.tsFunctionType = tsFunctionType;
+exports.tSConstructorType = exports.TSConstructorType = exports.tsConstructorType = tsConstructorType;
+exports.tSTypeReference = exports.TSTypeReference = exports.tsTypeReference = tsTypeReference;
+exports.tSTypePredicate = exports.TSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
+exports.tSTypeQuery = exports.TSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
+exports.tSTypeLiteral = exports.TSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
+exports.tSArrayType = exports.TSArrayType = exports.tsArrayType = tsArrayType;
+exports.tSTupleType = exports.TSTupleType = exports.tsTupleType = tsTupleType;
+exports.tSOptionalType = exports.TSOptionalType = exports.tsOptionalType = tsOptionalType;
+exports.tSRestType = exports.TSRestType = exports.tsRestType = tsRestType;
+exports.tSNamedTupleMember = exports.TSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
+exports.tSUnionType = exports.TSUnionType = exports.tsUnionType = tsUnionType;
+exports.tSIntersectionType = exports.TSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
+exports.tSConditionalType = exports.TSConditionalType = exports.tsConditionalType = tsConditionalType;
+exports.tSInferType = exports.TSInferType = exports.tsInferType = tsInferType;
+exports.tSParenthesizedType = exports.TSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
+exports.tSTypeOperator = exports.TSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
+exports.tSIndexedAccessType = exports.TSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
+exports.tSMappedType = exports.TSMappedType = exports.tsMappedType = tsMappedType;
+exports.tSLiteralType = exports.TSLiteralType = exports.tsLiteralType = tsLiteralType;
+exports.tSExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
+exports.tSInterfaceDeclaration = exports.TSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
+exports.tSInterfaceBody = exports.TSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
+exports.tSTypeAliasDeclaration = exports.TSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
+exports.tSAsExpression = exports.TSAsExpression = exports.tsAsExpression = tsAsExpression;
+exports.tSTypeAssertion = exports.TSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
+exports.tSEnumDeclaration = exports.TSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
+exports.tSEnumMember = exports.TSEnumMember = exports.tsEnumMember = tsEnumMember;
+exports.tSModuleDeclaration = exports.TSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
+exports.tSModuleBlock = exports.TSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
+exports.tSImportType = exports.TSImportType = exports.tsImportType = tsImportType;
+exports.tSImportEqualsDeclaration = exports.TSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
+exports.tSExternalModuleReference = exports.TSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
+exports.tSNonNullExpression = exports.TSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
+exports.tSExportAssignment = exports.TSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
+exports.tSNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
+exports.tSTypeAnnotation = exports.TSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
+exports.tSTypeParameterInstantiation = exports.TSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
+exports.tSTypeParameterDeclaration = exports.TSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
+exports.tSTypeParameter = exports.TSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
+exports.numberLiteral = exports.NumberLiteral = NumberLiteral;
+exports.regexLiteral = exports.RegexLiteral = RegexLiteral;
+exports.restProperty = exports.RestProperty = RestProperty;
+exports.spreadProperty = exports.SpreadProperty = SpreadProperty;
+
+var _builder = _interopRequireDefault(require("../builder"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function arrayExpression(...args) {
+ return (0, _builder.default)("ArrayExpression", ...args);
+}
+
+function assignmentExpression(...args) {
+ return (0, _builder.default)("AssignmentExpression", ...args);
+}
+
+function binaryExpression(...args) {
+ return (0, _builder.default)("BinaryExpression", ...args);
+}
+
+function interpreterDirective(...args) {
+ return (0, _builder.default)("InterpreterDirective", ...args);
+}
+
+function directive(...args) {
+ return (0, _builder.default)("Directive", ...args);
+}
+
+function directiveLiteral(...args) {
+ return (0, _builder.default)("DirectiveLiteral", ...args);
+}
+
+function blockStatement(...args) {
+ return (0, _builder.default)("BlockStatement", ...args);
+}
+
+function breakStatement(...args) {
+ return (0, _builder.default)("BreakStatement", ...args);
+}
+
+function callExpression(...args) {
+ return (0, _builder.default)("CallExpression", ...args);
+}
+
+function catchClause(...args) {
+ return (0, _builder.default)("CatchClause", ...args);
+}
+
+function conditionalExpression(...args) {
+ return (0, _builder.default)("ConditionalExpression", ...args);
+}
+
+function continueStatement(...args) {
+ return (0, _builder.default)("ContinueStatement", ...args);
+}
+
+function debuggerStatement(...args) {
+ return (0, _builder.default)("DebuggerStatement", ...args);
+}
+
+function doWhileStatement(...args) {
+ return (0, _builder.default)("DoWhileStatement", ...args);
+}
+
+function emptyStatement(...args) {
+ return (0, _builder.default)("EmptyStatement", ...args);
+}
+
+function expressionStatement(...args) {
+ return (0, _builder.default)("ExpressionStatement", ...args);
+}
+
+function file(...args) {
+ return (0, _builder.default)("File", ...args);
+}
+
+function forInStatement(...args) {
+ return (0, _builder.default)("ForInStatement", ...args);
+}
+
+function forStatement(...args) {
+ return (0, _builder.default)("ForStatement", ...args);
+}
+
+function functionDeclaration(...args) {
+ return (0, _builder.default)("FunctionDeclaration", ...args);
+}
+
+function functionExpression(...args) {
+ return (0, _builder.default)("FunctionExpression", ...args);
+}
+
+function identifier(...args) {
+ return (0, _builder.default)("Identifier", ...args);
+}
+
+function ifStatement(...args) {
+ return (0, _builder.default)("IfStatement", ...args);
+}
+
+function labeledStatement(...args) {
+ return (0, _builder.default)("LabeledStatement", ...args);
+}
+
+function stringLiteral(...args) {
+ return (0, _builder.default)("StringLiteral", ...args);
+}
+
+function numericLiteral(...args) {
+ return (0, _builder.default)("NumericLiteral", ...args);
+}
+
+function nullLiteral(...args) {
+ return (0, _builder.default)("NullLiteral", ...args);
+}
+
+function booleanLiteral(...args) {
+ return (0, _builder.default)("BooleanLiteral", ...args);
+}
+
+function regExpLiteral(...args) {
+ return (0, _builder.default)("RegExpLiteral", ...args);
+}
+
+function logicalExpression(...args) {
+ return (0, _builder.default)("LogicalExpression", ...args);
+}
+
+function memberExpression(...args) {
+ return (0, _builder.default)("MemberExpression", ...args);
+}
+
+function newExpression(...args) {
+ return (0, _builder.default)("NewExpression", ...args);
+}
+
+function program(...args) {
+ return (0, _builder.default)("Program", ...args);
+}
+
+function objectExpression(...args) {
+ return (0, _builder.default)("ObjectExpression", ...args);
+}
+
+function objectMethod(...args) {
+ return (0, _builder.default)("ObjectMethod", ...args);
+}
+
+function objectProperty(...args) {
+ return (0, _builder.default)("ObjectProperty", ...args);
+}
+
+function restElement(...args) {
+ return (0, _builder.default)("RestElement", ...args);
+}
+
+function returnStatement(...args) {
+ return (0, _builder.default)("ReturnStatement", ...args);
+}
+
+function sequenceExpression(...args) {
+ return (0, _builder.default)("SequenceExpression", ...args);
+}
+
+function parenthesizedExpression(...args) {
+ return (0, _builder.default)("ParenthesizedExpression", ...args);
+}
+
+function switchCase(...args) {
+ return (0, _builder.default)("SwitchCase", ...args);
+}
+
+function switchStatement(...args) {
+ return (0, _builder.default)("SwitchStatement", ...args);
+}
+
+function thisExpression(...args) {
+ return (0, _builder.default)("ThisExpression", ...args);
+}
+
+function throwStatement(...args) {
+ return (0, _builder.default)("ThrowStatement", ...args);
+}
+
+function tryStatement(...args) {
+ return (0, _builder.default)("TryStatement", ...args);
+}
+
+function unaryExpression(...args) {
+ return (0, _builder.default)("UnaryExpression", ...args);
+}
+
+function updateExpression(...args) {
+ return (0, _builder.default)("UpdateExpression", ...args);
+}
+
+function variableDeclaration(...args) {
+ return (0, _builder.default)("VariableDeclaration", ...args);
+}
+
+function variableDeclarator(...args) {
+ return (0, _builder.default)("VariableDeclarator", ...args);
+}
+
+function whileStatement(...args) {
+ return (0, _builder.default)("WhileStatement", ...args);
+}
+
+function withStatement(...args) {
+ return (0, _builder.default)("WithStatement", ...args);
+}
+
+function assignmentPattern(...args) {
+ return (0, _builder.default)("AssignmentPattern", ...args);
+}
+
+function arrayPattern(...args) {
+ return (0, _builder.default)("ArrayPattern", ...args);
+}
+
+function arrowFunctionExpression(...args) {
+ return (0, _builder.default)("ArrowFunctionExpression", ...args);
+}
+
+function classBody(...args) {
+ return (0, _builder.default)("ClassBody", ...args);
+}
+
+function classExpression(...args) {
+ return (0, _builder.default)("ClassExpression", ...args);
+}
+
+function classDeclaration(...args) {
+ return (0, _builder.default)("ClassDeclaration", ...args);
+}
+
+function exportAllDeclaration(...args) {
+ return (0, _builder.default)("ExportAllDeclaration", ...args);
+}
+
+function exportDefaultDeclaration(...args) {
+ return (0, _builder.default)("ExportDefaultDeclaration", ...args);
+}
+
+function exportNamedDeclaration(...args) {
+ return (0, _builder.default)("ExportNamedDeclaration", ...args);
+}
+
+function exportSpecifier(...args) {
+ return (0, _builder.default)("ExportSpecifier", ...args);
+}
+
+function forOfStatement(...args) {
+ return (0, _builder.default)("ForOfStatement", ...args);
+}
+
+function importDeclaration(...args) {
+ return (0, _builder.default)("ImportDeclaration", ...args);
+}
+
+function importDefaultSpecifier(...args) {
+ return (0, _builder.default)("ImportDefaultSpecifier", ...args);
+}
+
+function importNamespaceSpecifier(...args) {
+ return (0, _builder.default)("ImportNamespaceSpecifier", ...args);
+}
+
+function importSpecifier(...args) {
+ return (0, _builder.default)("ImportSpecifier", ...args);
+}
+
+function metaProperty(...args) {
+ return (0, _builder.default)("MetaProperty", ...args);
+}
+
+function classMethod(...args) {
+ return (0, _builder.default)("ClassMethod", ...args);
+}
+
+function objectPattern(...args) {
+ return (0, _builder.default)("ObjectPattern", ...args);
+}
+
+function spreadElement(...args) {
+ return (0, _builder.default)("SpreadElement", ...args);
+}
+
+function _super(...args) {
+ return (0, _builder.default)("Super", ...args);
+}
+
+function taggedTemplateExpression(...args) {
+ return (0, _builder.default)("TaggedTemplateExpression", ...args);
+}
+
+function templateElement(...args) {
+ return (0, _builder.default)("TemplateElement", ...args);
+}
+
+function templateLiteral(...args) {
+ return (0, _builder.default)("TemplateLiteral", ...args);
+}
+
+function yieldExpression(...args) {
+ return (0, _builder.default)("YieldExpression", ...args);
+}
+
+function awaitExpression(...args) {
+ return (0, _builder.default)("AwaitExpression", ...args);
+}
+
+function _import(...args) {
+ return (0, _builder.default)("Import", ...args);
+}
+
+function bigIntLiteral(...args) {
+ return (0, _builder.default)("BigIntLiteral", ...args);
+}
+
+function exportNamespaceSpecifier(...args) {
+ return (0, _builder.default)("ExportNamespaceSpecifier", ...args);
+}
+
+function optionalMemberExpression(...args) {
+ return (0, _builder.default)("OptionalMemberExpression", ...args);
+}
+
+function optionalCallExpression(...args) {
+ return (0, _builder.default)("OptionalCallExpression", ...args);
+}
+
+function anyTypeAnnotation(...args) {
+ return (0, _builder.default)("AnyTypeAnnotation", ...args);
+}
+
+function arrayTypeAnnotation(...args) {
+ return (0, _builder.default)("ArrayTypeAnnotation", ...args);
+}
+
+function booleanTypeAnnotation(...args) {
+ return (0, _builder.default)("BooleanTypeAnnotation", ...args);
+}
+
+function booleanLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args);
+}
+
+function nullLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("NullLiteralTypeAnnotation", ...args);
+}
+
+function classImplements(...args) {
+ return (0, _builder.default)("ClassImplements", ...args);
+}
+
+function declareClass(...args) {
+ return (0, _builder.default)("DeclareClass", ...args);
+}
+
+function declareFunction(...args) {
+ return (0, _builder.default)("DeclareFunction", ...args);
+}
+
+function declareInterface(...args) {
+ return (0, _builder.default)("DeclareInterface", ...args);
+}
+
+function declareModule(...args) {
+ return (0, _builder.default)("DeclareModule", ...args);
+}
+
+function declareModuleExports(...args) {
+ return (0, _builder.default)("DeclareModuleExports", ...args);
+}
+
+function declareTypeAlias(...args) {
+ return (0, _builder.default)("DeclareTypeAlias", ...args);
+}
+
+function declareOpaqueType(...args) {
+ return (0, _builder.default)("DeclareOpaqueType", ...args);
+}
+
+function declareVariable(...args) {
+ return (0, _builder.default)("DeclareVariable", ...args);
+}
+
+function declareExportDeclaration(...args) {
+ return (0, _builder.default)("DeclareExportDeclaration", ...args);
+}
+
+function declareExportAllDeclaration(...args) {
+ return (0, _builder.default)("DeclareExportAllDeclaration", ...args);
+}
+
+function declaredPredicate(...args) {
+ return (0, _builder.default)("DeclaredPredicate", ...args);
+}
+
+function existsTypeAnnotation(...args) {
+ return (0, _builder.default)("ExistsTypeAnnotation", ...args);
+}
+
+function functionTypeAnnotation(...args) {
+ return (0, _builder.default)("FunctionTypeAnnotation", ...args);
+}
+
+function functionTypeParam(...args) {
+ return (0, _builder.default)("FunctionTypeParam", ...args);
+}
+
+function genericTypeAnnotation(...args) {
+ return (0, _builder.default)("GenericTypeAnnotation", ...args);
+}
+
+function inferredPredicate(...args) {
+ return (0, _builder.default)("InferredPredicate", ...args);
+}
+
+function interfaceExtends(...args) {
+ return (0, _builder.default)("InterfaceExtends", ...args);
+}
+
+function interfaceDeclaration(...args) {
+ return (0, _builder.default)("InterfaceDeclaration", ...args);
+}
+
+function interfaceTypeAnnotation(...args) {
+ return (0, _builder.default)("InterfaceTypeAnnotation", ...args);
+}
+
+function intersectionTypeAnnotation(...args) {
+ return (0, _builder.default)("IntersectionTypeAnnotation", ...args);
+}
+
+function mixedTypeAnnotation(...args) {
+ return (0, _builder.default)("MixedTypeAnnotation", ...args);
+}
+
+function emptyTypeAnnotation(...args) {
+ return (0, _builder.default)("EmptyTypeAnnotation", ...args);
+}
+
+function nullableTypeAnnotation(...args) {
+ return (0, _builder.default)("NullableTypeAnnotation", ...args);
+}
+
+function numberLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args);
+}
+
+function numberTypeAnnotation(...args) {
+ return (0, _builder.default)("NumberTypeAnnotation", ...args);
+}
+
+function objectTypeAnnotation(...args) {
+ return (0, _builder.default)("ObjectTypeAnnotation", ...args);
+}
+
+function objectTypeInternalSlot(...args) {
+ return (0, _builder.default)("ObjectTypeInternalSlot", ...args);
+}
+
+function objectTypeCallProperty(...args) {
+ return (0, _builder.default)("ObjectTypeCallProperty", ...args);
+}
+
+function objectTypeIndexer(...args) {
+ return (0, _builder.default)("ObjectTypeIndexer", ...args);
+}
+
+function objectTypeProperty(...args) {
+ return (0, _builder.default)("ObjectTypeProperty", ...args);
+}
+
+function objectTypeSpreadProperty(...args) {
+ return (0, _builder.default)("ObjectTypeSpreadProperty", ...args);
+}
+
+function opaqueType(...args) {
+ return (0, _builder.default)("OpaqueType", ...args);
+}
+
+function qualifiedTypeIdentifier(...args) {
+ return (0, _builder.default)("QualifiedTypeIdentifier", ...args);
+}
+
+function stringLiteralTypeAnnotation(...args) {
+ return (0, _builder.default)("StringLiteralTypeAnnotation", ...args);
+}
+
+function stringTypeAnnotation(...args) {
+ return (0, _builder.default)("StringTypeAnnotation", ...args);
+}
+
+function symbolTypeAnnotation(...args) {
+ return (0, _builder.default)("SymbolTypeAnnotation", ...args);
+}
+
+function thisTypeAnnotation(...args) {
+ return (0, _builder.default)("ThisTypeAnnotation", ...args);
+}
+
+function tupleTypeAnnotation(...args) {
+ return (0, _builder.default)("TupleTypeAnnotation", ...args);
+}
+
+function typeofTypeAnnotation(...args) {
+ return (0, _builder.default)("TypeofTypeAnnotation", ...args);
+}
+
+function typeAlias(...args) {
+ return (0, _builder.default)("TypeAlias", ...args);
+}
+
+function typeAnnotation(...args) {
+ return (0, _builder.default)("TypeAnnotation", ...args);
+}
+
+function typeCastExpression(...args) {
+ return (0, _builder.default)("TypeCastExpression", ...args);
+}
+
+function typeParameter(...args) {
+ return (0, _builder.default)("TypeParameter", ...args);
+}
+
+function typeParameterDeclaration(...args) {
+ return (0, _builder.default)("TypeParameterDeclaration", ...args);
+}
+
+function typeParameterInstantiation(...args) {
+ return (0, _builder.default)("TypeParameterInstantiation", ...args);
+}
+
+function unionTypeAnnotation(...args) {
+ return (0, _builder.default)("UnionTypeAnnotation", ...args);
+}
+
+function variance(...args) {
+ return (0, _builder.default)("Variance", ...args);
+}
+
+function voidTypeAnnotation(...args) {
+ return (0, _builder.default)("VoidTypeAnnotation", ...args);
+}
+
+function enumDeclaration(...args) {
+ return (0, _builder.default)("EnumDeclaration", ...args);
+}
+
+function enumBooleanBody(...args) {
+ return (0, _builder.default)("EnumBooleanBody", ...args);
+}
+
+function enumNumberBody(...args) {
+ return (0, _builder.default)("EnumNumberBody", ...args);
+}
+
+function enumStringBody(...args) {
+ return (0, _builder.default)("EnumStringBody", ...args);
+}
+
+function enumSymbolBody(...args) {
+ return (0, _builder.default)("EnumSymbolBody", ...args);
+}
+
+function enumBooleanMember(...args) {
+ return (0, _builder.default)("EnumBooleanMember", ...args);
+}
+
+function enumNumberMember(...args) {
+ return (0, _builder.default)("EnumNumberMember", ...args);
+}
+
+function enumStringMember(...args) {
+ return (0, _builder.default)("EnumStringMember", ...args);
+}
+
+function enumDefaultedMember(...args) {
+ return (0, _builder.default)("EnumDefaultedMember", ...args);
+}
+
+function jsxAttribute(...args) {
+ return (0, _builder.default)("JSXAttribute", ...args);
+}
+
+function jsxClosingElement(...args) {
+ return (0, _builder.default)("JSXClosingElement", ...args);
+}
+
+function jsxElement(...args) {
+ return (0, _builder.default)("JSXElement", ...args);
+}
+
+function jsxEmptyExpression(...args) {
+ return (0, _builder.default)("JSXEmptyExpression", ...args);
+}
+
+function jsxExpressionContainer(...args) {
+ return (0, _builder.default)("JSXExpressionContainer", ...args);
+}
+
+function jsxSpreadChild(...args) {
+ return (0, _builder.default)("JSXSpreadChild", ...args);
+}
+
+function jsxIdentifier(...args) {
+ return (0, _builder.default)("JSXIdentifier", ...args);
+}
+
+function jsxMemberExpression(...args) {
+ return (0, _builder.default)("JSXMemberExpression", ...args);
+}
+
+function jsxNamespacedName(...args) {
+ return (0, _builder.default)("JSXNamespacedName", ...args);
+}
+
+function jsxOpeningElement(...args) {
+ return (0, _builder.default)("JSXOpeningElement", ...args);
+}
+
+function jsxSpreadAttribute(...args) {
+ return (0, _builder.default)("JSXSpreadAttribute", ...args);
+}
+
+function jsxText(...args) {
+ return (0, _builder.default)("JSXText", ...args);
+}
+
+function jsxFragment(...args) {
+ return (0, _builder.default)("JSXFragment", ...args);
+}
+
+function jsxOpeningFragment(...args) {
+ return (0, _builder.default)("JSXOpeningFragment", ...args);
+}
+
+function jsxClosingFragment(...args) {
+ return (0, _builder.default)("JSXClosingFragment", ...args);
+}
+
+function noop(...args) {
+ return (0, _builder.default)("Noop", ...args);
+}
+
+function placeholder(...args) {
+ return (0, _builder.default)("Placeholder", ...args);
+}
+
+function v8IntrinsicIdentifier(...args) {
+ return (0, _builder.default)("V8IntrinsicIdentifier", ...args);
+}
+
+function argumentPlaceholder(...args) {
+ return (0, _builder.default)("ArgumentPlaceholder", ...args);
+}
+
+function bindExpression(...args) {
+ return (0, _builder.default)("BindExpression", ...args);
+}
+
+function classProperty(...args) {
+ return (0, _builder.default)("ClassProperty", ...args);
+}
+
+function pipelineTopicExpression(...args) {
+ return (0, _builder.default)("PipelineTopicExpression", ...args);
+}
+
+function pipelineBareFunction(...args) {
+ return (0, _builder.default)("PipelineBareFunction", ...args);
+}
+
+function pipelinePrimaryTopicReference(...args) {
+ return (0, _builder.default)("PipelinePrimaryTopicReference", ...args);
+}
+
+function classPrivateProperty(...args) {
+ return (0, _builder.default)("ClassPrivateProperty", ...args);
+}
+
+function classPrivateMethod(...args) {
+ return (0, _builder.default)("ClassPrivateMethod", ...args);
+}
+
+function importAttribute(...args) {
+ return (0, _builder.default)("ImportAttribute", ...args);
+}
+
+function decorator(...args) {
+ return (0, _builder.default)("Decorator", ...args);
+}
+
+function doExpression(...args) {
+ return (0, _builder.default)("DoExpression", ...args);
+}
+
+function exportDefaultSpecifier(...args) {
+ return (0, _builder.default)("ExportDefaultSpecifier", ...args);
+}
+
+function privateName(...args) {
+ return (0, _builder.default)("PrivateName", ...args);
+}
+
+function recordExpression(...args) {
+ return (0, _builder.default)("RecordExpression", ...args);
+}
+
+function tupleExpression(...args) {
+ return (0, _builder.default)("TupleExpression", ...args);
+}
+
+function decimalLiteral(...args) {
+ return (0, _builder.default)("DecimalLiteral", ...args);
+}
+
+function staticBlock(...args) {
+ return (0, _builder.default)("StaticBlock", ...args);
+}
+
+function tsParameterProperty(...args) {
+ return (0, _builder.default)("TSParameterProperty", ...args);
+}
+
+function tsDeclareFunction(...args) {
+ return (0, _builder.default)("TSDeclareFunction", ...args);
+}
+
+function tsDeclareMethod(...args) {
+ return (0, _builder.default)("TSDeclareMethod", ...args);
+}
+
+function tsQualifiedName(...args) {
+ return (0, _builder.default)("TSQualifiedName", ...args);
+}
+
+function tsCallSignatureDeclaration(...args) {
+ return (0, _builder.default)("TSCallSignatureDeclaration", ...args);
+}
+
+function tsConstructSignatureDeclaration(...args) {
+ return (0, _builder.default)("TSConstructSignatureDeclaration", ...args);
+}
+
+function tsPropertySignature(...args) {
+ return (0, _builder.default)("TSPropertySignature", ...args);
+}
+
+function tsMethodSignature(...args) {
+ return (0, _builder.default)("TSMethodSignature", ...args);
+}
+
+function tsIndexSignature(...args) {
+ return (0, _builder.default)("TSIndexSignature", ...args);
+}
+
+function tsAnyKeyword(...args) {
+ return (0, _builder.default)("TSAnyKeyword", ...args);
+}
+
+function tsBooleanKeyword(...args) {
+ return (0, _builder.default)("TSBooleanKeyword", ...args);
+}
+
+function tsBigIntKeyword(...args) {
+ return (0, _builder.default)("TSBigIntKeyword", ...args);
+}
+
+function tsIntrinsicKeyword(...args) {
+ return (0, _builder.default)("TSIntrinsicKeyword", ...args);
+}
+
+function tsNeverKeyword(...args) {
+ return (0, _builder.default)("TSNeverKeyword", ...args);
+}
+
+function tsNullKeyword(...args) {
+ return (0, _builder.default)("TSNullKeyword", ...args);
+}
+
+function tsNumberKeyword(...args) {
+ return (0, _builder.default)("TSNumberKeyword", ...args);
+}
+
+function tsObjectKeyword(...args) {
+ return (0, _builder.default)("TSObjectKeyword", ...args);
+}
+
+function tsStringKeyword(...args) {
+ return (0, _builder.default)("TSStringKeyword", ...args);
+}
+
+function tsSymbolKeyword(...args) {
+ return (0, _builder.default)("TSSymbolKeyword", ...args);
+}
+
+function tsUndefinedKeyword(...args) {
+ return (0, _builder.default)("TSUndefinedKeyword", ...args);
+}
+
+function tsUnknownKeyword(...args) {
+ return (0, _builder.default)("TSUnknownKeyword", ...args);
+}
+
+function tsVoidKeyword(...args) {
+ return (0, _builder.default)("TSVoidKeyword", ...args);
+}
+
+function tsThisType(...args) {
+ return (0, _builder.default)("TSThisType", ...args);
+}
+
+function tsFunctionType(...args) {
+ return (0, _builder.default)("TSFunctionType", ...args);
+}
+
+function tsConstructorType(...args) {
+ return (0, _builder.default)("TSConstructorType", ...args);
+}
+
+function tsTypeReference(...args) {
+ return (0, _builder.default)("TSTypeReference", ...args);
+}
+
+function tsTypePredicate(...args) {
+ return (0, _builder.default)("TSTypePredicate", ...args);
+}
+
+function tsTypeQuery(...args) {
+ return (0, _builder.default)("TSTypeQuery", ...args);
+}
+
+function tsTypeLiteral(...args) {
+ return (0, _builder.default)("TSTypeLiteral", ...args);
+}
+
+function tsArrayType(...args) {
+ return (0, _builder.default)("TSArrayType", ...args);
+}
+
+function tsTupleType(...args) {
+ return (0, _builder.default)("TSTupleType", ...args);
+}
+
+function tsOptionalType(...args) {
+ return (0, _builder.default)("TSOptionalType", ...args);
+}
+
+function tsRestType(...args) {
+ return (0, _builder.default)("TSRestType", ...args);
+}
+
+function tsNamedTupleMember(...args) {
+ return (0, _builder.default)("TSNamedTupleMember", ...args);
+}
+
+function tsUnionType(...args) {
+ return (0, _builder.default)("TSUnionType", ...args);
+}
+
+function tsIntersectionType(...args) {
+ return (0, _builder.default)("TSIntersectionType", ...args);
+}
+
+function tsConditionalType(...args) {
+ return (0, _builder.default)("TSConditionalType", ...args);
+}
+
+function tsInferType(...args) {
+ return (0, _builder.default)("TSInferType", ...args);
+}
+
+function tsParenthesizedType(...args) {
+ return (0, _builder.default)("TSParenthesizedType", ...args);
+}
+
+function tsTypeOperator(...args) {
+ return (0, _builder.default)("TSTypeOperator", ...args);
+}
+
+function tsIndexedAccessType(...args) {
+ return (0, _builder.default)("TSIndexedAccessType", ...args);
+}
+
+function tsMappedType(...args) {
+ return (0, _builder.default)("TSMappedType", ...args);
+}
+
+function tsLiteralType(...args) {
+ return (0, _builder.default)("TSLiteralType", ...args);
+}
+
+function tsExpressionWithTypeArguments(...args) {
+ return (0, _builder.default)("TSExpressionWithTypeArguments", ...args);
+}
+
+function tsInterfaceDeclaration(...args) {
+ return (0, _builder.default)("TSInterfaceDeclaration", ...args);
+}
+
+function tsInterfaceBody(...args) {
+ return (0, _builder.default)("TSInterfaceBody", ...args);
+}
+
+function tsTypeAliasDeclaration(...args) {
+ return (0, _builder.default)("TSTypeAliasDeclaration", ...args);
+}
+
+function tsAsExpression(...args) {
+ return (0, _builder.default)("TSAsExpression", ...args);
+}
+
+function tsTypeAssertion(...args) {
+ return (0, _builder.default)("TSTypeAssertion", ...args);
+}
+
+function tsEnumDeclaration(...args) {
+ return (0, _builder.default)("TSEnumDeclaration", ...args);
+}
+
+function tsEnumMember(...args) {
+ return (0, _builder.default)("TSEnumMember", ...args);
+}
+
+function tsModuleDeclaration(...args) {
+ return (0, _builder.default)("TSModuleDeclaration", ...args);
+}
+
+function tsModuleBlock(...args) {
+ return (0, _builder.default)("TSModuleBlock", ...args);
+}
+
+function tsImportType(...args) {
+ return (0, _builder.default)("TSImportType", ...args);
+}
+
+function tsImportEqualsDeclaration(...args) {
+ return (0, _builder.default)("TSImportEqualsDeclaration", ...args);
+}
+
+function tsExternalModuleReference(...args) {
+ return (0, _builder.default)("TSExternalModuleReference", ...args);
+}
+
+function tsNonNullExpression(...args) {
+ return (0, _builder.default)("TSNonNullExpression", ...args);
+}
+
+function tsExportAssignment(...args) {
+ return (0, _builder.default)("TSExportAssignment", ...args);
+}
+
+function tsNamespaceExportDeclaration(...args) {
+ return (0, _builder.default)("TSNamespaceExportDeclaration", ...args);
+}
+
+function tsTypeAnnotation(...args) {
+ return (0, _builder.default)("TSTypeAnnotation", ...args);
+}
+
+function tsTypeParameterInstantiation(...args) {
+ return (0, _builder.default)("TSTypeParameterInstantiation", ...args);
+}
+
+function tsTypeParameterDeclaration(...args) {
+ return (0, _builder.default)("TSTypeParameterDeclaration", ...args);
+}
+
+function tsTypeParameter(...args) {
+ return (0, _builder.default)("TSTypeParameter", ...args);
+}
+
+function NumberLiteral(...args) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ return (0, _builder.default)("NumberLiteral", ...args);
+}
+
+function RegexLiteral(...args) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ return (0, _builder.default)("RegexLiteral", ...args);
+}
+
+function RestProperty(...args) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ return (0, _builder.default)("RestProperty", ...args);
+}
+
+function SpreadProperty(...args) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ return (0, _builder.default)("SpreadProperty", ...args);
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js
index 91e7cbd9cab..91e7cbd9cab 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/react/buildChildren.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/react/buildChildren.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
new file mode 100644
index 00000000000..7dbe885f2c4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = createTSUnionType;
+
+var _generated = require("../generated");
+
+var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/typescript/removeTypeDuplicates"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function createTSUnionType(typeAnnotations) {
+ const types = typeAnnotations.map(type => type.typeAnnotations);
+ const flattened = (0, _removeTypeDuplicates.default)(types);
+
+ if (flattened.length === 1) {
+ return flattened[0];
+ } else {
+ return (0, _generated.tsUnionType)(flattened);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/clone.js
index 9595f6e25cf..9595f6e25cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/clone.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/clone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeep.js
index eb29c536227..eb29c536227 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeep.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
new file mode 100644
index 00000000000..d8612e9ebb1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneDeepWithoutLoc;
+
+var _cloneNode = _interopRequireDefault(require("./cloneNode"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function cloneDeepWithoutLoc(node) {
+ return (0, _cloneNode.default)(node, true, true);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js
new file mode 100644
index 00000000000..44032e3f9d8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneNode.js
@@ -0,0 +1,101 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneNode;
+
+var _definitions = require("../definitions");
+
+const has = Function.call.bind(Object.prototype.hasOwnProperty);
+
+function cloneIfNode(obj, deep, withoutLoc) {
+ if (obj && typeof obj.type === "string") {
+ return cloneNode(obj, deep, withoutLoc);
+ }
+
+ return obj;
+}
+
+function cloneIfNodeOrArray(obj, deep, withoutLoc) {
+ if (Array.isArray(obj)) {
+ return obj.map(node => cloneIfNode(node, deep, withoutLoc));
+ }
+
+ return cloneIfNode(obj, deep, withoutLoc);
+}
+
+function cloneNode(node, deep = true, withoutLoc = false) {
+ if (!node) return node;
+ const {
+ type
+ } = node;
+ const newNode = {
+ type
+ };
+
+ if (type === "Identifier") {
+ newNode.name = node.name;
+
+ if (has(node, "optional") && typeof node.optional === "boolean") {
+ newNode.optional = node.optional;
+ }
+
+ if (has(node, "typeAnnotation")) {
+ newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
+ }
+ } else if (!has(_definitions.NODE_FIELDS, type)) {
+ throw new Error(`Unknown node type: "${type}"`);
+ } else {
+ for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
+ if (has(node, field)) {
+ if (deep) {
+ newNode[field] = type === "File" && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
+ } else {
+ newNode[field] = node[field];
+ }
+ }
+ }
+ }
+
+ if (has(node, "loc")) {
+ if (withoutLoc) {
+ newNode.loc = null;
+ } else {
+ newNode.loc = node.loc;
+ }
+ }
+
+ if (has(node, "leadingComments")) {
+ newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
+ }
+
+ if (has(node, "innerComments")) {
+ newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
+ }
+
+ if (has(node, "trailingComments")) {
+ newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
+ }
+
+ if (has(node, "extra")) {
+ newNode.extra = Object.assign({}, node.extra);
+ }
+
+ return newNode;
+}
+
+function cloneCommentsWithoutLoc(comments) {
+ return comments.map(({
+ type,
+ value
+ }) => ({
+ type,
+ value,
+ loc: null
+ }));
+}
+
+function maybeCloneComments(comments, deep, withoutLoc) {
+ return deep && withoutLoc ? cloneCommentsWithoutLoc(comments) : comments;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
new file mode 100644
index 00000000000..34fd172ed77
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneWithoutLoc;
+
+var _cloneNode = _interopRequireDefault(require("./cloneNode"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function cloneWithoutLoc(node) {
+ return (0, _cloneNode.default)(node, false, true);
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComment.js
index ff586514e7e..ff586514e7e 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComment.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComment.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js
index f3a61df7131..f3a61df7131 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/addComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/addComments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritInnerComments.js
index fbe59dec623..fbe59dec623 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritInnerComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritInnerComments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
index ccb02ec55be..ccb02ec55be 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
index bce1e2d9ac7..bce1e2d9ac7 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritsComments.js
index fd942d86cdc..fd942d86cdc 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/inheritsComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/inheritsComments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js
index fe34f1a8905..fe34f1a8905 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/comments/removeComments.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/comments/removeComments.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js
new file mode 100644
index 00000000000..2c308098e8e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/generated/index.js
@@ -0,0 +1,99 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
+
+var _definitions = require("../../definitions");
+
+const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
+exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
+const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
+exports.BINARY_TYPES = BINARY_TYPES;
+const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
+exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
+const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
+exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
+const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
+exports.BLOCK_TYPES = BLOCK_TYPES;
+const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
+exports.STATEMENT_TYPES = STATEMENT_TYPES;
+const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
+exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
+const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
+exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
+const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
+exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
+const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
+exports.LOOP_TYPES = LOOP_TYPES;
+const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
+exports.WHILE_TYPES = WHILE_TYPES;
+const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
+exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
+const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
+exports.FOR_TYPES = FOR_TYPES;
+const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
+exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
+const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
+exports.FUNCTION_TYPES = FUNCTION_TYPES;
+const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
+exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
+const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
+exports.PUREISH_TYPES = PUREISH_TYPES;
+const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
+exports.DECLARATION_TYPES = DECLARATION_TYPES;
+const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
+exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
+const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
+exports.LVAL_TYPES = LVAL_TYPES;
+const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
+exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
+const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
+exports.LITERAL_TYPES = LITERAL_TYPES;
+const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
+exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
+const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
+exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
+const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
+exports.METHOD_TYPES = METHOD_TYPES;
+const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
+exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
+const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
+exports.PROPERTY_TYPES = PROPERTY_TYPES;
+const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
+exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
+const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
+exports.PATTERN_TYPES = PATTERN_TYPES;
+const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
+exports.CLASS_TYPES = CLASS_TYPES;
+const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
+exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
+const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
+exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
+const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
+exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
+const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
+exports.FLOW_TYPES = FLOW_TYPES;
+const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
+exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
+const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
+exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
+const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
+exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
+const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
+exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
+const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
+exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
+const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
+exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
+const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
+exports.JSX_TYPES = JSX_TYPES;
+const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
+exports.PRIVATE_TYPES = PRIVATE_TYPES;
+const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
+exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
+const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
+exports.TSTYPE_TYPES = TSTYPE_TYPES;
+const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
+exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js
new file mode 100644
index 00000000000..7553162c664
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/constants/index.js
@@ -0,0 +1,49 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
+const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
+exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
+const FLATTENABLE_KEYS = ["body", "expressions"];
+exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
+const FOR_INIT_KEYS = ["left", "init"];
+exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
+const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
+exports.COMMENT_KEYS = COMMENT_KEYS;
+const LOGICAL_OPERATORS = ["||", "&&", "??"];
+exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
+const UPDATE_OPERATORS = ["++", "--"];
+exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
+const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
+exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
+const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
+exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
+const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
+exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
+const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
+exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
+const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
+exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
+const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
+exports.BINARY_OPERATORS = BINARY_OPERATORS;
+const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")];
+exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
+const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
+exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
+const NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
+exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
+const STRING_UNARY_OPERATORS = ["typeof"];
+exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
+const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
+exports.UNARY_OPERATORS = UNARY_OPERATORS;
+const INHERIT_KEYS = {
+ optional: ["typeAnnotation", "typeParameters", "returnType"],
+ force: ["start", "loc", "end"]
+};
+exports.INHERIT_KEYS = INHERIT_KEYS;
+const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
+exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
+const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
+exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js
index 2836b365781..2836b365781 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/ensureBlock.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/ensureBlock.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
new file mode 100644
index 00000000000..bae4e8f380c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
@@ -0,0 +1,77 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = gatherSequenceExpressions;
+
+var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers"));
+
+var _generated = require("../validators/generated");
+
+var _generated2 = require("../builders/generated");
+
+var _cloneNode = _interopRequireDefault(require("../clone/cloneNode"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function gatherSequenceExpressions(nodes, scope, declars) {
+ const exprs = [];
+ let ensureLastUndefined = true;
+
+ for (const node of nodes) {
+ if (!(0, _generated.isEmptyStatement)(node)) {
+ ensureLastUndefined = false;
+ }
+
+ if ((0, _generated.isExpression)(node)) {
+ exprs.push(node);
+ } else if ((0, _generated.isExpressionStatement)(node)) {
+ exprs.push(node.expression);
+ } else if ((0, _generated.isVariableDeclaration)(node)) {
+ if (node.kind !== "var") return;
+
+ for (const declar of node.declarations) {
+ const bindings = (0, _getBindingIdentifiers.default)(declar);
+
+ for (const key of Object.keys(bindings)) {
+ declars.push({
+ kind: node.kind,
+ id: (0, _cloneNode.default)(bindings[key])
+ });
+ }
+
+ if (declar.init) {
+ exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
+ }
+ }
+
+ ensureLastUndefined = true;
+ } else if ((0, _generated.isIfStatement)(node)) {
+ const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
+ const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
+ if (!consequent || !alternate) return;
+ exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
+ } else if ((0, _generated.isBlockStatement)(node)) {
+ const body = gatherSequenceExpressions(node.body, scope, declars);
+ if (!body) return;
+ exprs.push(body);
+ } else if ((0, _generated.isEmptyStatement)(node)) {
+ if (nodes.indexOf(node) === 0) {
+ ensureLastUndefined = true;
+ }
+ } else {
+ return;
+ }
+ }
+
+ if (ensureLastUndefined) {
+ exprs.push(scope.buildUndefinedNode());
+ }
+
+ if (exprs.length === 1) {
+ return exprs[0];
+ } else {
+ return (0, _generated2.sequenceExpression)(exprs);
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
index b9d165b6fd1..b9d165b6fd1 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js
index 19886833fa3..19886833fa3 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toBlock.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toBlock.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js
index 31e6770f6f7..31e6770f6f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toComputedKey.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toComputedKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js
index 6e58b0de4d6..6e58b0de4d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toExpression.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toExpression.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js
index e55db41fc4f..e55db41fc4f 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toIdentifier.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toIdentifier.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js
index c48fd0e7f31..c48fd0e7f31 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toKeyAlias.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toKeyAlias.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js
new file mode 100644
index 00000000000..4b61276ce63
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toSequenceExpression.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toSequenceExpression;
+
+var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function toSequenceExpression(nodes, scope) {
+ if (!(nodes == null ? void 0 : nodes.length)) return;
+ const declars = [];
+ const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
+ if (!result) return;
+
+ for (const declar of declars) {
+ scope.push(declar);
+ }
+
+ return result;
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js
index 69b22ae09cc..69b22ae09cc 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toStatement.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/toStatement.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js
new file mode 100644
index 00000000000..d1118e164b0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/converters/valueToNode.js
@@ -0,0 +1,88 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = valueToNode;
+
+var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));
+
+var _isRegExp = _interopRequireDefault(require("lodash/isRegExp"));
+
+var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
+
+var _generated = require("../builders/generated");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function valueToNode(value) {
+ if (value === undefined) {
+ return (0, _generated.identifier)("undefined");
+ }
+
+ if (value === true || value === false) {
+ return (0, _generated.booleanLiteral)(value);
+ }
+
+ if (value === null) {
+ return (0, _generated.nullLiteral)();
+ }
+
+ if (typeof value === "string") {
+ return (0, _generated.stringLiteral)(value);
+ }
+
+ if (typeof value === "number") {
+ let result;
+
+ if (Number.isFinite(value)) {
+ result = (0, _generated.numericLiteral)(Math.abs(value));
+ } else {
+ let numerator;
+
+ if (Number.isNaN(value)) {
+ numerator = (0, _generated.numericLiteral)(0);
+ } else {
+ numerator = (0, _generated.numericLiteral)(1);
+ }
+
+ result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
+ }
+
+ if (value < 0 || Object.is(value, -0)) {
+ result = (0, _generated.unaryExpression)("-", result);
+ }
+
+ return result;
+ }
+
+ if ((0, _isRegExp.default)(value)) {
+ const pattern = value.source;
+ const flags = value.toString().match(/\/([a-z]+|)$/)[1];
+ return (0, _generated.regExpLiteral)(pattern, flags);
+ }
+
+ if (Array.isArray(value)) {
+ return (0, _generated.arrayExpression)(value.map(valueToNode));
+ }
+
+ if ((0, _isPlainObject.default)(value)) {
+ const props = [];
+
+ for (const key of Object.keys(value)) {
+ let nodeKey;
+
+ if ((0, _isValidIdentifier.default)(key)) {
+ nodeKey = (0, _generated.identifier)(key);
+ } else {
+ nodeKey = (0, _generated.stringLiteral)(key);
+ }
+
+ props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
+ }
+
+ return (0, _generated.objectExpression)(props);
+ }
+
+ throw new Error("don't know how to turn this value into a node");
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js
new file mode 100644
index 00000000000..d6cb97eac28
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/core.js
@@ -0,0 +1,1488 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
+
+var _is = _interopRequireDefault(require("../validators/is"));
+
+var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _constants = require("../constants");
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+(0, _utils.default)("ArrayExpression", {
+ fields: {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
+ default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined
+ }
+ },
+ visitor: ["elements"],
+ aliases: ["Expression"]
+});
+(0, _utils.default)("AssignmentExpression", {
+ fields: {
+ operator: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertValueType)("string");
+ }
+
+ const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
+ const pattern = (0, _utils.assertOneOf)("=");
+ return function (node, key, val) {
+ const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
+ validator(node, key, val);
+ };
+ }()
+ },
+ left: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ builder: ["operator", "left", "right"],
+ visitor: ["left", "right"],
+ aliases: ["Expression"]
+});
+(0, _utils.default)("BinaryExpression", {
+ builder: ["operator", "left", "right"],
+ fields: {
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
+ },
+ left: {
+ validate: function () {
+ const expression = (0, _utils.assertNodeType)("Expression");
+ const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
+
+ const validator = function (node, key, val) {
+ const validator = node.operator === "in" ? inOp : expression;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "PrivateName"];
+ return validator;
+ }()
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ visitor: ["left", "right"],
+ aliases: ["Binary", "Expression"]
+});
+(0, _utils.default)("InterpreterDirective", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+(0, _utils.default)("Directive", {
+ visitor: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertNodeType)("DirectiveLiteral")
+ }
+ }
+});
+(0, _utils.default)("DirectiveLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+(0, _utils.default)("BlockStatement", {
+ builder: ["body", "directives"],
+ visitor: ["directives", "body"],
+ fields: {
+ directives: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
+ default: []
+ },
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent", "Block", "Statement"]
+});
+(0, _utils.default)("BreakStatement", {
+ visitor: ["label"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+ },
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"]
+});
+(0, _utils.default)("CallExpression", {
+ visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
+ builder: ["callee", "arguments"],
+ aliases: ["Expression"],
+ fields: Object.assign({
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
+ },
+ arguments: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
+ }
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ optional: {
+ validate: (0, _utils.assertOneOf)(true, false),
+ optional: true
+ }
+ } : {}, {
+ typeArguments: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
+ optional: true
+ }
+ })
+});
+(0, _utils.default)("CatchClause", {
+ visitor: ["param", "body"],
+ fields: {
+ param: {
+ validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ },
+ aliases: ["Scopable", "BlockParent"]
+});
+(0, _utils.default)("ConditionalExpression", {
+ visitor: ["test", "consequent", "alternate"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ consequent: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ alternate: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Expression", "Conditional"]
+});
+(0, _utils.default)("ContinueStatement", {
+ visitor: ["label"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+ },
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"]
+});
+(0, _utils.default)("DebuggerStatement", {
+ aliases: ["Statement"]
+});
+(0, _utils.default)("DoWhileStatement", {
+ visitor: ["test", "body"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ },
+ aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
+});
+(0, _utils.default)("EmptyStatement", {
+ aliases: ["Statement"]
+});
+(0, _utils.default)("ExpressionStatement", {
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Statement", "ExpressionWrapper"]
+});
+(0, _utils.default)("File", {
+ builder: ["program", "comments", "tokens"],
+ visitor: ["program"],
+ fields: {
+ program: {
+ validate: (0, _utils.assertNodeType)("Program")
+ },
+ comments: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {}, {
+ each: {
+ oneOfNodeTypes: ["CommentBlock", "CommentLine"]
+ }
+ }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
+ optional: true
+ },
+ tokens: {
+ validate: (0, _utils.assertEach)(Object.assign(() => {}, {
+ type: "any"
+ })),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("ForInStatement", {
+ visitor: ["left", "right", "body"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
+ fields: {
+ left: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+(0, _utils.default)("ForStatement", {
+ visitor: ["init", "test", "update", "body"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
+ fields: {
+ init: {
+ validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
+ optional: true
+ },
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ update: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+const functionCommon = {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
+ },
+ generator: {
+ default: false
+ },
+ async: {
+ default: false
+ }
+};
+exports.functionCommon = functionCommon;
+const functionTypeAnnotationCommon = {
+ returnType: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ }
+};
+exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
+const functionDeclarationCommon = Object.assign({}, functionCommon, {
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+});
+exports.functionDeclarationCommon = functionDeclarationCommon;
+(0, _utils.default)("FunctionDeclaration", {
+ builder: ["id", "params", "body", "generator", "async"],
+ visitor: ["id", "params", "body", "returnType", "typeParameters"],
+ fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }),
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};
+ const identifier = (0, _utils.assertNodeType)("Identifier");
+ return function (parent, key, node) {
+ if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
+ identifier(node, "id", node.id);
+ }
+ };
+ }()
+});
+(0, _utils.default)("FunctionExpression", {
+ inherits: "FunctionDeclaration",
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+const patternLikeCommon = {
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
+ }
+};
+exports.patternLikeCommon = patternLikeCommon;
+(0, _utils.default)("Identifier", {
+ builder: ["name"],
+ visitor: ["typeAnnotation", "decorators"],
+ aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
+ fields: Object.assign({}, patternLikeCommon, {
+ name: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!(0, _isValidIdentifier.default)(val, false)) {
+ throw new TypeError(`"${val}" is not a valid identifier name`);
+ }
+ }, {
+ type: "string"
+ }))
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ }),
+
+ validate(parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const match = /\.(\w+)$/.exec(key);
+ if (!match) return;
+ const [, parentKey] = match;
+ const nonComp = {
+ computed: false
+ };
+
+ if (parentKey === "property") {
+ if ((0, _is.default)("MemberExpression", parent, nonComp)) return;
+ if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return;
+ } else if (parentKey === "key") {
+ if ((0, _is.default)("Property", parent, nonComp)) return;
+ if ((0, _is.default)("Method", parent, nonComp)) return;
+ } else if (parentKey === "exported") {
+ if ((0, _is.default)("ExportSpecifier", parent)) return;
+ } else if (parentKey === "imported") {
+ if ((0, _is.default)("ImportSpecifier", parent, {
+ imported: node
+ })) return;
+ } else if (parentKey === "meta") {
+ if ((0, _is.default)("MetaProperty", parent, {
+ meta: node
+ })) return;
+ }
+
+ if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name)) && node.name !== "this") {
+ throw new TypeError(`"${node.name}" is not a valid identifier`);
+ }
+ }
+
+});
+(0, _utils.default)("IfStatement", {
+ visitor: ["test", "consequent", "alternate"],
+ aliases: ["Statement", "Conditional"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ consequent: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ },
+ alternate: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+(0, _utils.default)("LabeledStatement", {
+ visitor: ["label", "body"],
+ aliases: ["Statement"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+(0, _utils.default)("StringLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("NumericLiteral", {
+ builder: ["value"],
+ deprecatedAlias: "NumberLiteral",
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("number")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("NullLiteral", {
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("BooleanLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("boolean")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("RegExpLiteral", {
+ builder: ["pattern", "flags"],
+ deprecatedAlias: "RegexLiteral",
+ aliases: ["Expression", "Pureish", "Literal"],
+ fields: {
+ pattern: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ flags: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const invalid = /[^gimsuy]/.exec(val);
+
+ if (invalid) {
+ throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`);
+ }
+ }, {
+ type: "string"
+ })),
+ default: ""
+ }
+ }
+});
+(0, _utils.default)("LogicalExpression", {
+ builder: ["operator", "left", "right"],
+ visitor: ["left", "right"],
+ aliases: ["Binary", "Expression"],
+ fields: {
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
+ },
+ left: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("MemberExpression", {
+ builder: ["object", "property", "computed", "optional"],
+ visitor: ["object", "property"],
+ aliases: ["Expression", "LVal"],
+ fields: Object.assign({
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ property: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
+ return validator;
+ }()
+ },
+ computed: {
+ default: false
+ }
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ optional: {
+ validate: (0, _utils.assertOneOf)(true, false),
+ optional: true
+ }
+ } : {})
+});
+(0, _utils.default)("NewExpression", {
+ inherits: "CallExpression"
+});
+(0, _utils.default)("Program", {
+ visitor: ["directives", "body"],
+ builder: ["body", "directives", "sourceType", "interpreter"],
+ fields: {
+ sourceFile: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ sourceType: {
+ validate: (0, _utils.assertOneOf)("script", "module"),
+ default: "script"
+ },
+ interpreter: {
+ validate: (0, _utils.assertNodeType)("InterpreterDirective"),
+ default: null,
+ optional: true
+ },
+ directives: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
+ default: []
+ },
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent", "Block"]
+});
+(0, _utils.default)("ObjectExpression", {
+ visitor: ["properties"],
+ aliases: ["Expression"],
+ fields: {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
+ }
+ }
+});
+(0, _utils.default)("ObjectMethod", {
+ builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ kind: Object.assign({
+ validate: (0, _utils.assertOneOf)("method", "get", "set")
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ default: "method"
+ } : {}),
+ computed: {
+ default: false
+ },
+ key: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
+ return validator;
+ }()
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }),
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
+});
+(0, _utils.default)("ObjectProperty", {
+ builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])],
+ fields: {
+ computed: {
+ default: false
+ },
+ key: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
+ return validator;
+ }()
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
+ },
+ shorthand: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.computed) {
+ throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
+ }
+ }, {
+ type: "boolean"
+ }), function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && !(0, _is.default)("Identifier", node.key)) {
+ throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
+ }
+ }),
+ default: false
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ },
+ visitor: ["key", "value", "decorators"],
+ aliases: ["UserWhitespacable", "Property", "ObjectMember"],
+ validate: function () {
+ const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
+ const expression = (0, _utils.assertNodeType)("Expression");
+ return function (parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
+ validator(node, "value", node.value);
+ };
+ }()
+});
+(0, _utils.default)("RestElement", {
+ visitor: ["argument", "typeAnnotation"],
+ builder: ["argument"],
+ aliases: ["LVal", "PatternLike"],
+ deprecatedAlias: "RestProperty",
+ fields: Object.assign({}, patternLikeCommon, {
+ argument: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
+ }
+ }),
+
+ validate(parent, key) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const match = /(\w+)\[(\d+)\]/.exec(key);
+ if (!match) throw new Error("Internal Babel error: malformed key.");
+ const [, listKey, index] = match;
+
+ if (parent[listKey].length > index + 1) {
+ throw new TypeError(`RestElement must be last element of ${listKey}`);
+ }
+ }
+
+});
+(0, _utils.default)("ReturnStatement", {
+ visitor: ["argument"],
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("SequenceExpression", {
+ visitor: ["expressions"],
+ fields: {
+ expressions: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
+ }
+ },
+ aliases: ["Expression"]
+});
+(0, _utils.default)("ParenthesizedExpression", {
+ visitor: ["expression"],
+ aliases: ["Expression", "ExpressionWrapper"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("SwitchCase", {
+ visitor: ["test", "consequent"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ consequent: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ }
+});
+(0, _utils.default)("SwitchStatement", {
+ visitor: ["discriminant", "cases"],
+ aliases: ["Statement", "BlockParent", "Scopable"],
+ fields: {
+ discriminant: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ cases: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
+ }
+ }
+});
+(0, _utils.default)("ThisExpression", {
+ aliases: ["Expression"]
+});
+(0, _utils.default)("ThrowStatement", {
+ visitor: ["argument"],
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("TryStatement", {
+ visitor: ["block", "handler", "finalizer"],
+ aliases: ["Statement"],
+ fields: {
+ block: {
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function (node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!node.handler && !node.finalizer) {
+ throw new TypeError("TryStatement expects either a handler or finalizer, or both");
+ }
+ }, {
+ oneOfNodeTypes: ["BlockStatement"]
+ }))
+ },
+ handler: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("CatchClause")
+ },
+ finalizer: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }
+});
+(0, _utils.default)("UnaryExpression", {
+ builder: ["operator", "argument", "prefix"],
+ fields: {
+ prefix: {
+ default: true
+ },
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
+ }
+ },
+ visitor: ["argument"],
+ aliases: ["UnaryLike", "Expression"]
+});
+(0, _utils.default)("UpdateExpression", {
+ builder: ["operator", "argument", "prefix"],
+ fields: {
+ prefix: {
+ default: false
+ },
+ argument: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
+ },
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
+ }
+ },
+ visitor: ["argument"],
+ aliases: ["Expression"]
+});
+(0, _utils.default)("VariableDeclaration", {
+ builder: ["kind", "declarations"],
+ visitor: ["declarations"],
+ aliases: ["Statement", "Declaration"],
+ fields: {
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ kind: {
+ validate: (0, _utils.assertOneOf)("var", "let", "const")
+ },
+ declarations: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
+ }
+ },
+
+ validate(parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ if (!(0, _is.default)("ForXStatement", parent, {
+ left: node
+ })) return;
+
+ if (node.declarations.length !== 1) {
+ throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
+ }
+ }
+
+});
+(0, _utils.default)("VariableDeclarator", {
+ visitor: ["id", "init"],
+ fields: {
+ id: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertNodeType)("LVal");
+ }
+
+ const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
+ const without = (0, _utils.assertNodeType)("Identifier");
+ return function (node, key, val) {
+ const validator = node.init ? normal : without;
+ validator(node, key, val);
+ };
+ }()
+ },
+ definite: {
+ optional: true,
+ validate: (0, _utils.assertValueType)("boolean")
+ },
+ init: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("WhileStatement", {
+ visitor: ["test", "body"],
+ aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+(0, _utils.default)("WithStatement", {
+ visitor: ["object", "body"],
+ aliases: ["Statement"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+(0, _utils.default)("AssignmentPattern", {
+ visitor: ["left", "right", "decorators"],
+ builder: ["left", "right"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ left: {
+ validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ })
+});
+(0, _utils.default)("ArrayPattern", {
+ visitor: ["elements", "typeAnnotation"],
+ builder: ["elements"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ })
+});
+(0, _utils.default)("ArrowFunctionExpression", {
+ builder: ["params", "body", "async"],
+ visitor: ["params", "body", "returnType", "typeParameters"],
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ expression: {
+ validate: (0, _utils.assertValueType)("boolean")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
+ }
+ })
+});
+(0, _utils.default)("ClassBody", {
+ visitor: ["body"],
+ fields: {
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
+ }
+ }
+});
+(0, _utils.default)("ClassExpression", {
+ builder: ["id", "superClass", "body", "decorators"],
+ visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
+ aliases: ["Scopable", "Class", "Expression"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("ClassBody")
+ },
+ superClass: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ superTypeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ },
+ implements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ mixins: {
+ validate: (0, _utils.assertNodeType)("InterfaceExtends"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("ClassDeclaration", {
+ inherits: "ClassExpression",
+ aliases: ["Scopable", "Class", "Statement", "Declaration"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("ClassBody")
+ },
+ superClass: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ superTypeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ },
+ implements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ mixins: {
+ validate: (0, _utils.assertNodeType)("InterfaceExtends"),
+ optional: true
+ },
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ abstract: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ },
+ validate: function () {
+ const identifier = (0, _utils.assertNodeType)("Identifier");
+ return function (parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
+ identifier(node, "id", node.id);
+ }
+ };
+ }()
+});
+(0, _utils.default)("ExportAllDeclaration", {
+ visitor: ["source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ },
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertNodeType)("ImportAttribute"))
+ }
+ }
+});
+(0, _utils.default)("ExportDefaultDeclaration", {
+ visitor: ["declaration"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ declaration: {
+ validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
+ }
+ }
+});
+(0, _utils.default)("ExportNamedDeclaration", {
+ visitor: ["declaration", "specifiers", "source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ declaration: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.specifiers.length) {
+ throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
+ }
+ }, {
+ oneOfNodeTypes: ["Declaration"]
+ }), function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.source) {
+ throw new TypeError("Cannot export a declaration from a source");
+ }
+ })
+ },
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertNodeType)("ImportAttribute"))
+ },
+ specifiers: {
+ default: [],
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () {
+ const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
+ const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
+ if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;
+ return function (node, key, val) {
+ const validator = node.source ? sourced : sourceless;
+ validator(node, key, val);
+ };
+ }()))
+ },
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral"),
+ optional: true
+ },
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
+ }
+});
+(0, _utils.default)("ExportSpecifier", {
+ visitor: ["local", "exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ }
+ }
+});
+(0, _utils.default)("ForOfStatement", {
+ visitor: ["left", "right", "body"],
+ builder: ["left", "right", "body", "await"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
+ fields: {
+ left: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
+ }
+
+ const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
+ const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
+ return function (node, key, val) {
+ if ((0, _is.default)("VariableDeclaration", val)) {
+ declaration(node, key, val);
+ } else {
+ lval(node, key, val);
+ }
+ };
+ }()
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ },
+ await: {
+ default: false
+ }
+ }
+});
+(0, _utils.default)("ImportDeclaration", {
+ visitor: ["specifiers", "source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration"],
+ fields: {
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertNodeType)("ImportAttribute"))
+ },
+ specifiers: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
+ },
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ },
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("ImportDefaultSpecifier", {
+ visitor: ["local"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("ImportNamespaceSpecifier", {
+ visitor: ["local"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("ImportSpecifier", {
+ visitor: ["local", "imported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ imported: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ },
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "typeof"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("MetaProperty", {
+ visitor: ["meta", "property"],
+ aliases: ["Expression"],
+ fields: {
+ meta: {
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ let property;
+
+ switch (val.name) {
+ case "function":
+ property = "sent";
+ break;
+
+ case "new":
+ property = "target";
+ break;
+
+ case "import":
+ property = "meta";
+ break;
+ }
+
+ if (!(0, _is.default)("Identifier", node.property, {
+ name: property
+ })) {
+ throw new TypeError("Unrecognised MetaProperty");
+ }
+ }, {
+ oneOfNodeTypes: ["Identifier"]
+ }))
+ },
+ property: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+const classMethodOrPropertyCommon = {
+ abstract: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ accessibility: {
+ validate: (0, _utils.assertOneOf)("public", "private", "protected"),
+ optional: true
+ },
+ static: {
+ default: false
+ },
+ computed: {
+ default: false
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ key: {
+ validate: (0, _utils.chain)(function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+ return function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+ }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
+ }
+};
+exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
+const classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
+ kind: {
+ validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
+ default: "method"
+ },
+ access: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+});
+exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
+(0, _utils.default)("ClassMethod", {
+ aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
+ builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+(0, _utils.default)("ObjectPattern", {
+ visitor: ["properties", "typeAnnotation", "decorators"],
+ builder: ["properties"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
+ }
+ })
+});
+(0, _utils.default)("SpreadElement", {
+ visitor: ["argument"],
+ aliases: ["UnaryLike"],
+ deprecatedAlias: "SpreadProperty",
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("Super", {
+ aliases: ["Expression"]
+});
+(0, _utils.default)("TaggedTemplateExpression", {
+ visitor: ["tag", "quasi"],
+ aliases: ["Expression"],
+ fields: {
+ tag: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ quasi: {
+ validate: (0, _utils.assertNodeType)("TemplateLiteral")
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("TemplateElement", {
+ builder: ["value", "tail"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertShape)({
+ raw: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ cooked: {
+ validate: (0, _utils.assertValueType)("string"),
+ optional: true
+ }
+ })
+ },
+ tail: {
+ default: false
+ }
+ }
+});
+(0, _utils.default)("TemplateLiteral", {
+ visitor: ["quasis", "expressions"],
+ aliases: ["Expression", "Literal"],
+ fields: {
+ quasis: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
+ },
+ expressions: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function (node, key, val) {
+ if (node.quasis.length !== val.length + 1) {
+ throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`);
+ }
+ })
+ }
+ }
+});
+(0, _utils.default)("YieldExpression", {
+ builder: ["argument", "delegate"],
+ visitor: ["argument"],
+ aliases: ["Expression", "Terminatorless"],
+ fields: {
+ delegate: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && !node.argument) {
+ throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
+ }
+ }, {
+ type: "boolean"
+ })),
+ default: false
+ },
+ argument: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("AwaitExpression", {
+ builder: ["argument"],
+ visitor: ["argument"],
+ aliases: ["Expression", "Terminatorless"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("Import", {
+ aliases: ["Expression"]
+});
+(0, _utils.default)("BigIntLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("ExportNamespaceSpecifier", {
+ visitor: ["exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("OptionalMemberExpression", {
+ builder: ["object", "property", "computed", "optional"],
+ visitor: ["object", "property"],
+ aliases: ["Expression"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ property: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier"];
+ return validator;
+ }()
+ },
+ computed: {
+ default: false
+ },
+ optional: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
+ }
+ }
+});
+(0, _utils.default)("OptionalCallExpression", {
+ visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
+ builder: ["callee", "arguments", "optional"],
+ aliases: ["Expression"],
+ fields: {
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ arguments: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName")))
+ },
+ optional: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
+ },
+ typeArguments: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js
new file mode 100644
index 00000000000..1a67e2446ef
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/experimental.js
@@ -0,0 +1,200 @@
+"use strict";
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+var _core = require("./core");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+(0, _utils.default)("ArgumentPlaceholder", {});
+(0, _utils.default)("BindExpression", {
+ visitor: ["object", "callee"],
+ aliases: ["Expression"],
+ fields: !process.env.BABEL_TYPES_8_BREAKING ? {
+ object: {
+ validate: Object.assign(() => {}, {
+ oneOfNodeTypes: ["Expression"]
+ })
+ },
+ callee: {
+ validate: Object.assign(() => {}, {
+ oneOfNodeTypes: ["Expression"]
+ })
+ }
+ } : {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("ClassProperty", {
+ visitor: ["key", "value", "typeAnnotation", "decorators"],
+ builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
+ aliases: ["Property"],
+ fields: Object.assign({}, _core.classMethodOrPropertyCommon, {
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ definite: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ })
+});
+(0, _utils.default)("PipelineTopicExpression", {
+ builder: ["expression"],
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("PipelineBareFunction", {
+ builder: ["callee"],
+ visitor: ["callee"],
+ fields: {
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("PipelinePrimaryTopicReference", {
+ aliases: ["Expression"]
+});
+(0, _utils.default)("ClassPrivateProperty", {
+ visitor: ["key", "value", "decorators"],
+ builder: ["key", "value", "decorators", "static"],
+ aliases: ["Property", "Private"],
+ fields: {
+ key: {
+ validate: (0, _utils.assertNodeType)("PrivateName")
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("ClassPrivateMethod", {
+ builder: ["kind", "key", "params", "body", "static"],
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
+ fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
+ key: {
+ validate: (0, _utils.assertNodeType)("PrivateName")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+(0, _utils.default)("ImportAttribute", {
+ visitor: ["key", "value"],
+ fields: {
+ key: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ }
+ }
+});
+(0, _utils.default)("Decorator", {
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("DoExpression", {
+ visitor: ["body"],
+ aliases: ["Expression"],
+ fields: {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }
+});
+(0, _utils.default)("ExportDefaultSpecifier", {
+ visitor: ["exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("PrivateName", {
+ visitor: ["id"],
+ aliases: ["Private"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("RecordExpression", {
+ visitor: ["properties"],
+ aliases: ["Expression"],
+ fields: {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
+ }
+ }
+});
+(0, _utils.default)("TupleExpression", {
+ fields: {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
+ default: []
+ }
+ },
+ visitor: ["elements"],
+ aliases: ["Expression"]
+});
+(0, _utils.default)("DecimalLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("StaticBlock", {
+ visitor: ["body"],
+ fields: {
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent"]
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js
new file mode 100644
index 00000000000..a6d74d7aa4c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/flow.js
@@ -0,0 +1,461 @@
+"use strict";
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => {
+ (0, _utils.default)(name, {
+ builder: ["id", "typeParameters", "extends", "body"],
+ visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
+ body: (0, _utils.validateType)("ObjectTypeAnnotation")
+ }
+ });
+};
+
+(0, _utils.default)("AnyTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("ArrayTypeAnnotation", {
+ visitor: ["elementType"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ elementType: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("BooleanTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("BooleanLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("NullLiteralTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("ClassImplements", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+defineInterfaceishType("DeclareClass");
+(0, _utils.default)("DeclareFunction", {
+ visitor: ["id"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
+ }
+});
+defineInterfaceishType("DeclareInterface");
+(0, _utils.default)("DeclareModule", {
+ builder: ["id", "body", "kind"],
+ visitor: ["id", "body"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ body: (0, _utils.validateType)("BlockStatement"),
+ kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
+ }
+});
+(0, _utils.default)("DeclareModuleExports", {
+ visitor: ["typeAnnotation"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
+});
+(0, _utils.default)("DeclareTypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ right: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("DeclareOpaqueType", {
+ visitor: ["id", "typeParameters", "supertype"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ supertype: (0, _utils.validateOptionalType)("FlowType")
+ }
+});
+(0, _utils.default)("DeclareVariable", {
+ visitor: ["id"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+});
+(0, _utils.default)("DeclareExportDeclaration", {
+ visitor: ["declaration", "specifiers", "source"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ declaration: (0, _utils.validateOptionalType)("Flow"),
+ specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
+ source: (0, _utils.validateOptionalType)("StringLiteral"),
+ default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("DeclareExportAllDeclaration", {
+ visitor: ["source"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ source: (0, _utils.validateType)("StringLiteral"),
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
+ }
+});
+(0, _utils.default)("DeclaredPredicate", {
+ visitor: ["value"],
+ aliases: ["Flow", "FlowPredicate"],
+ fields: {
+ value: (0, _utils.validateType)("Flow")
+ }
+});
+(0, _utils.default)("ExistsTypeAnnotation", {
+ aliases: ["Flow", "FlowType"]
+});
+(0, _utils.default)("FunctionTypeAnnotation", {
+ visitor: ["typeParameters", "params", "rest", "returnType"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
+ rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
+ returnType: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("FunctionTypeParam", {
+ visitor: ["name", "typeAnnotation"],
+ aliases: ["Flow"],
+ fields: {
+ name: (0, _utils.validateOptionalType)("Identifier"),
+ typeAnnotation: (0, _utils.validateType)("FlowType"),
+ optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("GenericTypeAnnotation", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+(0, _utils.default)("InferredPredicate", {
+ aliases: ["Flow", "FlowPredicate"]
+});
+(0, _utils.default)("InterfaceExtends", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["Flow"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+defineInterfaceishType("InterfaceDeclaration");
+(0, _utils.default)("InterfaceTypeAnnotation", {
+ visitor: ["extends", "body"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ body: (0, _utils.validateType)("ObjectTypeAnnotation")
+ }
+});
+(0, _utils.default)("IntersectionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+(0, _utils.default)("MixedTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("EmptyTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("NullableTypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("NumberLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
+ }
+});
+(0, _utils.default)("NumberTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("ObjectTypeAnnotation", {
+ visitor: ["properties", "indexers", "callProperties", "internalSlots"],
+ aliases: ["Flow", "FlowType"],
+ builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
+ fields: {
+ properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
+ indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
+ callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
+ internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
+ exact: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ default: false
+ },
+ inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("ObjectTypeInternalSlot", {
+ visitor: ["id", "value", "optional", "static", "method"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ value: (0, _utils.validateType)("FlowType"),
+ optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("ObjectTypeCallProperty", {
+ visitor: ["value"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ value: (0, _utils.validateType)("FlowType"),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+(0, _utils.default)("ObjectTypeIndexer", {
+ visitor: ["id", "key", "value", "variance"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ id: (0, _utils.validateOptionalType)("Identifier"),
+ key: (0, _utils.validateType)("FlowType"),
+ value: (0, _utils.validateType)("FlowType"),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ variance: (0, _utils.validateOptionalType)("Variance")
+ }
+});
+(0, _utils.default)("ObjectTypeProperty", {
+ visitor: ["key", "value", "variance"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ value: (0, _utils.validateType)("FlowType"),
+ kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ variance: (0, _utils.validateOptionalType)("Variance")
+ }
+});
+(0, _utils.default)("ObjectTypeSpreadProperty", {
+ visitor: ["argument"],
+ aliases: ["Flow", "UserWhitespacable"],
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("OpaqueType", {
+ visitor: ["id", "typeParameters", "supertype", "impltype"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ supertype: (0, _utils.validateOptionalType)("FlowType"),
+ impltype: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("QualifiedTypeIdentifier", {
+ visitor: ["id", "qualification"],
+ aliases: ["Flow"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
+ }
+});
+(0, _utils.default)("StringLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
+ }
+});
+(0, _utils.default)("StringTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("SymbolTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("ThisTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("TupleTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+(0, _utils.default)("TypeofTypeAnnotation", {
+ visitor: ["argument"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("TypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ right: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("TypeAnnotation", {
+ aliases: ["Flow"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("FlowType")
+ }
+});
+(0, _utils.default)("TypeCastExpression", {
+ visitor: ["expression", "typeAnnotation"],
+ aliases: ["Flow", "ExpressionWrapper", "Expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
+});
+(0, _utils.default)("TypeParameter", {
+ aliases: ["Flow"],
+ visitor: ["bound", "default", "variance"],
+ fields: {
+ name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
+ bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
+ default: (0, _utils.validateOptionalType)("FlowType"),
+ variance: (0, _utils.validateOptionalType)("Variance")
+ }
+});
+(0, _utils.default)("TypeParameterDeclaration", {
+ aliases: ["Flow"],
+ visitor: ["params"],
+ fields: {
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
+ }
+});
+(0, _utils.default)("TypeParameterInstantiation", {
+ aliases: ["Flow"],
+ visitor: ["params"],
+ fields: {
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+(0, _utils.default)("UnionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["Flow", "FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+(0, _utils.default)("Variance", {
+ aliases: ["Flow"],
+ builder: ["kind"],
+ fields: {
+ kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
+ }
+});
+(0, _utils.default)("VoidTypeAnnotation", {
+ aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
+});
+(0, _utils.default)("EnumDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "body"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
+ }
+});
+(0, _utils.default)("EnumBooleanBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)("EnumBooleanMember")
+ }
+});
+(0, _utils.default)("EnumNumberBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)("EnumNumberMember")
+ }
+});
+(0, _utils.default)("EnumStringBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"])
+ }
+});
+(0, _utils.default)("EnumSymbolBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ members: (0, _utils.validateArrayOfType)("EnumDefaultedMember")
+ }
+});
+(0, _utils.default)("EnumBooleanMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("BooleanLiteral")
+ }
+});
+(0, _utils.default)("EnumNumberMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id", "init"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("NumericLiteral")
+ }
+});
+(0, _utils.default)("EnumStringMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id", "init"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("StringLiteral")
+ }
+});
+(0, _utils.default)("EnumDefaultedMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js
new file mode 100644
index 00000000000..d69997f2931
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/index.js
@@ -0,0 +1,97 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "VISITOR_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.VISITOR_KEYS;
+ }
+});
+Object.defineProperty(exports, "ALIAS_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.ALIAS_KEYS;
+ }
+});
+Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.FLIPPED_ALIAS_KEYS;
+ }
+});
+Object.defineProperty(exports, "NODE_FIELDS", {
+ enumerable: true,
+ get: function () {
+ return _utils.NODE_FIELDS;
+ }
+});
+Object.defineProperty(exports, "BUILDER_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.BUILDER_KEYS;
+ }
+});
+Object.defineProperty(exports, "DEPRECATED_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.DEPRECATED_KEYS;
+ }
+});
+Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
+ enumerable: true,
+ get: function () {
+ return _utils.NODE_PARENT_VALIDATIONS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS_ALIAS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
+ }
+});
+exports.TYPES = void 0;
+
+var _toFastProperties = _interopRequireDefault(require("to-fast-properties"));
+
+require("./core");
+
+require("./flow");
+
+require("./jsx");
+
+require("./misc");
+
+require("./experimental");
+
+require("./typescript");
+
+var _utils = require("./utils");
+
+var _placeholders = require("./placeholders");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+(0, _toFastProperties.default)(_utils.VISITOR_KEYS);
+(0, _toFastProperties.default)(_utils.ALIAS_KEYS);
+(0, _toFastProperties.default)(_utils.FLIPPED_ALIAS_KEYS);
+(0, _toFastProperties.default)(_utils.NODE_FIELDS);
+(0, _toFastProperties.default)(_utils.BUILDER_KEYS);
+(0, _toFastProperties.default)(_utils.DEPRECATED_KEYS);
+(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_ALIAS);
+(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
+const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
+exports.TYPES = TYPES; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js
new file mode 100644
index 00000000000..cdea06ba395
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/jsx.js
@@ -0,0 +1,165 @@
+"use strict";
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+(0, _utils.default)("JSXAttribute", {
+ visitor: ["name", "value"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
+ },
+ value: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
+ }
+ }
+});
+(0, _utils.default)("JSXClosingElement", {
+ visitor: ["name"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
+ }
+ }
+});
+(0, _utils.default)("JSXElement", {
+ builder: ["openingElement", "closingElement", "children", "selfClosing"],
+ visitor: ["openingElement", "children", "closingElement"],
+ aliases: ["JSX", "Immutable", "Expression"],
+ fields: {
+ openingElement: {
+ validate: (0, _utils.assertNodeType)("JSXOpeningElement")
+ },
+ closingElement: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("JSXClosingElement")
+ },
+ children: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
+ },
+ selfClosing: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("JSXEmptyExpression", {
+ aliases: ["JSX"]
+});
+(0, _utils.default)("JSXExpressionContainer", {
+ visitor: ["expression"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
+ }
+ }
+});
+(0, _utils.default)("JSXSpreadChild", {
+ visitor: ["expression"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("JSXIdentifier", {
+ builder: ["name"],
+ aliases: ["JSX"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+(0, _utils.default)("JSXMemberExpression", {
+ visitor: ["object", "property"],
+ aliases: ["JSX"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
+ },
+ property: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ }
+ }
+});
+(0, _utils.default)("JSXNamespacedName", {
+ visitor: ["namespace", "name"],
+ aliases: ["JSX"],
+ fields: {
+ namespace: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ },
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ }
+ }
+});
+(0, _utils.default)("JSXOpeningElement", {
+ builder: ["name", "attributes", "selfClosing"],
+ visitor: ["name", "attributes"],
+ aliases: ["JSX", "Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
+ },
+ selfClosing: {
+ default: false
+ },
+ attributes: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+});
+(0, _utils.default)("JSXSpreadAttribute", {
+ visitor: ["argument"],
+ aliases: ["JSX"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("JSXText", {
+ aliases: ["JSX", "Immutable"],
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+(0, _utils.default)("JSXFragment", {
+ builder: ["openingFragment", "closingFragment", "children"],
+ visitor: ["openingFragment", "children", "closingFragment"],
+ aliases: ["JSX", "Immutable", "Expression"],
+ fields: {
+ openingFragment: {
+ validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
+ },
+ closingFragment: {
+ validate: (0, _utils.assertNodeType)("JSXClosingFragment")
+ },
+ children: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
+ }
+ }
+});
+(0, _utils.default)("JSXOpeningFragment", {
+ aliases: ["JSX", "Immutable"]
+});
+(0, _utils.default)("JSXClosingFragment", {
+ aliases: ["JSX", "Immutable"]
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js
new file mode 100644
index 00000000000..f72c651151f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/misc.js
@@ -0,0 +1,33 @@
+"use strict";
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+var _placeholders = require("./placeholders");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+(0, _utils.default)("Noop", {
+ visitor: []
+});
+(0, _utils.default)("Placeholder", {
+ visitor: [],
+ builder: ["expectedNode", "name"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ expectedNode: {
+ validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
+ }
+ }
+});
+(0, _utils.default)("V8IntrinsicIdentifier", {
+ builder: ["name"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js
new file mode 100644
index 00000000000..52b52e5e80b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/placeholders.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
+
+var _utils = require("./utils");
+
+const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
+exports.PLACEHOLDERS = PLACEHOLDERS;
+const PLACEHOLDERS_ALIAS = {
+ Declaration: ["Statement"],
+ Pattern: ["PatternLike", "LVal"]
+};
+exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
+
+for (const type of PLACEHOLDERS) {
+ const alias = _utils.ALIAS_KEYS[type];
+ if (alias == null ? void 0 : alias.length) PLACEHOLDERS_ALIAS[type] = alias;
+}
+
+const PLACEHOLDERS_FLIPPED_ALIAS = {};
+exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
+Object.keys(PLACEHOLDERS_ALIAS).forEach(type => {
+ PLACEHOLDERS_ALIAS[type].forEach(alias => {
+ if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
+ PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
+ }
+
+ PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
+ });
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js
new file mode 100644
index 00000000000..c8d1dc53949
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/typescript.js
@@ -0,0 +1,428 @@
+"use strict";
+
+var _utils = _interopRequireWildcard(require("./utils"));
+
+var _core = require("./core");
+
+function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+const bool = (0, _utils.assertValueType)("boolean");
+const tSFunctionTypeAnnotationCommon = {
+ returnType: {
+ validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ }
+};
+(0, _utils.default)("TSParameterProperty", {
+ aliases: ["LVal"],
+ visitor: ["parameter"],
+ fields: {
+ accessibility: {
+ validate: (0, _utils.assertOneOf)("public", "private", "protected"),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ parameter: {
+ validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
+ }
+ }
+});
+(0, _utils.default)("TSDeclareFunction", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "params", "returnType"],
+ fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
+});
+(0, _utils.default)("TSDeclareMethod", {
+ visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
+ fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
+});
+(0, _utils.default)("TSQualifiedName", {
+ aliases: ["TSEntityName"],
+ visitor: ["left", "right"],
+ fields: {
+ left: (0, _utils.validateType)("TSEntityName"),
+ right: (0, _utils.validateType)("Identifier")
+ }
+});
+const signatureDeclarationCommon = {
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
+};
+const callConstructSignatureDeclaration = {
+ aliases: ["TSTypeElement"],
+ visitor: ["typeParameters", "parameters", "typeAnnotation"],
+ fields: signatureDeclarationCommon
+};
+(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
+(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
+const namedTypeElementCommon = {
+ key: (0, _utils.validateType)("Expression"),
+ computed: (0, _utils.validate)(bool),
+ optional: (0, _utils.validateOptional)(bool)
+};
+(0, _utils.default)("TSPropertySignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["key", "typeAnnotation", "initializer"],
+ fields: Object.assign({}, namedTypeElementCommon, {
+ readonly: (0, _utils.validateOptional)(bool),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
+ initializer: (0, _utils.validateOptionalType)("Expression")
+ })
+});
+(0, _utils.default)("TSMethodSignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
+ fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon)
+});
+(0, _utils.default)("TSIndexSignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["parameters", "typeAnnotation"],
+ fields: {
+ readonly: (0, _utils.validateOptional)(bool),
+ parameters: (0, _utils.validateArrayOfType)("Identifier"),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
+ }
+});
+const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
+
+for (const type of tsKeywordTypes) {
+ (0, _utils.default)(type, {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: [],
+ fields: {}
+ });
+}
+
+(0, _utils.default)("TSThisType", {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: [],
+ fields: {}
+});
+const fnOrCtr = {
+ aliases: ["TSType"],
+ visitor: ["typeParameters", "parameters", "typeAnnotation"],
+ fields: signatureDeclarationCommon
+};
+(0, _utils.default)("TSFunctionType", fnOrCtr);
+(0, _utils.default)("TSConstructorType", fnOrCtr);
+(0, _utils.default)("TSTypeReference", {
+ aliases: ["TSType"],
+ visitor: ["typeName", "typeParameters"],
+ fields: {
+ typeName: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+(0, _utils.default)("TSTypePredicate", {
+ aliases: ["TSType"],
+ visitor: ["parameterName", "typeAnnotation"],
+ builder: ["parameterName", "typeAnnotation", "asserts"],
+ fields: {
+ parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
+ asserts: (0, _utils.validateOptional)(bool)
+ }
+});
+(0, _utils.default)("TSTypeQuery", {
+ aliases: ["TSType"],
+ visitor: ["exprName"],
+ fields: {
+ exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
+ }
+});
+(0, _utils.default)("TSTypeLiteral", {
+ aliases: ["TSType"],
+ visitor: ["members"],
+ fields: {
+ members: (0, _utils.validateArrayOfType)("TSTypeElement")
+ }
+});
+(0, _utils.default)("TSArrayType", {
+ aliases: ["TSType"],
+ visitor: ["elementType"],
+ fields: {
+ elementType: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSTupleType", {
+ aliases: ["TSType"],
+ visitor: ["elementTypes"],
+ fields: {
+ elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
+ }
+});
+(0, _utils.default)("TSOptionalType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSRestType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSNamedTupleMember", {
+ visitor: ["label", "elementType"],
+ builder: ["label", "elementType", "optional"],
+ fields: {
+ label: (0, _utils.validateType)("Identifier"),
+ optional: {
+ validate: bool,
+ default: false
+ },
+ elementType: (0, _utils.validateType)("TSType")
+ }
+});
+const unionOrIntersection = {
+ aliases: ["TSType"],
+ visitor: ["types"],
+ fields: {
+ types: (0, _utils.validateArrayOfType)("TSType")
+ }
+};
+(0, _utils.default)("TSUnionType", unionOrIntersection);
+(0, _utils.default)("TSIntersectionType", unionOrIntersection);
+(0, _utils.default)("TSConditionalType", {
+ aliases: ["TSType"],
+ visitor: ["checkType", "extendsType", "trueType", "falseType"],
+ fields: {
+ checkType: (0, _utils.validateType)("TSType"),
+ extendsType: (0, _utils.validateType)("TSType"),
+ trueType: (0, _utils.validateType)("TSType"),
+ falseType: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSInferType", {
+ aliases: ["TSType"],
+ visitor: ["typeParameter"],
+ fields: {
+ typeParameter: (0, _utils.validateType)("TSTypeParameter")
+ }
+});
+(0, _utils.default)("TSParenthesizedType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSTypeOperator", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSIndexedAccessType", {
+ aliases: ["TSType"],
+ visitor: ["objectType", "indexType"],
+ fields: {
+ objectType: (0, _utils.validateType)("TSType"),
+ indexType: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSMappedType", {
+ aliases: ["TSType"],
+ visitor: ["typeParameter", "typeAnnotation", "nameType"],
+ fields: {
+ readonly: (0, _utils.validateOptional)(bool),
+ typeParameter: (0, _utils.validateType)("TSTypeParameter"),
+ optional: (0, _utils.validateOptional)(bool),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
+ nameType: (0, _utils.validateOptionalType)("TSType")
+ }
+});
+(0, _utils.default)("TSLiteralType", {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: ["literal"],
+ fields: {
+ literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
+ }
+});
+(0, _utils.default)("TSExpressionWithTypeArguments", {
+ aliases: ["TSType"],
+ visitor: ["expression", "typeParameters"],
+ fields: {
+ expression: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+(0, _utils.default)("TSInterfaceDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "extends", "body"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
+ body: (0, _utils.validateType)("TSInterfaceBody")
+ }
+});
+(0, _utils.default)("TSInterfaceBody", {
+ visitor: ["body"],
+ fields: {
+ body: (0, _utils.validateArrayOfType)("TSTypeElement")
+ }
+});
+(0, _utils.default)("TSTypeAliasDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "typeAnnotation"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSAsExpression", {
+ aliases: ["Expression"],
+ visitor: ["expression", "typeAnnotation"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+(0, _utils.default)("TSTypeAssertion", {
+ aliases: ["Expression"],
+ visitor: ["typeAnnotation", "expression"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType"),
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+(0, _utils.default)("TSEnumDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "members"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ const: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ members: (0, _utils.validateArrayOfType)("TSEnumMember"),
+ initializer: (0, _utils.validateOptionalType)("Expression")
+ }
+});
+(0, _utils.default)("TSEnumMember", {
+ visitor: ["id", "initializer"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ initializer: (0, _utils.validateOptionalType)("Expression")
+ }
+});
+(0, _utils.default)("TSModuleDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "body"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ global: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
+ }
+});
+(0, _utils.default)("TSModuleBlock", {
+ aliases: ["Scopable", "Block", "BlockParent"],
+ visitor: ["body"],
+ fields: {
+ body: (0, _utils.validateArrayOfType)("Statement")
+ }
+});
+(0, _utils.default)("TSImportType", {
+ aliases: ["TSType"],
+ visitor: ["argument", "qualifier", "typeParameters"],
+ fields: {
+ argument: (0, _utils.validateType)("StringLiteral"),
+ qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+(0, _utils.default)("TSImportEqualsDeclaration", {
+ aliases: ["Statement"],
+ visitor: ["id", "moduleReference"],
+ fields: {
+ isExport: (0, _utils.validate)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
+ }
+});
+(0, _utils.default)("TSExternalModuleReference", {
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("StringLiteral")
+ }
+});
+(0, _utils.default)("TSNonNullExpression", {
+ aliases: ["Expression"],
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+(0, _utils.default)("TSExportAssignment", {
+ aliases: ["Statement"],
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+(0, _utils.default)("TSNamespaceExportDeclaration", {
+ aliases: ["Statement"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+});
+(0, _utils.default)("TSTypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TSType")
+ }
+ }
+});
+(0, _utils.default)("TSTypeParameterInstantiation", {
+ visitor: ["params"],
+ fields: {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
+ }
+ }
+});
+(0, _utils.default)("TSTypeParameterDeclaration", {
+ visitor: ["params"],
+ fields: {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
+ }
+ }
+});
+(0, _utils.default)("TSTypeParameter", {
+ builder: ["constraint", "default", "name"],
+ visitor: ["constraint", "default"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ constraint: {
+ validate: (0, _utils.assertNodeType)("TSType"),
+ optional: true
+ },
+ default: {
+ validate: (0, _utils.assertNodeType)("TSType"),
+ optional: true
+ }
+ }
+}); \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js
new file mode 100644
index 00000000000..447142642b7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/definitions/utils.js
@@ -0,0 +1,315 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validate = validate;
+exports.typeIs = typeIs;
+exports.validateType = validateType;
+exports.validateOptional = validateOptional;
+exports.validateOptionalType = validateOptionalType;
+exports.arrayOf = arrayOf;
+exports.arrayOfType = arrayOfType;
+exports.validateArrayOfType = validateArrayOfType;
+exports.assertEach = assertEach;
+exports.assertOneOf = assertOneOf;
+exports.assertNodeType = assertNodeType;
+exports.assertNodeOrValueType = assertNodeOrValueType;
+exports.assertValueType = assertValueType;
+exports.assertShape = assertShape;
+exports.assertOptionalChainStart = assertOptionalChainStart;
+exports.chain = chain;
+exports.default = defineType;
+exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
+
+var _is = _interopRequireDefault(require("../validators/is"));
+
+var _validate = require("../validators/validate");
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const VISITOR_KEYS = {};
+exports.VISITOR_KEYS = VISITOR_KEYS;
+const ALIAS_KEYS = {};
+exports.ALIAS_KEYS = ALIAS_KEYS;
+const FLIPPED_ALIAS_KEYS = {};
+exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
+const NODE_FIELDS = {};
+exports.NODE_FIELDS = NODE_FIELDS;
+const BUILDER_KEYS = {};
+exports.BUILDER_KEYS = BUILDER_KEYS;
+const DEPRECATED_KEYS = {};
+exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
+const NODE_PARENT_VALIDATIONS = {};
+exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
+
+function getType(val) {
+ if (Array.isArray(val)) {
+ return "array";
+ } else if (val === null) {
+ return "null";
+ } else {
+ return typeof val;
+ }
+}
+
+function validate(validate) {
+ return {
+ validate
+ };
+}
+
+function typeIs(typeName) {
+ return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
+}
+
+function validateType(typeName) {
+ return validate(typeIs(typeName));
+}
+
+function validateOptional(validate) {
+ return {
+ validate,
+ optional: true
+ };
+}
+
+function validateOptionalType(typeName) {
+ return {
+ validate: typeIs(typeName),
+ optional: true
+ };
+}
+
+function arrayOf(elementType) {
+ return chain(assertValueType("array"), assertEach(elementType));
+}
+
+function arrayOfType(typeName) {
+ return arrayOf(typeIs(typeName));
+}
+
+function validateArrayOfType(typeName) {
+ return validate(arrayOfType(typeName));
+}
+
+function assertEach(callback) {
+ function validator(node, key, val) {
+ if (!Array.isArray(val)) return;
+
+ for (let i = 0; i < val.length; i++) {
+ const subkey = `${key}[${i}]`;
+ const v = val[i];
+ callback(node, subkey, v);
+ if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v);
+ }
+ }
+
+ validator.each = callback;
+ return validator;
+}
+
+function assertOneOf(...values) {
+ function validate(node, key, val) {
+ if (values.indexOf(val) < 0) {
+ throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
+ }
+ }
+
+ validate.oneOf = values;
+ return validate;
+}
+
+function assertNodeType(...types) {
+ function validate(node, key, val) {
+ for (const type of types) {
+ if ((0, _is.default)(type, val)) {
+ (0, _validate.validateChild)(node, key, val);
+ return;
+ }
+ }
+
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
+ }
+
+ validate.oneOfNodeTypes = types;
+ return validate;
+}
+
+function assertNodeOrValueType(...types) {
+ function validate(node, key, val) {
+ for (const type of types) {
+ if (getType(val) === type || (0, _is.default)(type, val)) {
+ (0, _validate.validateChild)(node, key, val);
+ return;
+ }
+ }
+
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
+ }
+
+ validate.oneOfNodeOrValueTypes = types;
+ return validate;
+}
+
+function assertValueType(type) {
+ function validate(node, key, val) {
+ const valid = getType(val) === type;
+
+ if (!valid) {
+ throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
+ }
+ }
+
+ validate.type = type;
+ return validate;
+}
+
+function assertShape(shape) {
+ function validate(node, key, val) {
+ const errors = [];
+
+ for (const property of Object.keys(shape)) {
+ try {
+ (0, _validate.validateField)(node, property, val[property], shape[property]);
+ } catch (error) {
+ if (error instanceof TypeError) {
+ errors.push(error.message);
+ continue;
+ }
+
+ throw error;
+ }
+ }
+
+ if (errors.length) {
+ throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`);
+ }
+ }
+
+ validate.shapeOf = shape;
+ return validate;
+}
+
+function assertOptionalChainStart() {
+ function validate(node) {
+ var _current;
+
+ let current = node;
+
+ while (node) {
+ const {
+ type
+ } = current;
+
+ if (type === "OptionalCallExpression") {
+ if (current.optional) return;
+ current = current.callee;
+ continue;
+ }
+
+ if (type === "OptionalMemberExpression") {
+ if (current.optional) return;
+ current = current.object;
+ continue;
+ }
+
+ break;
+ }
+
+ throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`);
+ }
+
+ return validate;
+}
+
+function chain(...fns) {
+ function validate(...args) {
+ for (const fn of fns) {
+ fn(...args);
+ }
+ }
+
+ validate.chainOf = fns;
+ return validate;
+}
+
+const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
+const validFieldKeys = ["default", "optional", "validate"];
+
+function defineType(type, opts = {}) {
+ const inherits = opts.inherits && store[opts.inherits] || {};
+ let fields = opts.fields;
+
+ if (!fields) {
+ fields = {};
+
+ if (inherits.fields) {
+ const keys = Object.getOwnPropertyNames(inherits.fields);
+
+ for (const key of keys) {
+ const field = inherits.fields[key];
+ fields[key] = {
+ default: field.default,
+ optional: field.optional,
+ validate: field.validate
+ };
+ }
+ }
+ }
+
+ const visitor = opts.visitor || inherits.visitor || [];
+ const aliases = opts.aliases || inherits.aliases || [];
+ const builder = opts.builder || inherits.builder || opts.visitor || [];
+
+ for (const k of Object.keys(opts)) {
+ if (validTypeOpts.indexOf(k) === -1) {
+ throw new Error(`Unknown type option "${k}" on ${type}`);
+ }
+ }
+
+ if (opts.deprecatedAlias) {
+ DEPRECATED_KEYS[opts.deprecatedAlias] = type;
+ }
+
+ for (const key of visitor.concat(builder)) {
+ fields[key] = fields[key] || {};
+ }
+
+ for (const key of Object.keys(fields)) {
+ const field = fields[key];
+
+ if (field.default !== undefined && builder.indexOf(key) === -1) {
+ field.optional = true;
+ }
+
+ if (field.default === undefined) {
+ field.default = null;
+ } else if (!field.validate && field.default != null) {
+ field.validate = assertValueType(getType(field.default));
+ }
+
+ for (const k of Object.keys(field)) {
+ if (validFieldKeys.indexOf(k) === -1) {
+ throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
+ }
+ }
+ }
+
+ VISITOR_KEYS[type] = opts.visitor = visitor;
+ BUILDER_KEYS[type] = opts.builder = builder;
+ NODE_FIELDS[type] = opts.fields = fields;
+ ALIAS_KEYS[type] = opts.aliases = aliases;
+ aliases.forEach(alias => {
+ FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
+ FLIPPED_ALIAS_KEYS[alias].push(type);
+ });
+
+ if (opts.validate) {
+ NODE_PARENT_VALIDATIONS[type] = opts.validate;
+ }
+
+ store[type] = opts;
+}
+
+const store = {}; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js
new file mode 100644
index 00000000000..2801bc68828
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js
@@ -0,0 +1,610 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var _exportNames = {
+ react: true,
+ assertNode: true,
+ createTypeAnnotationBasedOnTypeof: true,
+ createUnionTypeAnnotation: true,
+ createFlowUnionType: true,
+ createTSUnionType: true,
+ cloneNode: true,
+ clone: true,
+ cloneDeep: true,
+ cloneDeepWithoutLoc: true,
+ cloneWithoutLoc: true,
+ addComment: true,
+ addComments: true,
+ inheritInnerComments: true,
+ inheritLeadingComments: true,
+ inheritsComments: true,
+ inheritTrailingComments: true,
+ removeComments: true,
+ ensureBlock: true,
+ toBindingIdentifierName: true,
+ toBlock: true,
+ toComputedKey: true,
+ toExpression: true,
+ toIdentifier: true,
+ toKeyAlias: true,
+ toSequenceExpression: true,
+ toStatement: true,
+ valueToNode: true,
+ appendToMemberExpression: true,
+ inherits: true,
+ prependToMemberExpression: true,
+ removeProperties: true,
+ removePropertiesDeep: true,
+ removeTypeDuplicates: true,
+ getBindingIdentifiers: true,
+ getOuterBindingIdentifiers: true,
+ traverse: true,
+ traverseFast: true,
+ shallowEqual: true,
+ is: true,
+ isBinding: true,
+ isBlockScoped: true,
+ isImmutable: true,
+ isLet: true,
+ isNode: true,
+ isNodesEquivalent: true,
+ isPlaceholderType: true,
+ isReferenced: true,
+ isScope: true,
+ isSpecifierDefault: true,
+ isType: true,
+ isValidES3Identifier: true,
+ isValidIdentifier: true,
+ isVar: true,
+ matchesPattern: true,
+ validate: true,
+ buildMatchMemberExpression: true
+};
+Object.defineProperty(exports, "assertNode", {
+ enumerable: true,
+ get: function () {
+ return _assertNode.default;
+ }
+});
+Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
+ enumerable: true,
+ get: function () {
+ return _createTypeAnnotationBasedOnTypeof.default;
+ }
+});
+Object.defineProperty(exports, "createUnionTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _createFlowUnionType.default;
+ }
+});
+Object.defineProperty(exports, "createFlowUnionType", {
+ enumerable: true,
+ get: function () {
+ return _createFlowUnionType.default;
+ }
+});
+Object.defineProperty(exports, "createTSUnionType", {
+ enumerable: true,
+ get: function () {
+ return _createTSUnionType.default;
+ }
+});
+Object.defineProperty(exports, "cloneNode", {
+ enumerable: true,
+ get: function () {
+ return _cloneNode.default;
+ }
+});
+Object.defineProperty(exports, "clone", {
+ enumerable: true,
+ get: function () {
+ return _clone.default;
+ }
+});
+Object.defineProperty(exports, "cloneDeep", {
+ enumerable: true,
+ get: function () {
+ return _cloneDeep.default;
+ }
+});
+Object.defineProperty(exports, "cloneDeepWithoutLoc", {
+ enumerable: true,
+ get: function () {
+ return _cloneDeepWithoutLoc.default;
+ }
+});
+Object.defineProperty(exports, "cloneWithoutLoc", {
+ enumerable: true,
+ get: function () {
+ return _cloneWithoutLoc.default;
+ }
+});
+Object.defineProperty(exports, "addComment", {
+ enumerable: true,
+ get: function () {
+ return _addComment.default;
+ }
+});
+Object.defineProperty(exports, "addComments", {
+ enumerable: true,
+ get: function () {
+ return _addComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritInnerComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritInnerComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritLeadingComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritLeadingComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritsComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritsComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritTrailingComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritTrailingComments.default;
+ }
+});
+Object.defineProperty(exports, "removeComments", {
+ enumerable: true,
+ get: function () {
+ return _removeComments.default;
+ }
+});
+Object.defineProperty(exports, "ensureBlock", {
+ enumerable: true,
+ get: function () {
+ return _ensureBlock.default;
+ }
+});
+Object.defineProperty(exports, "toBindingIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _toBindingIdentifierName.default;
+ }
+});
+Object.defineProperty(exports, "toBlock", {
+ enumerable: true,
+ get: function () {
+ return _toBlock.default;
+ }
+});
+Object.defineProperty(exports, "toComputedKey", {
+ enumerable: true,
+ get: function () {
+ return _toComputedKey.default;
+ }
+});
+Object.defineProperty(exports, "toExpression", {
+ enumerable: true,
+ get: function () {
+ return _toExpression.default;
+ }
+});
+Object.defineProperty(exports, "toIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _toIdentifier.default;
+ }
+});
+Object.defineProperty(exports, "toKeyAlias", {
+ enumerable: true,
+ get: function () {
+ return _toKeyAlias.default;
+ }
+});
+Object.defineProperty(exports, "toSequenceExpression", {
+ enumerable: true,
+ get: function () {
+ return _toSequenceExpression.default;
+ }
+});
+Object.defineProperty(exports, "toStatement", {
+ enumerable: true,
+ get: function () {
+ return _toStatement.default;
+ }
+});
+Object.defineProperty(exports, "valueToNode", {
+ enumerable: true,
+ get: function () {
+ return _valueToNode.default;
+ }
+});
+Object.defineProperty(exports, "appendToMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _appendToMemberExpression.default;
+ }
+});
+Object.defineProperty(exports, "inherits", {
+ enumerable: true,
+ get: function () {
+ return _inherits.default;
+ }
+});
+Object.defineProperty(exports, "prependToMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _prependToMemberExpression.default;
+ }
+});
+Object.defineProperty(exports, "removeProperties", {
+ enumerable: true,
+ get: function () {
+ return _removeProperties.default;
+ }
+});
+Object.defineProperty(exports, "removePropertiesDeep", {
+ enumerable: true,
+ get: function () {
+ return _removePropertiesDeep.default;
+ }
+});
+Object.defineProperty(exports, "removeTypeDuplicates", {
+ enumerable: true,
+ get: function () {
+ return _removeTypeDuplicates.default;
+ }
+});
+Object.defineProperty(exports, "getBindingIdentifiers", {
+ enumerable: true,
+ get: function () {
+ return _getBindingIdentifiers.default;
+ }
+});
+Object.defineProperty(exports, "getOuterBindingIdentifiers", {
+ enumerable: true,
+ get: function () {
+ return _getOuterBindingIdentifiers.default;
+ }
+});
+Object.defineProperty(exports, "traverse", {
+ enumerable: true,
+ get: function () {
+ return _traverse.default;
+ }
+});
+Object.defineProperty(exports, "traverseFast", {
+ enumerable: true,
+ get: function () {
+ return _traverseFast.default;
+ }
+});
+Object.defineProperty(exports, "shallowEqual", {
+ enumerable: true,
+ get: function () {
+ return _shallowEqual.default;
+ }
+});
+Object.defineProperty(exports, "is", {
+ enumerable: true,
+ get: function () {
+ return _is.default;
+ }
+});
+Object.defineProperty(exports, "isBinding", {
+ enumerable: true,
+ get: function () {
+ return _isBinding.default;
+ }
+});
+Object.defineProperty(exports, "isBlockScoped", {
+ enumerable: true,
+ get: function () {
+ return _isBlockScoped.default;
+ }
+});
+Object.defineProperty(exports, "isImmutable", {
+ enumerable: true,
+ get: function () {
+ return _isImmutable.default;
+ }
+});
+Object.defineProperty(exports, "isLet", {
+ enumerable: true,
+ get: function () {
+ return _isLet.default;
+ }
+});
+Object.defineProperty(exports, "isNode", {
+ enumerable: true,
+ get: function () {
+ return _isNode.default;
+ }
+});
+Object.defineProperty(exports, "isNodesEquivalent", {
+ enumerable: true,
+ get: function () {
+ return _isNodesEquivalent.default;
+ }
+});
+Object.defineProperty(exports, "isPlaceholderType", {
+ enumerable: true,
+ get: function () {
+ return _isPlaceholderType.default;
+ }
+});
+Object.defineProperty(exports, "isReferenced", {
+ enumerable: true,
+ get: function () {
+ return _isReferenced.default;
+ }
+});
+Object.defineProperty(exports, "isScope", {
+ enumerable: true,
+ get: function () {
+ return _isScope.default;
+ }
+});
+Object.defineProperty(exports, "isSpecifierDefault", {
+ enumerable: true,
+ get: function () {
+ return _isSpecifierDefault.default;
+ }
+});
+Object.defineProperty(exports, "isType", {
+ enumerable: true,
+ get: function () {
+ return _isType.default;
+ }
+});
+Object.defineProperty(exports, "isValidES3Identifier", {
+ enumerable: true,
+ get: function () {
+ return _isValidES3Identifier.default;
+ }
+});
+Object.defineProperty(exports, "isValidIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _isValidIdentifier.default;
+ }
+});
+Object.defineProperty(exports, "isVar", {
+ enumerable: true,
+ get: function () {
+ return _isVar.default;
+ }
+});
+Object.defineProperty(exports, "matchesPattern", {
+ enumerable: true,
+ get: function () {
+ return _matchesPattern.default;
+ }
+});
+Object.defineProperty(exports, "validate", {
+ enumerable: true,
+ get: function () {
+ return _validate.default;
+ }
+});
+Object.defineProperty(exports, "buildMatchMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _buildMatchMemberExpression.default;
+ }
+});
+exports.react = void 0;
+
+var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent"));
+
+var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag"));
+
+var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren"));
+
+var _assertNode = _interopRequireDefault(require("./asserts/assertNode"));
+
+var _generated = require("./asserts/generated");
+
+Object.keys(_generated).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated[key];
+ }
+ });
+});
+
+var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof"));
+
+var _createFlowUnionType = _interopRequireDefault(require("./builders/flow/createFlowUnionType"));
+
+var _createTSUnionType = _interopRequireDefault(require("./builders/typescript/createTSUnionType"));
+
+var _generated2 = require("./builders/generated");
+
+Object.keys(_generated2).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated2[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated2[key];
+ }
+ });
+});
+
+var _cloneNode = _interopRequireDefault(require("./clone/cloneNode"));
+
+var _clone = _interopRequireDefault(require("./clone/clone"));
+
+var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep"));
+
+var _cloneDeepWithoutLoc = _interopRequireDefault(require("./clone/cloneDeepWithoutLoc"));
+
+var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc"));
+
+var _addComment = _interopRequireDefault(require("./comments/addComment"));
+
+var _addComments = _interopRequireDefault(require("./comments/addComments"));
+
+var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments"));
+
+var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments"));
+
+var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments"));
+
+var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments"));
+
+var _removeComments = _interopRequireDefault(require("./comments/removeComments"));
+
+var _generated3 = require("./constants/generated");
+
+Object.keys(_generated3).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated3[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated3[key];
+ }
+ });
+});
+
+var _constants = require("./constants");
+
+Object.keys(_constants).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _constants[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _constants[key];
+ }
+ });
+});
+
+var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock"));
+
+var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName"));
+
+var _toBlock = _interopRequireDefault(require("./converters/toBlock"));
+
+var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey"));
+
+var _toExpression = _interopRequireDefault(require("./converters/toExpression"));
+
+var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier"));
+
+var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias"));
+
+var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression"));
+
+var _toStatement = _interopRequireDefault(require("./converters/toStatement"));
+
+var _valueToNode = _interopRequireDefault(require("./converters/valueToNode"));
+
+var _definitions = require("./definitions");
+
+Object.keys(_definitions).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _definitions[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _definitions[key];
+ }
+ });
+});
+
+var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression"));
+
+var _inherits = _interopRequireDefault(require("./modifications/inherits"));
+
+var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression"));
+
+var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties"));
+
+var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep"));
+
+var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates"));
+
+var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers"));
+
+var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers"));
+
+var _traverse = _interopRequireDefault(require("./traverse/traverse"));
+
+var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast"));
+
+var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual"));
+
+var _is = _interopRequireDefault(require("./validators/is"));
+
+var _isBinding = _interopRequireDefault(require("./validators/isBinding"));
+
+var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped"));
+
+var _isImmutable = _interopRequireDefault(require("./validators/isImmutable"));
+
+var _isLet = _interopRequireDefault(require("./validators/isLet"));
+
+var _isNode = _interopRequireDefault(require("./validators/isNode"));
+
+var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent"));
+
+var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType"));
+
+var _isReferenced = _interopRequireDefault(require("./validators/isReferenced"));
+
+var _isScope = _interopRequireDefault(require("./validators/isScope"));
+
+var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault"));
+
+var _isType = _interopRequireDefault(require("./validators/isType"));
+
+var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier"));
+
+var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier"));
+
+var _isVar = _interopRequireDefault(require("./validators/isVar"));
+
+var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern"));
+
+var _validate = _interopRequireDefault(require("./validators/validate"));
+
+var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression"));
+
+var _generated4 = require("./validators/generated");
+
+Object.keys(_generated4).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated4[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated4[key];
+ }
+ });
+});
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const react = {
+ isReactComponent: _isReactComponent.default,
+ isCompatTag: _isCompatTag.default,
+ buildChildren: _buildChildren.default
+};
+exports.react = react; \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow
new file mode 100644
index 00000000000..aaebaa6ef52
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/index.js.flow
@@ -0,0 +1,2475 @@
+// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/flow.js for script used.
+
+declare class BabelNodeComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: BabelNodeSourceLocation;
+}
+
+declare class BabelNodeCommentBlock extends BabelNodeComment {
+ type: "CommentBlock";
+}
+
+declare class BabelNodeCommentLine extends BabelNodeComment {
+ type: "CommentLine";
+}
+
+declare class BabelNodeSourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+declare class BabelNode {
+ leadingComments?: Array<BabelNodeComment>;
+ innerComments?: Array<BabelNodeComment>;
+ trailingComments?: Array<BabelNodeComment>;
+ start: ?number;
+ end: ?number;
+ loc: ?BabelNodeSourceLocation;
+ extra?: { [string]: mixed };
+}
+
+declare class BabelNodeArrayExpression extends BabelNode {
+ type: "ArrayExpression";
+ elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeAssignmentExpression extends BabelNode {
+ type: "AssignmentExpression";
+ operator: string;
+ left: BabelNodeLVal;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeBinaryExpression extends BabelNode {
+ type: "BinaryExpression";
+ operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
+ left: BabelNodeExpression | BabelNodePrivateName;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeInterpreterDirective extends BabelNode {
+ type: "InterpreterDirective";
+ value: string;
+}
+
+declare class BabelNodeDirective extends BabelNode {
+ type: "Directive";
+ value: BabelNodeDirectiveLiteral;
+}
+
+declare class BabelNodeDirectiveLiteral extends BabelNode {
+ type: "DirectiveLiteral";
+ value: string;
+}
+
+declare class BabelNodeBlockStatement extends BabelNode {
+ type: "BlockStatement";
+ body: Array<BabelNodeStatement>;
+ directives?: Array<BabelNodeDirective>;
+}
+
+declare class BabelNodeBreakStatement extends BabelNode {
+ type: "BreakStatement";
+ label?: BabelNodeIdentifier;
+}
+
+declare class BabelNodeCallExpression extends BabelNode {
+ type: "CallExpression";
+ callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
+ optional?: true | false;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeCatchClause extends BabelNode {
+ type: "CatchClause";
+ param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern;
+ body: BabelNodeBlockStatement;
+}
+
+declare class BabelNodeConditionalExpression extends BabelNode {
+ type: "ConditionalExpression";
+ test: BabelNodeExpression;
+ consequent: BabelNodeExpression;
+ alternate: BabelNodeExpression;
+}
+
+declare class BabelNodeContinueStatement extends BabelNode {
+ type: "ContinueStatement";
+ label?: BabelNodeIdentifier;
+}
+
+declare class BabelNodeDebuggerStatement extends BabelNode {
+ type: "DebuggerStatement";
+}
+
+declare class BabelNodeDoWhileStatement extends BabelNode {
+ type: "DoWhileStatement";
+ test: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeEmptyStatement extends BabelNode {
+ type: "EmptyStatement";
+}
+
+declare class BabelNodeExpressionStatement extends BabelNode {
+ type: "ExpressionStatement";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeFile extends BabelNode {
+ type: "File";
+ program: BabelNodeProgram;
+ comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>;
+ tokens?: Array<any>;
+}
+
+declare class BabelNodeForInStatement extends BabelNode {
+ type: "ForInStatement";
+ left: BabelNodeVariableDeclaration | BabelNodeLVal;
+ right: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeForStatement extends BabelNode {
+ type: "ForStatement";
+ init?: BabelNodeVariableDeclaration | BabelNodeExpression;
+ test?: BabelNodeExpression;
+ update?: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeFunctionDeclaration extends BabelNode {
+ type: "FunctionDeclaration";
+ id?: BabelNodeIdentifier;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ declare?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeFunctionExpression extends BabelNode {
+ type: "FunctionExpression";
+ id?: BabelNodeIdentifier;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeIdentifier extends BabelNode {
+ type: "Identifier";
+ name: string;
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeIfStatement extends BabelNode {
+ type: "IfStatement";
+ test: BabelNodeExpression;
+ consequent: BabelNodeStatement;
+ alternate?: BabelNodeStatement;
+}
+
+declare class BabelNodeLabeledStatement extends BabelNode {
+ type: "LabeledStatement";
+ label: BabelNodeIdentifier;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeStringLiteral extends BabelNode {
+ type: "StringLiteral";
+ value: string;
+}
+
+declare class BabelNodeNumericLiteral extends BabelNode {
+ type: "NumericLiteral";
+ value: number;
+}
+
+declare class BabelNodeNullLiteral extends BabelNode {
+ type: "NullLiteral";
+}
+
+declare class BabelNodeBooleanLiteral extends BabelNode {
+ type: "BooleanLiteral";
+ value: boolean;
+}
+
+declare class BabelNodeRegExpLiteral extends BabelNode {
+ type: "RegExpLiteral";
+ pattern: string;
+ flags?: string;
+}
+
+declare class BabelNodeLogicalExpression extends BabelNode {
+ type: "LogicalExpression";
+ operator: "||" | "&&" | "??";
+ left: BabelNodeExpression;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeMemberExpression extends BabelNode {
+ type: "MemberExpression";
+ object: BabelNodeExpression;
+ property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName;
+ computed?: boolean;
+ optional?: true | false;
+}
+
+declare class BabelNodeNewExpression extends BabelNode {
+ type: "NewExpression";
+ callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
+ optional?: true | false;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeProgram extends BabelNode {
+ type: "Program";
+ body: Array<BabelNodeStatement>;
+ directives?: Array<BabelNodeDirective>;
+ sourceType?: "script" | "module";
+ interpreter?: BabelNodeInterpreterDirective;
+ sourceFile: string;
+}
+
+declare class BabelNodeObjectExpression extends BabelNode {
+ type: "ObjectExpression";
+ properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeObjectMethod extends BabelNode {
+ type: "ObjectMethod";
+ kind?: "method" | "get" | "set";
+ key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ computed?: boolean;
+ generator?: boolean;
+ async?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeObjectProperty extends BabelNode {
+ type: "ObjectProperty";
+ key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral;
+ value: BabelNodeExpression | BabelNodePatternLike;
+ computed?: boolean;
+ shorthand?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+}
+
+declare class BabelNodeRestElement extends BabelNode {
+ type: "RestElement";
+ argument: BabelNodeLVal;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeReturnStatement extends BabelNode {
+ type: "ReturnStatement";
+ argument?: BabelNodeExpression;
+}
+
+declare class BabelNodeSequenceExpression extends BabelNode {
+ type: "SequenceExpression";
+ expressions: Array<BabelNodeExpression>;
+}
+
+declare class BabelNodeParenthesizedExpression extends BabelNode {
+ type: "ParenthesizedExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeSwitchCase extends BabelNode {
+ type: "SwitchCase";
+ test?: BabelNodeExpression;
+ consequent: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeSwitchStatement extends BabelNode {
+ type: "SwitchStatement";
+ discriminant: BabelNodeExpression;
+ cases: Array<BabelNodeSwitchCase>;
+}
+
+declare class BabelNodeThisExpression extends BabelNode {
+ type: "ThisExpression";
+}
+
+declare class BabelNodeThrowStatement extends BabelNode {
+ type: "ThrowStatement";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeTryStatement extends BabelNode {
+ type: "TryStatement";
+ block: BabelNodeBlockStatement;
+ handler?: BabelNodeCatchClause;
+ finalizer?: BabelNodeBlockStatement;
+}
+
+declare class BabelNodeUnaryExpression extends BabelNode {
+ type: "UnaryExpression";
+ operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
+ argument: BabelNodeExpression;
+ prefix?: boolean;
+}
+
+declare class BabelNodeUpdateExpression extends BabelNode {
+ type: "UpdateExpression";
+ operator: "++" | "--";
+ argument: BabelNodeExpression;
+ prefix?: boolean;
+}
+
+declare class BabelNodeVariableDeclaration extends BabelNode {
+ type: "VariableDeclaration";
+ kind: "var" | "let" | "const";
+ declarations: Array<BabelNodeVariableDeclarator>;
+ declare?: boolean;
+}
+
+declare class BabelNodeVariableDeclarator extends BabelNode {
+ type: "VariableDeclarator";
+ id: BabelNodeLVal;
+ init?: BabelNodeExpression;
+ definite?: boolean;
+}
+
+declare class BabelNodeWhileStatement extends BabelNode {
+ type: "WhileStatement";
+ test: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeWithStatement extends BabelNode {
+ type: "WithStatement";
+ object: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeAssignmentPattern extends BabelNode {
+ type: "AssignmentPattern";
+ left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression;
+ right: BabelNodeExpression;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeArrayPattern extends BabelNode {
+ type: "ArrayPattern";
+ elements: Array<null | BabelNodePatternLike>;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeArrowFunctionExpression extends BabelNode {
+ type: "ArrowFunctionExpression";
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement | BabelNodeExpression;
+ async?: boolean;
+ expression: boolean;
+ generator?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeClassBody extends BabelNode {
+ type: "ClassBody";
+ body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>;
+}
+
+declare class BabelNodeClassExpression extends BabelNode {
+ type: "ClassExpression";
+ id?: BabelNodeIdentifier;
+ superClass?: BabelNodeExpression;
+ body: BabelNodeClassBody;
+ decorators?: Array<BabelNodeDecorator>;
+ mixins?: BabelNodeInterfaceExtends;
+ superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeClassDeclaration extends BabelNode {
+ type: "ClassDeclaration";
+ id: BabelNodeIdentifier;
+ superClass?: BabelNodeExpression;
+ body: BabelNodeClassBody;
+ decorators?: Array<BabelNodeDecorator>;
+ abstract?: boolean;
+ declare?: boolean;
+ mixins?: BabelNodeInterfaceExtends;
+ superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeExportAllDeclaration extends BabelNode {
+ type: "ExportAllDeclaration";
+ source: BabelNodeStringLiteral;
+ assertions?: BabelNodeImportAttribute;
+}
+
+declare class BabelNodeExportDefaultDeclaration extends BabelNode {
+ type: "ExportDefaultDeclaration";
+ declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression;
+}
+
+declare class BabelNodeExportNamedDeclaration extends BabelNode {
+ type: "ExportNamedDeclaration";
+ declaration?: BabelNodeDeclaration;
+ specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>;
+ source?: BabelNodeStringLiteral;
+ assertions?: BabelNodeImportAttribute;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeExportSpecifier extends BabelNode {
+ type: "ExportSpecifier";
+ local: BabelNodeIdentifier;
+ exported: BabelNodeIdentifier | BabelNodeStringLiteral;
+}
+
+declare class BabelNodeForOfStatement extends BabelNode {
+ type: "ForOfStatement";
+ left: BabelNodeVariableDeclaration | BabelNodeLVal;
+ right: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeImportDeclaration extends BabelNode {
+ type: "ImportDeclaration";
+ specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>;
+ source: BabelNodeStringLiteral;
+ assertions?: BabelNodeImportAttribute;
+ importKind?: "type" | "typeof" | "value";
+}
+
+declare class BabelNodeImportDefaultSpecifier extends BabelNode {
+ type: "ImportDefaultSpecifier";
+ local: BabelNodeIdentifier;
+}
+
+declare class BabelNodeImportNamespaceSpecifier extends BabelNode {
+ type: "ImportNamespaceSpecifier";
+ local: BabelNodeIdentifier;
+}
+
+declare class BabelNodeImportSpecifier extends BabelNode {
+ type: "ImportSpecifier";
+ local: BabelNodeIdentifier;
+ imported: BabelNodeIdentifier | BabelNodeStringLiteral;
+ importKind?: "type" | "typeof";
+}
+
+declare class BabelNodeMetaProperty extends BabelNode {
+ type: "MetaProperty";
+ meta: BabelNodeIdentifier;
+ property: BabelNodeIdentifier;
+}
+
+declare class BabelNodeClassMethod extends BabelNode {
+ type: "ClassMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ computed?: boolean;
+ generator?: boolean;
+ async?: boolean;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeObjectPattern extends BabelNode {
+ type: "ObjectPattern";
+ properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeSpreadElement extends BabelNode {
+ type: "SpreadElement";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeSuper extends BabelNode {
+ type: "Super";
+}
+
+declare class BabelNodeTaggedTemplateExpression extends BabelNode {
+ type: "TaggedTemplateExpression";
+ tag: BabelNodeExpression;
+ quasi: BabelNodeTemplateLiteral;
+ typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTemplateElement extends BabelNode {
+ type: "TemplateElement";
+ value: { raw: string, cooked?: string };
+ tail?: boolean;
+}
+
+declare class BabelNodeTemplateLiteral extends BabelNode {
+ type: "TemplateLiteral";
+ quasis: Array<BabelNodeTemplateElement>;
+ expressions: Array<BabelNodeExpression | BabelNodeTSType>;
+}
+
+declare class BabelNodeYieldExpression extends BabelNode {
+ type: "YieldExpression";
+ argument?: BabelNodeExpression;
+ delegate?: boolean;
+}
+
+declare class BabelNodeAwaitExpression extends BabelNode {
+ type: "AwaitExpression";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeImport extends BabelNode {
+ type: "Import";
+}
+
+declare class BabelNodeBigIntLiteral extends BabelNode {
+ type: "BigIntLiteral";
+ value: string;
+}
+
+declare class BabelNodeExportNamespaceSpecifier extends BabelNode {
+ type: "ExportNamespaceSpecifier";
+ exported: BabelNodeIdentifier;
+}
+
+declare class BabelNodeOptionalMemberExpression extends BabelNode {
+ type: "OptionalMemberExpression";
+ object: BabelNodeExpression;
+ property: BabelNodeExpression | BabelNodeIdentifier;
+ computed?: boolean;
+ optional: boolean;
+}
+
+declare class BabelNodeOptionalCallExpression extends BabelNode {
+ type: "OptionalCallExpression";
+ callee: BabelNodeExpression;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>;
+ optional: boolean;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeAnyTypeAnnotation extends BabelNode {
+ type: "AnyTypeAnnotation";
+}
+
+declare class BabelNodeArrayTypeAnnotation extends BabelNode {
+ type: "ArrayTypeAnnotation";
+ elementType: BabelNodeFlowType;
+}
+
+declare class BabelNodeBooleanTypeAnnotation extends BabelNode {
+ type: "BooleanTypeAnnotation";
+}
+
+declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode {
+ type: "BooleanLiteralTypeAnnotation";
+ value: boolean;
+}
+
+declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode {
+ type: "NullLiteralTypeAnnotation";
+}
+
+declare class BabelNodeClassImplements extends BabelNode {
+ type: "ClassImplements";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeDeclareClass extends BabelNode {
+ type: "DeclareClass";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeDeclareFunction extends BabelNode {
+ type: "DeclareFunction";
+ id: BabelNodeIdentifier;
+ predicate?: BabelNodeDeclaredPredicate;
+}
+
+declare class BabelNodeDeclareInterface extends BabelNode {
+ type: "DeclareInterface";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeDeclareModule extends BabelNode {
+ type: "DeclareModule";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ body: BabelNodeBlockStatement;
+ kind?: "CommonJS" | "ES";
+}
+
+declare class BabelNodeDeclareModuleExports extends BabelNode {
+ type: "DeclareModuleExports";
+ typeAnnotation: BabelNodeTypeAnnotation;
+}
+
+declare class BabelNodeDeclareTypeAlias extends BabelNode {
+ type: "DeclareTypeAlias";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ right: BabelNodeFlowType;
+}
+
+declare class BabelNodeDeclareOpaqueType extends BabelNode {
+ type: "DeclareOpaqueType";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ supertype?: BabelNodeFlowType;
+}
+
+declare class BabelNodeDeclareVariable extends BabelNode {
+ type: "DeclareVariable";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeDeclareExportDeclaration extends BabelNode {
+ type: "DeclareExportDeclaration";
+ declaration?: BabelNodeFlow;
+ specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>;
+ source?: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeDeclareExportAllDeclaration extends BabelNode {
+ type: "DeclareExportAllDeclaration";
+ source: BabelNodeStringLiteral;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeDeclaredPredicate extends BabelNode {
+ type: "DeclaredPredicate";
+ value: BabelNodeFlow;
+}
+
+declare class BabelNodeExistsTypeAnnotation extends BabelNode {
+ type: "ExistsTypeAnnotation";
+}
+
+declare class BabelNodeFunctionTypeAnnotation extends BabelNode {
+ type: "FunctionTypeAnnotation";
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ params: Array<BabelNodeFunctionTypeParam>;
+ rest?: BabelNodeFunctionTypeParam;
+ returnType: BabelNodeFlowType;
+}
+
+declare class BabelNodeFunctionTypeParam extends BabelNode {
+ type: "FunctionTypeParam";
+ name?: BabelNodeIdentifier;
+ typeAnnotation: BabelNodeFlowType;
+ optional?: boolean;
+}
+
+declare class BabelNodeGenericTypeAnnotation extends BabelNode {
+ type: "GenericTypeAnnotation";
+ id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeInferredPredicate extends BabelNode {
+ type: "InferredPredicate";
+}
+
+declare class BabelNodeInterfaceExtends extends BabelNode {
+ type: "InterfaceExtends";
+ id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeInterfaceDeclaration extends BabelNode {
+ type: "InterfaceDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeInterfaceTypeAnnotation extends BabelNode {
+ type: "InterfaceTypeAnnotation";
+ body: BabelNodeObjectTypeAnnotation;
+}
+
+declare class BabelNodeIntersectionTypeAnnotation extends BabelNode {
+ type: "IntersectionTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeMixedTypeAnnotation extends BabelNode {
+ type: "MixedTypeAnnotation";
+}
+
+declare class BabelNodeEmptyTypeAnnotation extends BabelNode {
+ type: "EmptyTypeAnnotation";
+}
+
+declare class BabelNodeNullableTypeAnnotation extends BabelNode {
+ type: "NullableTypeAnnotation";
+ typeAnnotation: BabelNodeFlowType;
+}
+
+declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode {
+ type: "NumberLiteralTypeAnnotation";
+ value: number;
+}
+
+declare class BabelNodeNumberTypeAnnotation extends BabelNode {
+ type: "NumberTypeAnnotation";
+}
+
+declare class BabelNodeObjectTypeAnnotation extends BabelNode {
+ type: "ObjectTypeAnnotation";
+ properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>;
+ indexers?: Array<BabelNodeObjectTypeIndexer>;
+ callProperties?: Array<BabelNodeObjectTypeCallProperty>;
+ internalSlots?: Array<BabelNodeObjectTypeInternalSlot>;
+ exact?: boolean;
+ inexact?: boolean;
+}
+
+declare class BabelNodeObjectTypeInternalSlot extends BabelNode {
+ type: "ObjectTypeInternalSlot";
+ id: BabelNodeIdentifier;
+ value: BabelNodeFlowType;
+ optional: boolean;
+ method: boolean;
+}
+
+declare class BabelNodeObjectTypeCallProperty extends BabelNode {
+ type: "ObjectTypeCallProperty";
+ value: BabelNodeFlowType;
+}
+
+declare class BabelNodeObjectTypeIndexer extends BabelNode {
+ type: "ObjectTypeIndexer";
+ id?: BabelNodeIdentifier;
+ key: BabelNodeFlowType;
+ value: BabelNodeFlowType;
+ variance?: BabelNodeVariance;
+}
+
+declare class BabelNodeObjectTypeProperty extends BabelNode {
+ type: "ObjectTypeProperty";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral;
+ value: BabelNodeFlowType;
+ variance?: BabelNodeVariance;
+ kind: "init" | "get" | "set";
+ optional: boolean;
+ proto: boolean;
+}
+
+declare class BabelNodeObjectTypeSpreadProperty extends BabelNode {
+ type: "ObjectTypeSpreadProperty";
+ argument: BabelNodeFlowType;
+}
+
+declare class BabelNodeOpaqueType extends BabelNode {
+ type: "OpaqueType";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ supertype?: BabelNodeFlowType;
+ impltype: BabelNodeFlowType;
+}
+
+declare class BabelNodeQualifiedTypeIdentifier extends BabelNode {
+ type: "QualifiedTypeIdentifier";
+ id: BabelNodeIdentifier;
+ qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+}
+
+declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode {
+ type: "StringLiteralTypeAnnotation";
+ value: string;
+}
+
+declare class BabelNodeStringTypeAnnotation extends BabelNode {
+ type: "StringTypeAnnotation";
+}
+
+declare class BabelNodeSymbolTypeAnnotation extends BabelNode {
+ type: "SymbolTypeAnnotation";
+}
+
+declare class BabelNodeThisTypeAnnotation extends BabelNode {
+ type: "ThisTypeAnnotation";
+}
+
+declare class BabelNodeTupleTypeAnnotation extends BabelNode {
+ type: "TupleTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeTypeofTypeAnnotation extends BabelNode {
+ type: "TypeofTypeAnnotation";
+ argument: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeAlias extends BabelNode {
+ type: "TypeAlias";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ right: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeAnnotation extends BabelNode {
+ type: "TypeAnnotation";
+ typeAnnotation: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeCastExpression extends BabelNode {
+ type: "TypeCastExpression";
+ expression: BabelNodeExpression;
+ typeAnnotation: BabelNodeTypeAnnotation;
+}
+
+declare class BabelNodeTypeParameter extends BabelNode {
+ type: "TypeParameter";
+ bound?: BabelNodeTypeAnnotation;
+ variance?: BabelNodeVariance;
+ name: string;
+}
+
+declare class BabelNodeTypeParameterDeclaration extends BabelNode {
+ type: "TypeParameterDeclaration";
+ params: Array<BabelNodeTypeParameter>;
+}
+
+declare class BabelNodeTypeParameterInstantiation extends BabelNode {
+ type: "TypeParameterInstantiation";
+ params: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeUnionTypeAnnotation extends BabelNode {
+ type: "UnionTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeVariance extends BabelNode {
+ type: "Variance";
+ kind: "minus" | "plus";
+}
+
+declare class BabelNodeVoidTypeAnnotation extends BabelNode {
+ type: "VoidTypeAnnotation";
+}
+
+declare class BabelNodeEnumDeclaration extends BabelNode {
+ type: "EnumDeclaration";
+ id: BabelNodeIdentifier;
+ body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;
+}
+
+declare class BabelNodeEnumBooleanBody extends BabelNode {
+ type: "EnumBooleanBody";
+ members: Array<BabelNodeEnumBooleanMember>;
+ explicit: boolean;
+}
+
+declare class BabelNodeEnumNumberBody extends BabelNode {
+ type: "EnumNumberBody";
+ members: Array<BabelNodeEnumNumberMember>;
+ explicit: boolean;
+}
+
+declare class BabelNodeEnumStringBody extends BabelNode {
+ type: "EnumStringBody";
+ members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>;
+ explicit: boolean;
+}
+
+declare class BabelNodeEnumSymbolBody extends BabelNode {
+ type: "EnumSymbolBody";
+ members: Array<BabelNodeEnumDefaultedMember>;
+}
+
+declare class BabelNodeEnumBooleanMember extends BabelNode {
+ type: "EnumBooleanMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeBooleanLiteral;
+}
+
+declare class BabelNodeEnumNumberMember extends BabelNode {
+ type: "EnumNumberMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeNumericLiteral;
+}
+
+declare class BabelNodeEnumStringMember extends BabelNode {
+ type: "EnumStringMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeEnumDefaultedMember extends BabelNode {
+ type: "EnumDefaultedMember";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeJSXAttribute extends BabelNode {
+ type: "JSXAttribute";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName;
+ value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer;
+}
+
+declare class BabelNodeJSXClosingElement extends BabelNode {
+ type: "JSXClosingElement";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;
+}
+
+declare class BabelNodeJSXElement extends BabelNode {
+ type: "JSXElement";
+ openingElement: BabelNodeJSXOpeningElement;
+ closingElement?: BabelNodeJSXClosingElement;
+ children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
+ selfClosing?: boolean;
+}
+
+declare class BabelNodeJSXEmptyExpression extends BabelNode {
+ type: "JSXEmptyExpression";
+}
+
+declare class BabelNodeJSXExpressionContainer extends BabelNode {
+ type: "JSXExpressionContainer";
+ expression: BabelNodeExpression | BabelNodeJSXEmptyExpression;
+}
+
+declare class BabelNodeJSXSpreadChild extends BabelNode {
+ type: "JSXSpreadChild";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeJSXIdentifier extends BabelNode {
+ type: "JSXIdentifier";
+ name: string;
+}
+
+declare class BabelNodeJSXMemberExpression extends BabelNode {
+ type: "JSXMemberExpression";
+ object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier;
+ property: BabelNodeJSXIdentifier;
+}
+
+declare class BabelNodeJSXNamespacedName extends BabelNode {
+ type: "JSXNamespacedName";
+ namespace: BabelNodeJSXIdentifier;
+ name: BabelNodeJSXIdentifier;
+}
+
+declare class BabelNodeJSXOpeningElement extends BabelNode {
+ type: "JSXOpeningElement";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;
+ attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>;
+ selfClosing?: boolean;
+ typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeJSXSpreadAttribute extends BabelNode {
+ type: "JSXSpreadAttribute";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeJSXText extends BabelNode {
+ type: "JSXText";
+ value: string;
+}
+
+declare class BabelNodeJSXFragment extends BabelNode {
+ type: "JSXFragment";
+ openingFragment: BabelNodeJSXOpeningFragment;
+ closingFragment: BabelNodeJSXClosingFragment;
+ children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
+}
+
+declare class BabelNodeJSXOpeningFragment extends BabelNode {
+ type: "JSXOpeningFragment";
+}
+
+declare class BabelNodeJSXClosingFragment extends BabelNode {
+ type: "JSXClosingFragment";
+}
+
+declare class BabelNodeNoop extends BabelNode {
+ type: "Noop";
+}
+
+declare class BabelNodePlaceholder extends BabelNode {
+ type: "Placeholder";
+ expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
+ name: BabelNodeIdentifier;
+}
+
+declare class BabelNodeV8IntrinsicIdentifier extends BabelNode {
+ type: "V8IntrinsicIdentifier";
+ name: string;
+}
+
+declare class BabelNodeArgumentPlaceholder extends BabelNode {
+ type: "ArgumentPlaceholder";
+}
+
+declare class BabelNodeBindExpression extends BabelNode {
+ type: "BindExpression";
+ object: BabelNodeExpression;
+ callee: BabelNodeExpression;
+}
+
+declare class BabelNodeClassProperty extends BabelNode {
+ type: "ClassProperty";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ value?: BabelNodeExpression;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ decorators?: Array<BabelNodeDecorator>;
+ computed?: boolean;
+ abstract?: boolean;
+ accessibility?: "public" | "private" | "protected";
+ declare?: boolean;
+ definite?: boolean;
+ optional?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodePipelineTopicExpression extends BabelNode {
+ type: "PipelineTopicExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodePipelineBareFunction extends BabelNode {
+ type: "PipelineBareFunction";
+ callee: BabelNodeExpression;
+}
+
+declare class BabelNodePipelinePrimaryTopicReference extends BabelNode {
+ type: "PipelinePrimaryTopicReference";
+}
+
+declare class BabelNodeClassPrivateProperty extends BabelNode {
+ type: "ClassPrivateProperty";
+ key: BabelNodePrivateName;
+ value?: BabelNodeExpression;
+ decorators?: Array<BabelNodeDecorator>;
+}
+
+declare class BabelNodeClassPrivateMethod extends BabelNode {
+ type: "ClassPrivateMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: BabelNodePrivateName;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ async?: boolean;
+ computed?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+ generator?: boolean;
+ optional?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeImportAttribute extends BabelNode {
+ type: "ImportAttribute";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral;
+ value: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeDecorator extends BabelNode {
+ type: "Decorator";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeDoExpression extends BabelNode {
+ type: "DoExpression";
+ body: BabelNodeBlockStatement;
+}
+
+declare class BabelNodeExportDefaultSpecifier extends BabelNode {
+ type: "ExportDefaultSpecifier";
+ exported: BabelNodeIdentifier;
+}
+
+declare class BabelNodePrivateName extends BabelNode {
+ type: "PrivateName";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeRecordExpression extends BabelNode {
+ type: "RecordExpression";
+ properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeTupleExpression extends BabelNode {
+ type: "TupleExpression";
+ elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeDecimalLiteral extends BabelNode {
+ type: "DecimalLiteral";
+ value: string;
+}
+
+declare class BabelNodeStaticBlock extends BabelNode {
+ type: "StaticBlock";
+ body: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeTSParameterProperty extends BabelNode {
+ type: "TSParameterProperty";
+ parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern;
+ accessibility?: "public" | "private" | "protected";
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSDeclareFunction extends BabelNode {
+ type: "TSDeclareFunction";
+ id?: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ async?: boolean;
+ declare?: boolean;
+ generator?: boolean;
+}
+
+declare class BabelNodeTSDeclareMethod extends BabelNode {
+ type: "TSDeclareMethod";
+ decorators?: Array<BabelNodeDecorator>;
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ async?: boolean;
+ computed?: boolean;
+ generator?: boolean;
+ kind?: "get" | "set" | "method" | "constructor";
+ optional?: boolean;
+}
+
+declare class BabelNodeTSQualifiedName extends BabelNode {
+ type: "TSQualifiedName";
+ left: BabelNodeTSEntityName;
+ right: BabelNodeIdentifier;
+}
+
+declare class BabelNodeTSCallSignatureDeclaration extends BabelNode {
+ type: "TSCallSignatureDeclaration";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode {
+ type: "TSConstructSignatureDeclaration";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSPropertySignature extends BabelNode {
+ type: "TSPropertySignature";
+ key: BabelNodeExpression;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ initializer?: BabelNodeExpression;
+ computed?: boolean;
+ optional?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSMethodSignature extends BabelNode {
+ type: "TSMethodSignature";
+ key: BabelNodeExpression;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ computed?: boolean;
+ optional?: boolean;
+}
+
+declare class BabelNodeTSIndexSignature extends BabelNode {
+ type: "TSIndexSignature";
+ parameters: Array<BabelNodeIdentifier>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSAnyKeyword extends BabelNode {
+ type: "TSAnyKeyword";
+}
+
+declare class BabelNodeTSBooleanKeyword extends BabelNode {
+ type: "TSBooleanKeyword";
+}
+
+declare class BabelNodeTSBigIntKeyword extends BabelNode {
+ type: "TSBigIntKeyword";
+}
+
+declare class BabelNodeTSIntrinsicKeyword extends BabelNode {
+ type: "TSIntrinsicKeyword";
+}
+
+declare class BabelNodeTSNeverKeyword extends BabelNode {
+ type: "TSNeverKeyword";
+}
+
+declare class BabelNodeTSNullKeyword extends BabelNode {
+ type: "TSNullKeyword";
+}
+
+declare class BabelNodeTSNumberKeyword extends BabelNode {
+ type: "TSNumberKeyword";
+}
+
+declare class BabelNodeTSObjectKeyword extends BabelNode {
+ type: "TSObjectKeyword";
+}
+
+declare class BabelNodeTSStringKeyword extends BabelNode {
+ type: "TSStringKeyword";
+}
+
+declare class BabelNodeTSSymbolKeyword extends BabelNode {
+ type: "TSSymbolKeyword";
+}
+
+declare class BabelNodeTSUndefinedKeyword extends BabelNode {
+ type: "TSUndefinedKeyword";
+}
+
+declare class BabelNodeTSUnknownKeyword extends BabelNode {
+ type: "TSUnknownKeyword";
+}
+
+declare class BabelNodeTSVoidKeyword extends BabelNode {
+ type: "TSVoidKeyword";
+}
+
+declare class BabelNodeTSThisType extends BabelNode {
+ type: "TSThisType";
+}
+
+declare class BabelNodeTSFunctionType extends BabelNode {
+ type: "TSFunctionType";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSConstructorType extends BabelNode {
+ type: "TSConstructorType";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSTypeReference extends BabelNode {
+ type: "TSTypeReference";
+ typeName: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSTypePredicate extends BabelNode {
+ type: "TSTypePredicate";
+ parameterName: BabelNodeIdentifier | BabelNodeTSThisType;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ asserts?: boolean;
+}
+
+declare class BabelNodeTSTypeQuery extends BabelNode {
+ type: "TSTypeQuery";
+ exprName: BabelNodeTSEntityName | BabelNodeTSImportType;
+}
+
+declare class BabelNodeTSTypeLiteral extends BabelNode {
+ type: "TSTypeLiteral";
+ members: Array<BabelNodeTSTypeElement>;
+}
+
+declare class BabelNodeTSArrayType extends BabelNode {
+ type: "TSArrayType";
+ elementType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTupleType extends BabelNode {
+ type: "TSTupleType";
+ elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>;
+}
+
+declare class BabelNodeTSOptionalType extends BabelNode {
+ type: "TSOptionalType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSRestType extends BabelNode {
+ type: "TSRestType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSNamedTupleMember extends BabelNode {
+ type: "TSNamedTupleMember";
+ label: BabelNodeIdentifier;
+ elementType: BabelNodeTSType;
+ optional?: boolean;
+}
+
+declare class BabelNodeTSUnionType extends BabelNode {
+ type: "TSUnionType";
+ types: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSIntersectionType extends BabelNode {
+ type: "TSIntersectionType";
+ types: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSConditionalType extends BabelNode {
+ type: "TSConditionalType";
+ checkType: BabelNodeTSType;
+ extendsType: BabelNodeTSType;
+ trueType: BabelNodeTSType;
+ falseType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSInferType extends BabelNode {
+ type: "TSInferType";
+ typeParameter: BabelNodeTSTypeParameter;
+}
+
+declare class BabelNodeTSParenthesizedType extends BabelNode {
+ type: "TSParenthesizedType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeOperator extends BabelNode {
+ type: "TSTypeOperator";
+ typeAnnotation: BabelNodeTSType;
+ operator: string;
+}
+
+declare class BabelNodeTSIndexedAccessType extends BabelNode {
+ type: "TSIndexedAccessType";
+ objectType: BabelNodeTSType;
+ indexType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSMappedType extends BabelNode {
+ type: "TSMappedType";
+ typeParameter: BabelNodeTSTypeParameter;
+ typeAnnotation?: BabelNodeTSType;
+ nameType?: BabelNodeTSType;
+ optional?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSLiteralType extends BabelNode {
+ type: "TSLiteralType";
+ literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral;
+}
+
+declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode {
+ type: "TSExpressionWithTypeArguments";
+ expression: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSInterfaceDeclaration extends BabelNode {
+ type: "TSInterfaceDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ body: BabelNodeTSInterfaceBody;
+ declare?: boolean;
+}
+
+declare class BabelNodeTSInterfaceBody extends BabelNode {
+ type: "TSInterfaceBody";
+ body: Array<BabelNodeTSTypeElement>;
+}
+
+declare class BabelNodeTSTypeAliasDeclaration extends BabelNode {
+ type: "TSTypeAliasDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ typeAnnotation: BabelNodeTSType;
+ declare?: boolean;
+}
+
+declare class BabelNodeTSAsExpression extends BabelNode {
+ type: "TSAsExpression";
+ expression: BabelNodeExpression;
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeAssertion extends BabelNode {
+ type: "TSTypeAssertion";
+ typeAnnotation: BabelNodeTSType;
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSEnumDeclaration extends BabelNode {
+ type: "TSEnumDeclaration";
+ id: BabelNodeIdentifier;
+ members: Array<BabelNodeTSEnumMember>;
+ declare?: boolean;
+ initializer?: BabelNodeExpression;
+}
+
+declare class BabelNodeTSEnumMember extends BabelNode {
+ type: "TSEnumMember";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ initializer?: BabelNodeExpression;
+}
+
+declare class BabelNodeTSModuleDeclaration extends BabelNode {
+ type: "TSModuleDeclaration";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration;
+ declare?: boolean;
+ global?: boolean;
+}
+
+declare class BabelNodeTSModuleBlock extends BabelNode {
+ type: "TSModuleBlock";
+ body: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeTSImportType extends BabelNode {
+ type: "TSImportType";
+ argument: BabelNodeStringLiteral;
+ qualifier?: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSImportEqualsDeclaration extends BabelNode {
+ type: "TSImportEqualsDeclaration";
+ id: BabelNodeIdentifier;
+ moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference;
+ isExport: boolean;
+}
+
+declare class BabelNodeTSExternalModuleReference extends BabelNode {
+ type: "TSExternalModuleReference";
+ expression: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeTSNonNullExpression extends BabelNode {
+ type: "TSNonNullExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSExportAssignment extends BabelNode {
+ type: "TSExportAssignment";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode {
+ type: "TSNamespaceExportDeclaration";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeTSTypeAnnotation extends BabelNode {
+ type: "TSTypeAnnotation";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeParameterInstantiation extends BabelNode {
+ type: "TSTypeParameterInstantiation";
+ params: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSTypeParameterDeclaration extends BabelNode {
+ type: "TSTypeParameterDeclaration";
+ params: Array<BabelNodeTSTypeParameter>;
+}
+
+declare class BabelNodeTSTypeParameter extends BabelNode {
+ type: "TSTypeParameter";
+ constraint?: BabelNodeTSType;
+ name: string;
+}
+
+type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeAwaitExpression | BabelNodeImport | BabelNodeBigIntLiteral | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeBindExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeDoExpression | BabelNodeRecordExpression | BabelNodeTupleExpression | BabelNodeDecimalLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression;
+type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression;
+type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock;
+type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock;
+type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock;
+type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration;
+type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression;
+type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement;
+type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement;
+type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement;
+type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement;
+type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression;
+type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement;
+type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement;
+type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeArrowFunctionExpression | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral;
+type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration;
+type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
+type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty;
+type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName;
+type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral;
+type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeDecimalLiteral;
+type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty;
+type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty;
+type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty;
+type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement;
+type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
+type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration;
+type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration;
+type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration;
+type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportNamespaceSpecifier | BabelNodeExportDefaultSpecifier;
+type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation;
+type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation;
+type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation;
+type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias;
+type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate;
+type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;
+type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember;
+type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment;
+type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;
+type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;
+type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;
+type BabelNodeTSBaseType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSLiteralType;
+
+declare module "@babel/types" {
+ declare function arrayExpression(elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression;
+ declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression;
+ declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression | BabelNodePrivateName, right: BabelNodeExpression): BabelNodeBinaryExpression;
+ declare function interpreterDirective(value: string): BabelNodeInterpreterDirective;
+ declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective;
+ declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral;
+ declare function blockStatement(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>): BabelNodeBlockStatement;
+ declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement;
+ declare function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeCallExpression;
+ declare function catchClause(param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause;
+ declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression;
+ declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement;
+ declare function debuggerStatement(): BabelNodeDebuggerStatement;
+ declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement;
+ declare function emptyStatement(): BabelNodeEmptyStatement;
+ declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement;
+ declare function file(program: BabelNodeProgram, comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>, tokens?: Array<any>): BabelNodeFile;
+ declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement;
+ declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement;
+ declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionDeclaration;
+ declare function functionExpression(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionExpression;
+ declare function identifier(name: string): BabelNodeIdentifier;
+ declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement;
+ declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement;
+ declare function stringLiteral(value: string): BabelNodeStringLiteral;
+ declare function numericLiteral(value: number): BabelNodeNumericLiteral;
+ declare function nullLiteral(): BabelNodeNullLiteral;
+ declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral;
+ declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral;
+ declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression;
+ declare function memberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName, computed?: boolean, optional?: true | false): BabelNodeMemberExpression;
+ declare function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression;
+ declare function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram;
+ declare function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression;
+ declare function objectMethod(kind?: "method" | "get" | "set", key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, generator?: boolean, async?: boolean): BabelNodeObjectMethod;
+ declare function objectProperty(key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<BabelNodeDecorator>): BabelNodeObjectProperty;
+ declare function restElement(argument: BabelNodeLVal): BabelNodeRestElement;
+ declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement;
+ declare function sequenceExpression(expressions: Array<BabelNodeExpression>): BabelNodeSequenceExpression;
+ declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression;
+ declare function switchCase(test?: BabelNodeExpression, consequent: Array<BabelNodeStatement>): BabelNodeSwitchCase;
+ declare function switchStatement(discriminant: BabelNodeExpression, cases: Array<BabelNodeSwitchCase>): BabelNodeSwitchStatement;
+ declare function thisExpression(): BabelNodeThisExpression;
+ declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement;
+ declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement;
+ declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression;
+ declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression;
+ declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<BabelNodeVariableDeclarator>): BabelNodeVariableDeclaration;
+ declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression): BabelNodeVariableDeclarator;
+ declare function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement;
+ declare function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement;
+ declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern;
+ declare function arrayPattern(elements: Array<null | BabelNodePatternLike>): BabelNodeArrayPattern;
+ declare function arrowFunctionExpression(params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean): BabelNodeArrowFunctionExpression;
+ declare function classBody(body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>): BabelNodeClassBody;
+ declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassExpression;
+ declare function classDeclaration(id: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassDeclaration;
+ declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration;
+ declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration;
+ declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration;
+ declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeExportSpecifier;
+ declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement;
+ declare function importDeclaration(specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>, source: BabelNodeStringLiteral): BabelNodeImportDeclaration;
+ declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier;
+ declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier;
+ declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeImportSpecifier;
+ declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty;
+ declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): BabelNodeClassMethod;
+ declare function objectPattern(properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>): BabelNodeObjectPattern;
+ declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement;
+ declare function _super(): BabelNodeSuper;
+ declare export { _super as super }
+ declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression;
+ declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement;
+ declare function templateLiteral(quasis: Array<BabelNodeTemplateElement>, expressions: Array<BabelNodeExpression | BabelNodeTSType>): BabelNodeTemplateLiteral;
+ declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression;
+ declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression;
+ declare function _import(): BabelNodeImport;
+ declare export { _import as import }
+ declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral;
+ declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier;
+ declare function optionalMemberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression;
+ declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>, optional: boolean): BabelNodeOptionalCallExpression;
+ declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation;
+ declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation;
+ declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation;
+ declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation;
+ declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation;
+ declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements;
+ declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass;
+ declare function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction;
+ declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface;
+ declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule;
+ declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports;
+ declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias;
+ declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType;
+ declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable;
+ declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration;
+ declare function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration;
+ declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate;
+ declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation;
+ declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation;
+ declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam;
+ declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation;
+ declare function inferredPredicate(): BabelNodeInferredPredicate;
+ declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends;
+ declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration;
+ declare function interfaceTypeAnnotation(_extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation;
+ declare function intersectionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeIntersectionTypeAnnotation;
+ declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation;
+ declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation;
+ declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation;
+ declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation;
+ declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation;
+ declare function objectTypeAnnotation(properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>, indexers?: Array<BabelNodeObjectTypeIndexer>, callProperties?: Array<BabelNodeObjectTypeCallProperty>, internalSlots?: Array<BabelNodeObjectTypeInternalSlot>, exact?: boolean): BabelNodeObjectTypeAnnotation;
+ declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot;
+ declare function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty;
+ declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeIndexer;
+ declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeProperty;
+ declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty;
+ declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType;
+ declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier;
+ declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation;
+ declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation;
+ declare function symbolTypeAnnotation(): BabelNodeSymbolTypeAnnotation;
+ declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation;
+ declare function tupleTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeTupleTypeAnnotation;
+ declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation;
+ declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias;
+ declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation;
+ declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression;
+ declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeTypeParameter;
+ declare function typeParameterDeclaration(params: Array<BabelNodeTypeParameter>): BabelNodeTypeParameterDeclaration;
+ declare function typeParameterInstantiation(params: Array<BabelNodeFlowType>): BabelNodeTypeParameterInstantiation;
+ declare function unionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation;
+ declare function variance(kind: "minus" | "plus"): BabelNodeVariance;
+ declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation;
+ declare function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration;
+ declare function enumBooleanBody(members: Array<BabelNodeEnumBooleanMember>): BabelNodeEnumBooleanBody;
+ declare function enumNumberBody(members: Array<BabelNodeEnumNumberMember>): BabelNodeEnumNumberBody;
+ declare function enumStringBody(members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>): BabelNodeEnumStringBody;
+ declare function enumSymbolBody(members: Array<BabelNodeEnumDefaultedMember>): BabelNodeEnumSymbolBody;
+ declare function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember;
+ declare function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember;
+ declare function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember;
+ declare function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember;
+ declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute;
+ declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement;
+ declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>, selfClosing?: boolean): BabelNodeJSXElement;
+ declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression;
+ declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer;
+ declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild;
+ declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier;
+ declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression;
+ declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName;
+ declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>, selfClosing?: boolean): BabelNodeJSXOpeningElement;
+ declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute;
+ declare function jsxText(value: string): BabelNodeJSXText;
+ declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>): BabelNodeJSXFragment;
+ declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment;
+ declare function jsxClosingFragment(): BabelNodeJSXClosingFragment;
+ declare function noop(): BabelNodeNoop;
+ declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder;
+ declare function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier;
+ declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder;
+ declare function bindExpression(object: BabelNodeExpression, callee: BabelNodeExpression): BabelNodeBindExpression;
+ declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, _static?: boolean): BabelNodeClassProperty;
+ declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression;
+ declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction;
+ declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference;
+ declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression, decorators?: Array<BabelNodeDecorator>, _static: any): BabelNodeClassPrivateProperty;
+ declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, _static?: boolean): BabelNodeClassPrivateMethod;
+ declare function importAttribute(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeStringLiteral): BabelNodeImportAttribute;
+ declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator;
+ declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression;
+ declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier;
+ declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName;
+ declare function recordExpression(properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeRecordExpression;
+ declare function tupleExpression(elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeTupleExpression;
+ declare function decimalLiteral(value: string): BabelNodeDecimalLiteral;
+ declare function staticBlock(body: Array<BabelNodeStatement>): BabelNodeStaticBlock;
+ declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty;
+ declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction;
+ declare function tsDeclareMethod(decorators?: Array<BabelNodeDecorator>, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod;
+ declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName;
+ declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration;
+ declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration;
+ declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression): BabelNodeTSPropertySignature;
+ declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature;
+ declare function tsIndexSignature(parameters: Array<BabelNodeIdentifier>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature;
+ declare function tsAnyKeyword(): BabelNodeTSAnyKeyword;
+ declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword;
+ declare function tsBigIntKeyword(): BabelNodeTSBigIntKeyword;
+ declare function tsIntrinsicKeyword(): BabelNodeTSIntrinsicKeyword;
+ declare function tsNeverKeyword(): BabelNodeTSNeverKeyword;
+ declare function tsNullKeyword(): BabelNodeTSNullKeyword;
+ declare function tsNumberKeyword(): BabelNodeTSNumberKeyword;
+ declare function tsObjectKeyword(): BabelNodeTSObjectKeyword;
+ declare function tsStringKeyword(): BabelNodeTSStringKeyword;
+ declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword;
+ declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword;
+ declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword;
+ declare function tsVoidKeyword(): BabelNodeTSVoidKeyword;
+ declare function tsThisType(): BabelNodeTSThisType;
+ declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType;
+ declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType;
+ declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference;
+ declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: BabelNodeTSTypeAnnotation, asserts?: boolean): BabelNodeTSTypePredicate;
+ declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery;
+ declare function tsTypeLiteral(members: Array<BabelNodeTSTypeElement>): BabelNodeTSTypeLiteral;
+ declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType;
+ declare function tsTupleType(elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>): BabelNodeTSTupleType;
+ declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType;
+ declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType;
+ declare function tsNamedTupleMember(label: BabelNodeIdentifier, elementType: BabelNodeTSType, optional?: boolean): BabelNodeTSNamedTupleMember;
+ declare function tsUnionType(types: Array<BabelNodeTSType>): BabelNodeTSUnionType;
+ declare function tsIntersectionType(types: Array<BabelNodeTSType>): BabelNodeTSIntersectionType;
+ declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType;
+ declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType;
+ declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType;
+ declare function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator;
+ declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType;
+ declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, nameType?: BabelNodeTSType): BabelNodeTSMappedType;
+ declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral): BabelNodeTSLiteralType;
+ declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments;
+ declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration;
+ declare function tsInterfaceBody(body: Array<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody;
+ declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration;
+ declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression;
+ declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion;
+ declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array<BabelNodeTSEnumMember>): BabelNodeTSEnumDeclaration;
+ declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember;
+ declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration;
+ declare function tsModuleBlock(body: Array<BabelNodeStatement>): BabelNodeTSModuleBlock;
+ declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType;
+ declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration;
+ declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference;
+ declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression;
+ declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment;
+ declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration;
+ declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation;
+ declare function tsTypeParameterInstantiation(params: Array<BabelNodeTSType>): BabelNodeTSTypeParameterInstantiation;
+ declare function tsTypeParameterDeclaration(params: Array<BabelNodeTSTypeParameter>): BabelNodeTSTypeParameterDeclaration;
+ declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter;
+ declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression)
+ declare function assertArrayExpression(node: ?Object, opts?: ?Object): void
+ declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression)
+ declare function assertAssignmentExpression(node: ?Object, opts?: ?Object): void
+ declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression)
+ declare function assertBinaryExpression(node: ?Object, opts?: ?Object): void
+ declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective)
+ declare function assertInterpreterDirective(node: ?Object, opts?: ?Object): void
+ declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective)
+ declare function assertDirective(node: ?Object, opts?: ?Object): void
+ declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral)
+ declare function assertDirectiveLiteral(node: ?Object, opts?: ?Object): void
+ declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement)
+ declare function assertBlockStatement(node: ?Object, opts?: ?Object): void
+ declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement)
+ declare function assertBreakStatement(node: ?Object, opts?: ?Object): void
+ declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression)
+ declare function assertCallExpression(node: ?Object, opts?: ?Object): void
+ declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause)
+ declare function assertCatchClause(node: ?Object, opts?: ?Object): void
+ declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression)
+ declare function assertConditionalExpression(node: ?Object, opts?: ?Object): void
+ declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement)
+ declare function assertContinueStatement(node: ?Object, opts?: ?Object): void
+ declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement)
+ declare function assertDebuggerStatement(node: ?Object, opts?: ?Object): void
+ declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement)
+ declare function assertDoWhileStatement(node: ?Object, opts?: ?Object): void
+ declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement)
+ declare function assertEmptyStatement(node: ?Object, opts?: ?Object): void
+ declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement)
+ declare function assertExpressionStatement(node: ?Object, opts?: ?Object): void
+ declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile)
+ declare function assertFile(node: ?Object, opts?: ?Object): void
+ declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement)
+ declare function assertForInStatement(node: ?Object, opts?: ?Object): void
+ declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement)
+ declare function assertForStatement(node: ?Object, opts?: ?Object): void
+ declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration)
+ declare function assertFunctionDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression)
+ declare function assertFunctionExpression(node: ?Object, opts?: ?Object): void
+ declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier)
+ declare function assertIdentifier(node: ?Object, opts?: ?Object): void
+ declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement)
+ declare function assertIfStatement(node: ?Object, opts?: ?Object): void
+ declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement)
+ declare function assertLabeledStatement(node: ?Object, opts?: ?Object): void
+ declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral)
+ declare function assertStringLiteral(node: ?Object, opts?: ?Object): void
+ declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)
+ declare function assertNumericLiteral(node: ?Object, opts?: ?Object): void
+ declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral)
+ declare function assertNullLiteral(node: ?Object, opts?: ?Object): void
+ declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral)
+ declare function assertBooleanLiteral(node: ?Object, opts?: ?Object): void
+ declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)
+ declare function assertRegExpLiteral(node: ?Object, opts?: ?Object): void
+ declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression)
+ declare function assertLogicalExpression(node: ?Object, opts?: ?Object): void
+ declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression)
+ declare function assertMemberExpression(node: ?Object, opts?: ?Object): void
+ declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression)
+ declare function assertNewExpression(node: ?Object, opts?: ?Object): void
+ declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram)
+ declare function assertProgram(node: ?Object, opts?: ?Object): void
+ declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression)
+ declare function assertObjectExpression(node: ?Object, opts?: ?Object): void
+ declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod)
+ declare function assertObjectMethod(node: ?Object, opts?: ?Object): void
+ declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty)
+ declare function assertObjectProperty(node: ?Object, opts?: ?Object): void
+ declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)
+ declare function assertRestElement(node: ?Object, opts?: ?Object): void
+ declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement)
+ declare function assertReturnStatement(node: ?Object, opts?: ?Object): void
+ declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression)
+ declare function assertSequenceExpression(node: ?Object, opts?: ?Object): void
+ declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression)
+ declare function assertParenthesizedExpression(node: ?Object, opts?: ?Object): void
+ declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase)
+ declare function assertSwitchCase(node: ?Object, opts?: ?Object): void
+ declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement)
+ declare function assertSwitchStatement(node: ?Object, opts?: ?Object): void
+ declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression)
+ declare function assertThisExpression(node: ?Object, opts?: ?Object): void
+ declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement)
+ declare function assertThrowStatement(node: ?Object, opts?: ?Object): void
+ declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement)
+ declare function assertTryStatement(node: ?Object, opts?: ?Object): void
+ declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression)
+ declare function assertUnaryExpression(node: ?Object, opts?: ?Object): void
+ declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression)
+ declare function assertUpdateExpression(node: ?Object, opts?: ?Object): void
+ declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration)
+ declare function assertVariableDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator)
+ declare function assertVariableDeclarator(node: ?Object, opts?: ?Object): void
+ declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement)
+ declare function assertWhileStatement(node: ?Object, opts?: ?Object): void
+ declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement)
+ declare function assertWithStatement(node: ?Object, opts?: ?Object): void
+ declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern)
+ declare function assertAssignmentPattern(node: ?Object, opts?: ?Object): void
+ declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern)
+ declare function assertArrayPattern(node: ?Object, opts?: ?Object): void
+ declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression)
+ declare function assertArrowFunctionExpression(node: ?Object, opts?: ?Object): void
+ declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody)
+ declare function assertClassBody(node: ?Object, opts?: ?Object): void
+ declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression)
+ declare function assertClassExpression(node: ?Object, opts?: ?Object): void
+ declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration)
+ declare function assertClassDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration)
+ declare function assertExportAllDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration)
+ declare function assertExportDefaultDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration)
+ declare function assertExportNamedDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier)
+ declare function assertExportSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement)
+ declare function assertForOfStatement(node: ?Object, opts?: ?Object): void
+ declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration)
+ declare function assertImportDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier)
+ declare function assertImportDefaultSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier)
+ declare function assertImportNamespaceSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier)
+ declare function assertImportSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty)
+ declare function assertMetaProperty(node: ?Object, opts?: ?Object): void
+ declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod)
+ declare function assertClassMethod(node: ?Object, opts?: ?Object): void
+ declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern)
+ declare function assertObjectPattern(node: ?Object, opts?: ?Object): void
+ declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)
+ declare function assertSpreadElement(node: ?Object, opts?: ?Object): void
+ declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper)
+ declare function assertSuper(node: ?Object, opts?: ?Object): void
+ declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression)
+ declare function assertTaggedTemplateExpression(node: ?Object, opts?: ?Object): void
+ declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement)
+ declare function assertTemplateElement(node: ?Object, opts?: ?Object): void
+ declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral)
+ declare function assertTemplateLiteral(node: ?Object, opts?: ?Object): void
+ declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression)
+ declare function assertYieldExpression(node: ?Object, opts?: ?Object): void
+ declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression)
+ declare function assertAwaitExpression(node: ?Object, opts?: ?Object): void
+ declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport)
+ declare function assertImport(node: ?Object, opts?: ?Object): void
+ declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral)
+ declare function assertBigIntLiteral(node: ?Object, opts?: ?Object): void
+ declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier)
+ declare function assertExportNamespaceSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression)
+ declare function assertOptionalMemberExpression(node: ?Object, opts?: ?Object): void
+ declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression)
+ declare function assertOptionalCallExpression(node: ?Object, opts?: ?Object): void
+ declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation)
+ declare function assertAnyTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation)
+ declare function assertArrayTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation)
+ declare function assertBooleanTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation)
+ declare function assertBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation)
+ declare function assertNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements)
+ declare function assertClassImplements(node: ?Object, opts?: ?Object): void
+ declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass)
+ declare function assertDeclareClass(node: ?Object, opts?: ?Object): void
+ declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction)
+ declare function assertDeclareFunction(node: ?Object, opts?: ?Object): void
+ declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface)
+ declare function assertDeclareInterface(node: ?Object, opts?: ?Object): void
+ declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule)
+ declare function assertDeclareModule(node: ?Object, opts?: ?Object): void
+ declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports)
+ declare function assertDeclareModuleExports(node: ?Object, opts?: ?Object): void
+ declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias)
+ declare function assertDeclareTypeAlias(node: ?Object, opts?: ?Object): void
+ declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType)
+ declare function assertDeclareOpaqueType(node: ?Object, opts?: ?Object): void
+ declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable)
+ declare function assertDeclareVariable(node: ?Object, opts?: ?Object): void
+ declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration)
+ declare function assertDeclareExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration)
+ declare function assertDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate)
+ declare function assertDeclaredPredicate(node: ?Object, opts?: ?Object): void
+ declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation)
+ declare function assertExistsTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation)
+ declare function assertFunctionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam)
+ declare function assertFunctionTypeParam(node: ?Object, opts?: ?Object): void
+ declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation)
+ declare function assertGenericTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate)
+ declare function assertInferredPredicate(node: ?Object, opts?: ?Object): void
+ declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends)
+ declare function assertInterfaceExtends(node: ?Object, opts?: ?Object): void
+ declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration)
+ declare function assertInterfaceDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation)
+ declare function assertInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation)
+ declare function assertIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation)
+ declare function assertMixedTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation)
+ declare function assertEmptyTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation)
+ declare function assertNullableTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation)
+ declare function assertNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation)
+ declare function assertNumberTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation)
+ declare function assertObjectTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot)
+ declare function assertObjectTypeInternalSlot(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty)
+ declare function assertObjectTypeCallProperty(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer)
+ declare function assertObjectTypeIndexer(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty)
+ declare function assertObjectTypeProperty(node: ?Object, opts?: ?Object): void
+ declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty)
+ declare function assertObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): void
+ declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType)
+ declare function assertOpaqueType(node: ?Object, opts?: ?Object): void
+ declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier)
+ declare function assertQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): void
+ declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation)
+ declare function assertStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation)
+ declare function assertStringTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSymbolTypeAnnotation)
+ declare function assertSymbolTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation)
+ declare function assertThisTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation)
+ declare function assertTupleTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation)
+ declare function assertTypeofTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias)
+ declare function assertTypeAlias(node: ?Object, opts?: ?Object): void
+ declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation)
+ declare function assertTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression)
+ declare function assertTypeCastExpression(node: ?Object, opts?: ?Object): void
+ declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter)
+ declare function assertTypeParameter(node: ?Object, opts?: ?Object): void
+ declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration)
+ declare function assertTypeParameterDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation)
+ declare function assertTypeParameterInstantiation(node: ?Object, opts?: ?Object): void
+ declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation)
+ declare function assertUnionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance)
+ declare function assertVariance(node: ?Object, opts?: ?Object): void
+ declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation)
+ declare function assertVoidTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration)
+ declare function assertEnumDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody)
+ declare function assertEnumBooleanBody(node: ?Object, opts?: ?Object): void
+ declare function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody)
+ declare function assertEnumNumberBody(node: ?Object, opts?: ?Object): void
+ declare function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody)
+ declare function assertEnumStringBody(node: ?Object, opts?: ?Object): void
+ declare function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody)
+ declare function assertEnumSymbolBody(node: ?Object, opts?: ?Object): void
+ declare function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember)
+ declare function assertEnumBooleanMember(node: ?Object, opts?: ?Object): void
+ declare function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember)
+ declare function assertEnumNumberMember(node: ?Object, opts?: ?Object): void
+ declare function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember)
+ declare function assertEnumStringMember(node: ?Object, opts?: ?Object): void
+ declare function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember)
+ declare function assertEnumDefaultedMember(node: ?Object, opts?: ?Object): void
+ declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute)
+ declare function assertJSXAttribute(node: ?Object, opts?: ?Object): void
+ declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement)
+ declare function assertJSXClosingElement(node: ?Object, opts?: ?Object): void
+ declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement)
+ declare function assertJSXElement(node: ?Object, opts?: ?Object): void
+ declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression)
+ declare function assertJSXEmptyExpression(node: ?Object, opts?: ?Object): void
+ declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer)
+ declare function assertJSXExpressionContainer(node: ?Object, opts?: ?Object): void
+ declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild)
+ declare function assertJSXSpreadChild(node: ?Object, opts?: ?Object): void
+ declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier)
+ declare function assertJSXIdentifier(node: ?Object, opts?: ?Object): void
+ declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression)
+ declare function assertJSXMemberExpression(node: ?Object, opts?: ?Object): void
+ declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName)
+ declare function assertJSXNamespacedName(node: ?Object, opts?: ?Object): void
+ declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement)
+ declare function assertJSXOpeningElement(node: ?Object, opts?: ?Object): void
+ declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute)
+ declare function assertJSXSpreadAttribute(node: ?Object, opts?: ?Object): void
+ declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText)
+ declare function assertJSXText(node: ?Object, opts?: ?Object): void
+ declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment)
+ declare function assertJSXFragment(node: ?Object, opts?: ?Object): void
+ declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment)
+ declare function assertJSXOpeningFragment(node: ?Object, opts?: ?Object): void
+ declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment)
+ declare function assertJSXClosingFragment(node: ?Object, opts?: ?Object): void
+ declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop)
+ declare function assertNoop(node: ?Object, opts?: ?Object): void
+ declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder)
+ declare function assertPlaceholder(node: ?Object, opts?: ?Object): void
+ declare function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier)
+ declare function assertV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): void
+ declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder)
+ declare function assertArgumentPlaceholder(node: ?Object, opts?: ?Object): void
+ declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression)
+ declare function assertBindExpression(node: ?Object, opts?: ?Object): void
+ declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty)
+ declare function assertClassProperty(node: ?Object, opts?: ?Object): void
+ declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression)
+ declare function assertPipelineTopicExpression(node: ?Object, opts?: ?Object): void
+ declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction)
+ declare function assertPipelineBareFunction(node: ?Object, opts?: ?Object): void
+ declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference)
+ declare function assertPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): void
+ declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty)
+ declare function assertClassPrivateProperty(node: ?Object, opts?: ?Object): void
+ declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod)
+ declare function assertClassPrivateMethod(node: ?Object, opts?: ?Object): void
+ declare function isImportAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportAttribute)
+ declare function assertImportAttribute(node: ?Object, opts?: ?Object): void
+ declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator)
+ declare function assertDecorator(node: ?Object, opts?: ?Object): void
+ declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression)
+ declare function assertDoExpression(node: ?Object, opts?: ?Object): void
+ declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier)
+ declare function assertExportDefaultSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName)
+ declare function assertPrivateName(node: ?Object, opts?: ?Object): void
+ declare function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRecordExpression)
+ declare function assertRecordExpression(node: ?Object, opts?: ?Object): void
+ declare function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleExpression)
+ declare function assertTupleExpression(node: ?Object, opts?: ?Object): void
+ declare function isDecimalLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecimalLiteral)
+ declare function assertDecimalLiteral(node: ?Object, opts?: ?Object): void
+ declare function isStaticBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStaticBlock)
+ declare function assertStaticBlock(node: ?Object, opts?: ?Object): void
+ declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty)
+ declare function assertTSParameterProperty(node: ?Object, opts?: ?Object): void
+ declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction)
+ declare function assertTSDeclareFunction(node: ?Object, opts?: ?Object): void
+ declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod)
+ declare function assertTSDeclareMethod(node: ?Object, opts?: ?Object): void
+ declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName)
+ declare function assertTSQualifiedName(node: ?Object, opts?: ?Object): void
+ declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration)
+ declare function assertTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration)
+ declare function assertTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature)
+ declare function assertTSPropertySignature(node: ?Object, opts?: ?Object): void
+ declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature)
+ declare function assertTSMethodSignature(node: ?Object, opts?: ?Object): void
+ declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature)
+ declare function assertTSIndexSignature(node: ?Object, opts?: ?Object): void
+ declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword)
+ declare function assertTSAnyKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword)
+ declare function assertTSBooleanKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword)
+ declare function assertTSBigIntKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSIntrinsicKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntrinsicKeyword)
+ declare function assertTSIntrinsicKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword)
+ declare function assertTSNeverKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword)
+ declare function assertTSNullKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword)
+ declare function assertTSNumberKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword)
+ declare function assertTSObjectKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword)
+ declare function assertTSStringKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword)
+ declare function assertTSSymbolKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword)
+ declare function assertTSUndefinedKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword)
+ declare function assertTSUnknownKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword)
+ declare function assertTSVoidKeyword(node: ?Object, opts?: ?Object): void
+ declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType)
+ declare function assertTSThisType(node: ?Object, opts?: ?Object): void
+ declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType)
+ declare function assertTSFunctionType(node: ?Object, opts?: ?Object): void
+ declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType)
+ declare function assertTSConstructorType(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference)
+ declare function assertTSTypeReference(node: ?Object, opts?: ?Object): void
+ declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate)
+ declare function assertTSTypePredicate(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery)
+ declare function assertTSTypeQuery(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral)
+ declare function assertTSTypeLiteral(node: ?Object, opts?: ?Object): void
+ declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType)
+ declare function assertTSArrayType(node: ?Object, opts?: ?Object): void
+ declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType)
+ declare function assertTSTupleType(node: ?Object, opts?: ?Object): void
+ declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType)
+ declare function assertTSOptionalType(node: ?Object, opts?: ?Object): void
+ declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType)
+ declare function assertTSRestType(node: ?Object, opts?: ?Object): void
+ declare function isTSNamedTupleMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamedTupleMember)
+ declare function assertTSNamedTupleMember(node: ?Object, opts?: ?Object): void
+ declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType)
+ declare function assertTSUnionType(node: ?Object, opts?: ?Object): void
+ declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType)
+ declare function assertTSIntersectionType(node: ?Object, opts?: ?Object): void
+ declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType)
+ declare function assertTSConditionalType(node: ?Object, opts?: ?Object): void
+ declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType)
+ declare function assertTSInferType(node: ?Object, opts?: ?Object): void
+ declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType)
+ declare function assertTSParenthesizedType(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator)
+ declare function assertTSTypeOperator(node: ?Object, opts?: ?Object): void
+ declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType)
+ declare function assertTSIndexedAccessType(node: ?Object, opts?: ?Object): void
+ declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType)
+ declare function assertTSMappedType(node: ?Object, opts?: ?Object): void
+ declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType)
+ declare function assertTSLiteralType(node: ?Object, opts?: ?Object): void
+ declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments)
+ declare function assertTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): void
+ declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration)
+ declare function assertTSInterfaceDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody)
+ declare function assertTSInterfaceBody(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration)
+ declare function assertTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression)
+ declare function assertTSAsExpression(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion)
+ declare function assertTSTypeAssertion(node: ?Object, opts?: ?Object): void
+ declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration)
+ declare function assertTSEnumDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember)
+ declare function assertTSEnumMember(node: ?Object, opts?: ?Object): void
+ declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration)
+ declare function assertTSModuleDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock)
+ declare function assertTSModuleBlock(node: ?Object, opts?: ?Object): void
+ declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType)
+ declare function assertTSImportType(node: ?Object, opts?: ?Object): void
+ declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration)
+ declare function assertTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference)
+ declare function assertTSExternalModuleReference(node: ?Object, opts?: ?Object): void
+ declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression)
+ declare function assertTSNonNullExpression(node: ?Object, opts?: ?Object): void
+ declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment)
+ declare function assertTSExportAssignment(node: ?Object, opts?: ?Object): void
+ declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration)
+ declare function assertTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation)
+ declare function assertTSTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation)
+ declare function assertTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration)
+ declare function assertTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter)
+ declare function assertTSTypeParameter(node: ?Object, opts?: ?Object): void
+ declare function isExpression(node: ?Object, opts?: ?Object): boolean
+ declare function assertExpression(node: ?Object, opts?: ?Object): void
+ declare function isBinary(node: ?Object, opts?: ?Object): boolean
+ declare function assertBinary(node: ?Object, opts?: ?Object): void
+ declare function isScopable(node: ?Object, opts?: ?Object): boolean
+ declare function assertScopable(node: ?Object, opts?: ?Object): void
+ declare function isBlockParent(node: ?Object, opts?: ?Object): boolean
+ declare function assertBlockParent(node: ?Object, opts?: ?Object): void
+ declare function isBlock(node: ?Object, opts?: ?Object): boolean
+ declare function assertBlock(node: ?Object, opts?: ?Object): void
+ declare function isStatement(node: ?Object, opts?: ?Object): boolean
+ declare function assertStatement(node: ?Object, opts?: ?Object): void
+ declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean
+ declare function assertTerminatorless(node: ?Object, opts?: ?Object): void
+ declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean
+ declare function assertCompletionStatement(node: ?Object, opts?: ?Object): void
+ declare function isConditional(node: ?Object, opts?: ?Object): boolean
+ declare function assertConditional(node: ?Object, opts?: ?Object): void
+ declare function isLoop(node: ?Object, opts?: ?Object): boolean
+ declare function assertLoop(node: ?Object, opts?: ?Object): void
+ declare function isWhile(node: ?Object, opts?: ?Object): boolean
+ declare function assertWhile(node: ?Object, opts?: ?Object): void
+ declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean
+ declare function assertExpressionWrapper(node: ?Object, opts?: ?Object): void
+ declare function isFor(node: ?Object, opts?: ?Object): boolean
+ declare function assertFor(node: ?Object, opts?: ?Object): void
+ declare function isForXStatement(node: ?Object, opts?: ?Object): boolean
+ declare function assertForXStatement(node: ?Object, opts?: ?Object): void
+ declare function isFunction(node: ?Object, opts?: ?Object): boolean
+ declare function assertFunction(node: ?Object, opts?: ?Object): void
+ declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean
+ declare function assertFunctionParent(node: ?Object, opts?: ?Object): void
+ declare function isPureish(node: ?Object, opts?: ?Object): boolean
+ declare function assertPureish(node: ?Object, opts?: ?Object): void
+ declare function isDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare function assertDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isPatternLike(node: ?Object, opts?: ?Object): boolean
+ declare function assertPatternLike(node: ?Object, opts?: ?Object): void
+ declare function isLVal(node: ?Object, opts?: ?Object): boolean
+ declare function assertLVal(node: ?Object, opts?: ?Object): void
+ declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean
+ declare function assertTSEntityName(node: ?Object, opts?: ?Object): void
+ declare function isLiteral(node: ?Object, opts?: ?Object): boolean
+ declare function assertLiteral(node: ?Object, opts?: ?Object): void
+ declare function isImmutable(node: ?Object, opts?: ?Object): boolean
+ declare function assertImmutable(node: ?Object, opts?: ?Object): void
+ declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean
+ declare function assertUserWhitespacable(node: ?Object, opts?: ?Object): void
+ declare function isMethod(node: ?Object, opts?: ?Object): boolean
+ declare function assertMethod(node: ?Object, opts?: ?Object): void
+ declare function isObjectMember(node: ?Object, opts?: ?Object): boolean
+ declare function assertObjectMember(node: ?Object, opts?: ?Object): void
+ declare function isProperty(node: ?Object, opts?: ?Object): boolean
+ declare function assertProperty(node: ?Object, opts?: ?Object): void
+ declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean
+ declare function assertUnaryLike(node: ?Object, opts?: ?Object): void
+ declare function isPattern(node: ?Object, opts?: ?Object): boolean
+ declare function assertPattern(node: ?Object, opts?: ?Object): void
+ declare function isClass(node: ?Object, opts?: ?Object): boolean
+ declare function assertClass(node: ?Object, opts?: ?Object): void
+ declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare function assertModuleDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare function assertExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean
+ declare function assertModuleSpecifier(node: ?Object, opts?: ?Object): void
+ declare function isFlow(node: ?Object, opts?: ?Object): boolean
+ declare function assertFlow(node: ?Object, opts?: ?Object): void
+ declare function isFlowType(node: ?Object, opts?: ?Object): boolean
+ declare function assertFlowType(node: ?Object, opts?: ?Object): void
+ declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean
+ declare function assertFlowBaseAnnotation(node: ?Object, opts?: ?Object): void
+ declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare function assertFlowDeclaration(node: ?Object, opts?: ?Object): void
+ declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean
+ declare function assertFlowPredicate(node: ?Object, opts?: ?Object): void
+ declare function isEnumBody(node: ?Object, opts?: ?Object): boolean
+ declare function assertEnumBody(node: ?Object, opts?: ?Object): void
+ declare function isEnumMember(node: ?Object, opts?: ?Object): boolean
+ declare function assertEnumMember(node: ?Object, opts?: ?Object): void
+ declare function isJSX(node: ?Object, opts?: ?Object): boolean
+ declare function assertJSX(node: ?Object, opts?: ?Object): void
+ declare function isPrivate(node: ?Object, opts?: ?Object): boolean
+ declare function assertPrivate(node: ?Object, opts?: ?Object): void
+ declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean
+ declare function assertTSTypeElement(node: ?Object, opts?: ?Object): void
+ declare function isTSType(node: ?Object, opts?: ?Object): boolean
+ declare function assertTSType(node: ?Object, opts?: ?Object): void
+ declare function isTSBaseType(node: ?Object, opts?: ?Object): boolean
+ declare function assertTSBaseType(node: ?Object, opts?: ?Object): void
+ declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)
+ declare function assertNumberLiteral(node: ?Object, opts?: ?Object): void
+ declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)
+ declare function assertRegexLiteral(node: ?Object, opts?: ?Object): void
+ declare function isRestProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)
+ declare function assertRestProperty(node: ?Object, opts?: ?Object): void
+ declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)
+ declare function assertSpreadProperty(node: ?Object, opts?: ?Object): void
+ declare function assertNode(obj: any): void
+ declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation
+ declare function createUnionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
+ declare function createFlowUnionType(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
+ declare function buildChildren(node: { children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeJSXEmptyExpression> }): Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>
+ declare function clone<T>(n: T): T;
+ declare function cloneDeep<T>(n: T): T;
+ declare function cloneDeepWithoutLoc<T>(n: T): T;
+ declare function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;
+ declare function cloneWithoutLoc<T>(n: T): T;
+ declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'
+ declare function addComment<T: Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T
+ declare function addComments<T: Node>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T
+ declare function inheritInnerComments(node: Node, parent: Node): void
+ declare function inheritLeadingComments(node: Node, parent: Node): void
+ declare function inheritsComments<T: Node>(node: T, parent: Node): void
+ declare function inheritTrailingComments(node: Node, parent: Node): void
+ declare function removeComments<T: Node>(node: T): T
+ declare function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement
+ declare function toBindingIdentifierName(name?: ?string): string
+ declare function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement
+ declare function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression
+ declare function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression | BabelNodeClass | BabelNodeFunction): BabelNodeExpression
+ declare function toIdentifier(name?: ?string): string
+ declare function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string
+ declare function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void
+ declare function valueToNode(value: any): BabelNodeExpression
+ declare function removeTypeDuplicates(types: Array<BabelNodeFlowType>): Array<BabelNodeFlowType>
+ declare function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression
+ declare function inherits<T: Node>(child: T, parent: BabelNode | null | void): T
+ declare function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression
+ declare function removeProperties<T>(n: T, opts: ?{}): void;
+ declare function removePropertiesDeep<T>(n: T, opts: ?{}): T;
+ declare function getBindingIdentifiers(node: BabelNode, duplicates: boolean, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> }
+ declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> }
+ declare type TraversalAncestors = Array<{
+ node: BabelNode,
+ key: string,
+ index?: number,
+ }>;
+ declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
+ declare type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };
+ declare function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
+ declare function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;
+ declare function shallowEqual(actual: Object, expected: Object): boolean
+ declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean
+ declare function is(type: string, n: BabelNode, opts: Object): boolean;
+ declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean
+ declare function isBlockScoped(node: BabelNode): boolean
+ declare function isImmutable(node: BabelNode): boolean
+ declare function isLet(node: BabelNode): boolean
+ declare function isNode(node: ?Object): boolean
+ declare function isNodesEquivalent(a: any, b: any): boolean
+ declare function isPlaceholderType(placeholderType: string, targetType: string): boolean
+ declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean
+ declare function isScope(node: BabelNode, parent: BabelNode): boolean
+ declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean
+ declare function isType(nodetype: ?string, targetType: string): boolean
+ declare function isValidES3Identifier(name: string): boolean
+ declare function isValidES3Identifier(name: string): boolean
+ declare function isValidIdentifier(name: string): boolean
+ declare function isVar(node: BabelNode): boolean
+ declare function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean
+ declare function validate(n: BabelNode, key: string, value: mixed): void;
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
index 6a0ac93c5cf..6a0ac93c5cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
index 58026839959..58026839959 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js
index 64d72fcf2fd..64d72fcf2fd 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/inherits.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/inherits.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
index ee6de0ec332..ee6de0ec332 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js
index f9cf8e6065d..f9cf8e6065d 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removeProperties.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removeProperties.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
index d11a84a8327..d11a84a8327 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
new file mode 100644
index 00000000000..5eca7e1f488
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removeTypeDuplicates;
+
+var _generated = require("../../validators/generated");
+
+function removeTypeDuplicates(nodes) {
+ const generics = {};
+ const bases = {};
+ const typeGroups = [];
+ const types = [];
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (!node) continue;
+
+ if (types.indexOf(node) >= 0) {
+ continue;
+ }
+
+ if ((0, _generated.isTSAnyKeyword)(node.type)) {
+ return [node];
+ }
+
+ if ((0, _generated.isTSBaseType)(node)) {
+ bases[node.type] = node;
+ continue;
+ }
+
+ if ((0, _generated.isTSUnionType)(node)) {
+ if (typeGroups.indexOf(node.types) < 0) {
+ nodes = nodes.concat(node.types);
+ typeGroups.push(node.types);
+ }
+
+ continue;
+ }
+
+ types.push(node);
+ }
+
+ for (const type of Object.keys(bases)) {
+ types.push(bases[type]);
+ }
+
+ for (const name of Object.keys(generics)) {
+ types.push(generics[name]);
+ }
+
+ return types;
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
index 189f4b8eb3b..189f4b8eb3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
index 8e1e3cb200d..8e1e3cb200d 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js
index 775aed1eede..775aed1eede 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverse.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js
index f038dd835ed..f038dd835ed 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/traverse/traverseFast.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/traverse/traverseFast.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js
new file mode 100644
index 00000000000..35f33812439
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/inherit.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inherit;
+
+function inherit(key, child, parent) {
+ if (child && parent) {
+ child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
index f0ca13369be..f0ca13369be 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js
index fae259e4fc5..fae259e4fc5 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/shallowEqual.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
index 0faa29c5d61..0faa29c5d61 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js
new file mode 100644
index 00000000000..7978b63fa28
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/generated/index.js
@@ -0,0 +1,4669 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isArrayExpression = isArrayExpression;
+exports.isAssignmentExpression = isAssignmentExpression;
+exports.isBinaryExpression = isBinaryExpression;
+exports.isInterpreterDirective = isInterpreterDirective;
+exports.isDirective = isDirective;
+exports.isDirectiveLiteral = isDirectiveLiteral;
+exports.isBlockStatement = isBlockStatement;
+exports.isBreakStatement = isBreakStatement;
+exports.isCallExpression = isCallExpression;
+exports.isCatchClause = isCatchClause;
+exports.isConditionalExpression = isConditionalExpression;
+exports.isContinueStatement = isContinueStatement;
+exports.isDebuggerStatement = isDebuggerStatement;
+exports.isDoWhileStatement = isDoWhileStatement;
+exports.isEmptyStatement = isEmptyStatement;
+exports.isExpressionStatement = isExpressionStatement;
+exports.isFile = isFile;
+exports.isForInStatement = isForInStatement;
+exports.isForStatement = isForStatement;
+exports.isFunctionDeclaration = isFunctionDeclaration;
+exports.isFunctionExpression = isFunctionExpression;
+exports.isIdentifier = isIdentifier;
+exports.isIfStatement = isIfStatement;
+exports.isLabeledStatement = isLabeledStatement;
+exports.isStringLiteral = isStringLiteral;
+exports.isNumericLiteral = isNumericLiteral;
+exports.isNullLiteral = isNullLiteral;
+exports.isBooleanLiteral = isBooleanLiteral;
+exports.isRegExpLiteral = isRegExpLiteral;
+exports.isLogicalExpression = isLogicalExpression;
+exports.isMemberExpression = isMemberExpression;
+exports.isNewExpression = isNewExpression;
+exports.isProgram = isProgram;
+exports.isObjectExpression = isObjectExpression;
+exports.isObjectMethod = isObjectMethod;
+exports.isObjectProperty = isObjectProperty;
+exports.isRestElement = isRestElement;
+exports.isReturnStatement = isReturnStatement;
+exports.isSequenceExpression = isSequenceExpression;
+exports.isParenthesizedExpression = isParenthesizedExpression;
+exports.isSwitchCase = isSwitchCase;
+exports.isSwitchStatement = isSwitchStatement;
+exports.isThisExpression = isThisExpression;
+exports.isThrowStatement = isThrowStatement;
+exports.isTryStatement = isTryStatement;
+exports.isUnaryExpression = isUnaryExpression;
+exports.isUpdateExpression = isUpdateExpression;
+exports.isVariableDeclaration = isVariableDeclaration;
+exports.isVariableDeclarator = isVariableDeclarator;
+exports.isWhileStatement = isWhileStatement;
+exports.isWithStatement = isWithStatement;
+exports.isAssignmentPattern = isAssignmentPattern;
+exports.isArrayPattern = isArrayPattern;
+exports.isArrowFunctionExpression = isArrowFunctionExpression;
+exports.isClassBody = isClassBody;
+exports.isClassExpression = isClassExpression;
+exports.isClassDeclaration = isClassDeclaration;
+exports.isExportAllDeclaration = isExportAllDeclaration;
+exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
+exports.isExportNamedDeclaration = isExportNamedDeclaration;
+exports.isExportSpecifier = isExportSpecifier;
+exports.isForOfStatement = isForOfStatement;
+exports.isImportDeclaration = isImportDeclaration;
+exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
+exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
+exports.isImportSpecifier = isImportSpecifier;
+exports.isMetaProperty = isMetaProperty;
+exports.isClassMethod = isClassMethod;
+exports.isObjectPattern = isObjectPattern;
+exports.isSpreadElement = isSpreadElement;
+exports.isSuper = isSuper;
+exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
+exports.isTemplateElement = isTemplateElement;
+exports.isTemplateLiteral = isTemplateLiteral;
+exports.isYieldExpression = isYieldExpression;
+exports.isAwaitExpression = isAwaitExpression;
+exports.isImport = isImport;
+exports.isBigIntLiteral = isBigIntLiteral;
+exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
+exports.isOptionalMemberExpression = isOptionalMemberExpression;
+exports.isOptionalCallExpression = isOptionalCallExpression;
+exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
+exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
+exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
+exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
+exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
+exports.isClassImplements = isClassImplements;
+exports.isDeclareClass = isDeclareClass;
+exports.isDeclareFunction = isDeclareFunction;
+exports.isDeclareInterface = isDeclareInterface;
+exports.isDeclareModule = isDeclareModule;
+exports.isDeclareModuleExports = isDeclareModuleExports;
+exports.isDeclareTypeAlias = isDeclareTypeAlias;
+exports.isDeclareOpaqueType = isDeclareOpaqueType;
+exports.isDeclareVariable = isDeclareVariable;
+exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
+exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
+exports.isDeclaredPredicate = isDeclaredPredicate;
+exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
+exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
+exports.isFunctionTypeParam = isFunctionTypeParam;
+exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
+exports.isInferredPredicate = isInferredPredicate;
+exports.isInterfaceExtends = isInterfaceExtends;
+exports.isInterfaceDeclaration = isInterfaceDeclaration;
+exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
+exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
+exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
+exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
+exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
+exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
+exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
+exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
+exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
+exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
+exports.isObjectTypeIndexer = isObjectTypeIndexer;
+exports.isObjectTypeProperty = isObjectTypeProperty;
+exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
+exports.isOpaqueType = isOpaqueType;
+exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
+exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
+exports.isStringTypeAnnotation = isStringTypeAnnotation;
+exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
+exports.isThisTypeAnnotation = isThisTypeAnnotation;
+exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
+exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
+exports.isTypeAlias = isTypeAlias;
+exports.isTypeAnnotation = isTypeAnnotation;
+exports.isTypeCastExpression = isTypeCastExpression;
+exports.isTypeParameter = isTypeParameter;
+exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
+exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
+exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
+exports.isVariance = isVariance;
+exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
+exports.isEnumDeclaration = isEnumDeclaration;
+exports.isEnumBooleanBody = isEnumBooleanBody;
+exports.isEnumNumberBody = isEnumNumberBody;
+exports.isEnumStringBody = isEnumStringBody;
+exports.isEnumSymbolBody = isEnumSymbolBody;
+exports.isEnumBooleanMember = isEnumBooleanMember;
+exports.isEnumNumberMember = isEnumNumberMember;
+exports.isEnumStringMember = isEnumStringMember;
+exports.isEnumDefaultedMember = isEnumDefaultedMember;
+exports.isJSXAttribute = isJSXAttribute;
+exports.isJSXClosingElement = isJSXClosingElement;
+exports.isJSXElement = isJSXElement;
+exports.isJSXEmptyExpression = isJSXEmptyExpression;
+exports.isJSXExpressionContainer = isJSXExpressionContainer;
+exports.isJSXSpreadChild = isJSXSpreadChild;
+exports.isJSXIdentifier = isJSXIdentifier;
+exports.isJSXMemberExpression = isJSXMemberExpression;
+exports.isJSXNamespacedName = isJSXNamespacedName;
+exports.isJSXOpeningElement = isJSXOpeningElement;
+exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
+exports.isJSXText = isJSXText;
+exports.isJSXFragment = isJSXFragment;
+exports.isJSXOpeningFragment = isJSXOpeningFragment;
+exports.isJSXClosingFragment = isJSXClosingFragment;
+exports.isNoop = isNoop;
+exports.isPlaceholder = isPlaceholder;
+exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
+exports.isArgumentPlaceholder = isArgumentPlaceholder;
+exports.isBindExpression = isBindExpression;
+exports.isClassProperty = isClassProperty;
+exports.isPipelineTopicExpression = isPipelineTopicExpression;
+exports.isPipelineBareFunction = isPipelineBareFunction;
+exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
+exports.isClassPrivateProperty = isClassPrivateProperty;
+exports.isClassPrivateMethod = isClassPrivateMethod;
+exports.isImportAttribute = isImportAttribute;
+exports.isDecorator = isDecorator;
+exports.isDoExpression = isDoExpression;
+exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
+exports.isPrivateName = isPrivateName;
+exports.isRecordExpression = isRecordExpression;
+exports.isTupleExpression = isTupleExpression;
+exports.isDecimalLiteral = isDecimalLiteral;
+exports.isStaticBlock = isStaticBlock;
+exports.isTSParameterProperty = isTSParameterProperty;
+exports.isTSDeclareFunction = isTSDeclareFunction;
+exports.isTSDeclareMethod = isTSDeclareMethod;
+exports.isTSQualifiedName = isTSQualifiedName;
+exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
+exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
+exports.isTSPropertySignature = isTSPropertySignature;
+exports.isTSMethodSignature = isTSMethodSignature;
+exports.isTSIndexSignature = isTSIndexSignature;
+exports.isTSAnyKeyword = isTSAnyKeyword;
+exports.isTSBooleanKeyword = isTSBooleanKeyword;
+exports.isTSBigIntKeyword = isTSBigIntKeyword;
+exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
+exports.isTSNeverKeyword = isTSNeverKeyword;
+exports.isTSNullKeyword = isTSNullKeyword;
+exports.isTSNumberKeyword = isTSNumberKeyword;
+exports.isTSObjectKeyword = isTSObjectKeyword;
+exports.isTSStringKeyword = isTSStringKeyword;
+exports.isTSSymbolKeyword = isTSSymbolKeyword;
+exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
+exports.isTSUnknownKeyword = isTSUnknownKeyword;
+exports.isTSVoidKeyword = isTSVoidKeyword;
+exports.isTSThisType = isTSThisType;
+exports.isTSFunctionType = isTSFunctionType;
+exports.isTSConstructorType = isTSConstructorType;
+exports.isTSTypeReference = isTSTypeReference;
+exports.isTSTypePredicate = isTSTypePredicate;
+exports.isTSTypeQuery = isTSTypeQuery;
+exports.isTSTypeLiteral = isTSTypeLiteral;
+exports.isTSArrayType = isTSArrayType;
+exports.isTSTupleType = isTSTupleType;
+exports.isTSOptionalType = isTSOptionalType;
+exports.isTSRestType = isTSRestType;
+exports.isTSNamedTupleMember = isTSNamedTupleMember;
+exports.isTSUnionType = isTSUnionType;
+exports.isTSIntersectionType = isTSIntersectionType;
+exports.isTSConditionalType = isTSConditionalType;
+exports.isTSInferType = isTSInferType;
+exports.isTSParenthesizedType = isTSParenthesizedType;
+exports.isTSTypeOperator = isTSTypeOperator;
+exports.isTSIndexedAccessType = isTSIndexedAccessType;
+exports.isTSMappedType = isTSMappedType;
+exports.isTSLiteralType = isTSLiteralType;
+exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
+exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
+exports.isTSInterfaceBody = isTSInterfaceBody;
+exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
+exports.isTSAsExpression = isTSAsExpression;
+exports.isTSTypeAssertion = isTSTypeAssertion;
+exports.isTSEnumDeclaration = isTSEnumDeclaration;
+exports.isTSEnumMember = isTSEnumMember;
+exports.isTSModuleDeclaration = isTSModuleDeclaration;
+exports.isTSModuleBlock = isTSModuleBlock;
+exports.isTSImportType = isTSImportType;
+exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
+exports.isTSExternalModuleReference = isTSExternalModuleReference;
+exports.isTSNonNullExpression = isTSNonNullExpression;
+exports.isTSExportAssignment = isTSExportAssignment;
+exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
+exports.isTSTypeAnnotation = isTSTypeAnnotation;
+exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
+exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
+exports.isTSTypeParameter = isTSTypeParameter;
+exports.isExpression = isExpression;
+exports.isBinary = isBinary;
+exports.isScopable = isScopable;
+exports.isBlockParent = isBlockParent;
+exports.isBlock = isBlock;
+exports.isStatement = isStatement;
+exports.isTerminatorless = isTerminatorless;
+exports.isCompletionStatement = isCompletionStatement;
+exports.isConditional = isConditional;
+exports.isLoop = isLoop;
+exports.isWhile = isWhile;
+exports.isExpressionWrapper = isExpressionWrapper;
+exports.isFor = isFor;
+exports.isForXStatement = isForXStatement;
+exports.isFunction = isFunction;
+exports.isFunctionParent = isFunctionParent;
+exports.isPureish = isPureish;
+exports.isDeclaration = isDeclaration;
+exports.isPatternLike = isPatternLike;
+exports.isLVal = isLVal;
+exports.isTSEntityName = isTSEntityName;
+exports.isLiteral = isLiteral;
+exports.isImmutable = isImmutable;
+exports.isUserWhitespacable = isUserWhitespacable;
+exports.isMethod = isMethod;
+exports.isObjectMember = isObjectMember;
+exports.isProperty = isProperty;
+exports.isUnaryLike = isUnaryLike;
+exports.isPattern = isPattern;
+exports.isClass = isClass;
+exports.isModuleDeclaration = isModuleDeclaration;
+exports.isExportDeclaration = isExportDeclaration;
+exports.isModuleSpecifier = isModuleSpecifier;
+exports.isFlow = isFlow;
+exports.isFlowType = isFlowType;
+exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
+exports.isFlowDeclaration = isFlowDeclaration;
+exports.isFlowPredicate = isFlowPredicate;
+exports.isEnumBody = isEnumBody;
+exports.isEnumMember = isEnumMember;
+exports.isJSX = isJSX;
+exports.isPrivate = isPrivate;
+exports.isTSTypeElement = isTSTypeElement;
+exports.isTSType = isTSType;
+exports.isTSBaseType = isTSBaseType;
+exports.isNumberLiteral = isNumberLiteral;
+exports.isRegexLiteral = isRegexLiteral;
+exports.isRestProperty = isRestProperty;
+exports.isSpreadProperty = isSpreadProperty;
+
+var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function isArrayExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAssignmentExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AssignmentExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBinaryExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BinaryExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterpreterDirective(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterpreterDirective") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDirective(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Directive") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDirectiveLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DirectiveLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlockStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BlockStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBreakStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BreakStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCallExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "CallExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCatchClause(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "CatchClause") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isConditionalExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ConditionalExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isContinueStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ContinueStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDebuggerStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DebuggerStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDoWhileStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DoWhileStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEmptyStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EmptyStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpressionStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExpressionStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFile(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "File") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForInStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForInStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Identifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIfStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "IfStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLabeledStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "LabeledStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumericLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumericLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRegExpLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RegExpLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLogicalExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "LogicalExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNewExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NewExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isProgram(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Program") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRestElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RestElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isReturnStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ReturnStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSequenceExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SequenceExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isParenthesizedExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ParenthesizedExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSwitchCase(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SwitchCase") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSwitchStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SwitchStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThisExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThisExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThrowStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThrowStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTryStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TryStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnaryExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UnaryExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUpdateExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UpdateExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariableDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VariableDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariableDeclarator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VariableDeclarator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWhileStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "WhileStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWithStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "WithStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAssignmentPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AssignmentPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrayPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrowFunctionExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrowFunctionExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportAllDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportAllDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDefaultDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportDefaultDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportNamedDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportNamedDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForOfStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForOfStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportDefaultSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportDefaultSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportNamespaceSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportNamespaceSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMetaProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MetaProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSpreadElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SpreadElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSuper(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Super") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTaggedTemplateExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TaggedTemplateExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTemplateElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TemplateElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTemplateLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TemplateLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isYieldExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "YieldExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAwaitExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AwaitExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImport(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Import") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBigIntLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BigIntLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportNamespaceSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportNamespaceSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOptionalMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OptionalMemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOptionalCallExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OptionalCallExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAnyTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AnyTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrayTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassImplements(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassImplements") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareClass(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareClass") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareInterface(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareInterface") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareModule(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareModule") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareModuleExports(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareModuleExports") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareTypeAlias(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareTypeAlias") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareOpaqueType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareOpaqueType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareVariable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareVariable") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareExportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareExportAllDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareExportAllDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclaredPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclaredPredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExistsTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExistsTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionTypeParam(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionTypeParam") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isGenericTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "GenericTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInferredPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InferredPredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceExtends(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceExtends") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIntersectionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "IntersectionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMixedTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MixedTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEmptyTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EmptyTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullableTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullableTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeInternalSlot(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeInternalSlot") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeCallProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeCallProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeIndexer(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeIndexer") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeSpreadProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeSpreadProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOpaqueType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OpaqueType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isQualifiedTypeIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "QualifiedTypeIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSymbolTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SymbolTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThisTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThisTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTupleTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TupleTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeofTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeofTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeAlias(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeAlias") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeCastExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeCastExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameter(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameter") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameterDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameterDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameterInstantiation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameterInstantiation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UnionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariance(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Variance") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVoidTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VoidTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBooleanBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumBooleanBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumNumberBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumNumberBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumStringBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumStringBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumSymbolBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumSymbolBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBooleanMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumBooleanMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumNumberMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumNumberMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumStringMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumStringMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumDefaultedMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumDefaultedMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXClosingElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXClosingElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXEmptyExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXEmptyExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXExpressionContainer(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXExpressionContainer") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXSpreadChild(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXSpreadChild") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXMemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXNamespacedName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXNamespacedName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXOpeningElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXOpeningElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXSpreadAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXSpreadAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXText(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXText") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXOpeningFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXOpeningFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXClosingFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXClosingFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNoop(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Noop") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPlaceholder(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Placeholder") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isV8IntrinsicIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "V8IntrinsicIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArgumentPlaceholder(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArgumentPlaceholder") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBindExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BindExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelineTopicExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelineTopicExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelineBareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelineBareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelinePrimaryTopicReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelinePrimaryTopicReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassPrivateProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassPrivateProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassPrivateMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassPrivateMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDecorator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Decorator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDoExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DoExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDefaultSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportDefaultSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPrivateName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PrivateName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRecordExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RecordExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTupleExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TupleExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDecimalLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DecimalLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStaticBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StaticBlock") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSParameterProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSParameterProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSDeclareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSDeclareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSDeclareMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSDeclareMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSQualifiedName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSQualifiedName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSCallSignatureDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSCallSignatureDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConstructSignatureDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConstructSignatureDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSPropertySignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSPropertySignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSMethodSignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSMethodSignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIndexSignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIndexSignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSAnyKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSAnyKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBooleanKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSBooleanKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBigIntKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSBigIntKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIntrinsicKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIntrinsicKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNeverKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNeverKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNullKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNullKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNumberKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNumberKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSObjectKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSObjectKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSStringKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSStringKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSSymbolKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSSymbolKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUndefinedKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUndefinedKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUnknownKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUnknownKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSVoidKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSVoidKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSThisType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSThisType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSFunctionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSFunctionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConstructorType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConstructorType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypePredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypePredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeQuery(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeQuery") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSArrayType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSArrayType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTupleType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTupleType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSOptionalType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSOptionalType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSRestType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSRestType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNamedTupleMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNamedTupleMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUnionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUnionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIntersectionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIntersectionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConditionalType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConditionalType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInferType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInferType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSParenthesizedType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSParenthesizedType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeOperator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeOperator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIndexedAccessType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIndexedAccessType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSMappedType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSMappedType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSLiteralType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSLiteralType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExpressionWithTypeArguments(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExpressionWithTypeArguments") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInterfaceDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInterfaceDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInterfaceBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInterfaceBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAliasDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAliasDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSAsExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSAsExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAssertion(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAssertion") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEnumDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEnumDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEnumMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEnumMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSModuleDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSModuleDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSModuleBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSModuleBlock") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSImportType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSImportType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSImportEqualsDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSImportEqualsDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExternalModuleReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExternalModuleReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNonNullExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNonNullExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExportAssignment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExportAssignment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNamespaceExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNamespaceExportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameterInstantiation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameterInstantiation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameterDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameterDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameter(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameter") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBinary(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isScopable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlockParent(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTerminatorless(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCompletionStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isConditional(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLoop(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWhile(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpressionWrapper(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFor(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForXStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionParent(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPureish(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPatternLike(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLVal(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEntityName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImmutable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUserWhitespacable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnaryLike(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClass(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Class" || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isModuleDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isModuleSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlow(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowBaseAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumBody" || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumMember" || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSX(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPrivate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBaseType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSBaseType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberLiteral(node, opts) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRegexLiteral(node, opts) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RegexLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRestProperty(node, opts) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RestProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSpreadProperty(node, opts) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SpreadProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js
index a68c1088615..a68c1088615 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/is.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/is.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js
index e18ad197604..e18ad197604 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBinding.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBinding.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBlockScoped.js
index 7e6549e03b1..7e6549e03b1 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isBlockScoped.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isBlockScoped.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js
index b00b23d4ce0..b00b23d4ce0 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isImmutable.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isImmutable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isLet.js
index 93d75628082..93d75628082 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isLet.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isLet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNode.js
index e88a47aac45..e88a47aac45 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNode.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNode.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
new file mode 100644
index 00000000000..b418c6a2d1d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
@@ -0,0 +1,67 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isNodesEquivalent;
+
+var _definitions = require("../definitions");
+
+function isNodesEquivalent(a, b) {
+ if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
+ return a === b;
+ }
+
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
+ const visitorKeys = _definitions.VISITOR_KEYS[a.type];
+
+ for (const field of fields) {
+ if (typeof a[field] !== typeof b[field]) {
+ return false;
+ }
+
+ if (a[field] == null && b[field] == null) {
+ continue;
+ } else if (a[field] == null || b[field] == null) {
+ return false;
+ }
+
+ if (Array.isArray(a[field])) {
+ if (!Array.isArray(b[field])) {
+ return false;
+ }
+
+ if (a[field].length !== b[field].length) {
+ return false;
+ }
+
+ for (let i = 0; i < a[field].length; i++) {
+ if (!isNodesEquivalent(a[field][i], b[field][i])) {
+ return false;
+ }
+ }
+
+ continue;
+ }
+
+ if (typeof a[field] === "object" && !(visitorKeys == null ? void 0 : visitorKeys.includes(field))) {
+ for (const key of Object.keys(a[field])) {
+ if (a[field][key] !== b[field][key]) {
+ return false;
+ }
+ }
+
+ continue;
+ }
+
+ if (!isNodesEquivalent(a[field], b[field])) {
+ return false;
+ }
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js
index e8271de0b1c..e8271de0b1c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isPlaceholderType.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isPlaceholderType.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js
new file mode 100644
index 00000000000..8fd1662348c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isReferenced.js
@@ -0,0 +1,116 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isReferenced;
+
+function isReferenced(node, parent, grandparent) {
+ switch (parent.type) {
+ case "MemberExpression":
+ case "JSXMemberExpression":
+ case "OptionalMemberExpression":
+ if (parent.property === node) {
+ return !!parent.computed;
+ }
+
+ return parent.object === node;
+
+ case "VariableDeclarator":
+ return parent.init === node;
+
+ case "ArrowFunctionExpression":
+ return parent.body === node;
+
+ case "ExportSpecifier":
+ if (parent.source) {
+ return false;
+ }
+
+ return parent.local === node;
+
+ case "PrivateName":
+ return false;
+
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ case "ObjectMethod":
+ if (parent.params.includes(node)) {
+ return false;
+ }
+
+ case "ObjectProperty":
+ case "ClassProperty":
+ case "ClassPrivateProperty":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ if (parent.value === node) {
+ return !grandparent || grandparent.type !== "ObjectPattern";
+ }
+
+ return true;
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ return parent.superClass === node;
+
+ case "AssignmentExpression":
+ return parent.right === node;
+
+ case "AssignmentPattern":
+ return parent.right === node;
+
+ case "LabeledStatement":
+ return false;
+
+ case "CatchClause":
+ return false;
+
+ case "RestElement":
+ return false;
+
+ case "BreakStatement":
+ case "ContinueStatement":
+ return false;
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ return false;
+
+ case "ExportNamespaceSpecifier":
+ case "ExportDefaultSpecifier":
+ return false;
+
+ case "ImportDefaultSpecifier":
+ case "ImportNamespaceSpecifier":
+ case "ImportSpecifier":
+ return false;
+
+ case "JSXAttribute":
+ return false;
+
+ case "ObjectPattern":
+ case "ArrayPattern":
+ return false;
+
+ case "MetaProperty":
+ return false;
+
+ case "ObjectTypeProperty":
+ return parent.key !== node;
+
+ case "TSEnumMember":
+ return parent.id !== node;
+
+ case "TSPropertySignature":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ return true;
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js
new file mode 100644
index 00000000000..0f82449cce7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isScope.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isScope;
+
+var _generated = require("./generated");
+
+function isScope(node, parent) {
+ if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
+ return false;
+ }
+
+ if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
+ return true;
+ }
+
+ return (0, _generated.isScopable)(node);
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
index 25431cc2732..25431cc2732 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js
index 59d31dfbbfc..59d31dfbbfc 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isType.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isType.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
index 8455cab269b..8455cab269b 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js
new file mode 100644
index 00000000000..c1adb9afe0d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isValidIdentifier.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isValidIdentifier;
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+function isValidIdentifier(name, reserved = true) {
+ if (typeof name !== "string") return false;
+
+ if (reserved) {
+ if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name)) {
+ return false;
+ } else if (name === "await") {
+ return false;
+ }
+ }
+
+ return (0, _helperValidatorIdentifier.isIdentifierName)(name);
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isVar.js
index a34801d18fe..a34801d18fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isVar.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/isVar.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js
index 538e011f4ca..538e011f4ca 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/matchesPattern.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/matchesPattern.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isCompatTag.js
index 57761c2b1b1..57761c2b1b1 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isCompatTag.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isCompatTag.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js
index 33b30d71e97..33b30d71e97 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/react/isReactComponent.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js
new file mode 100644
index 00000000000..0d152a22cf4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/lib/validators/validate.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = validate;
+exports.validateField = validateField;
+exports.validateChild = validateChild;
+
+var _definitions = require("../definitions");
+
+function validate(node, key, val) {
+ if (!node) return;
+ const fields = _definitions.NODE_FIELDS[node.type];
+ if (!fields) return;
+ const field = fields[key];
+ validateField(node, key, val, field);
+ validateChild(node, key, val);
+}
+
+function validateField(node, key, val, field) {
+ if (!(field == null ? void 0 : field.validate)) return;
+ if (field.optional && val == null) return;
+ field.validate(node, key, val);
+}
+
+function validateChild(node, key, val) {
+ if (val == null) return;
+ const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type];
+ if (!validate) return;
+ validate(node, key, val);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/package.json b/tools/node_modules/@babel/core/node_modules/@babel/types/package.json
new file mode 100644
index 00000000000..7a3a503ea30
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "@babel/types",
+ "version": "7.12.7",
+ "description": "Babel Types is a Lodash-esque utility library for AST nodes",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-types"
+ },
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
+ "typesVersions": {
+ ">=3.7": {
+ "lib/index.d.ts": [
+ "lib/index-ts3.7.d.ts"
+ ]
+ }
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.10.4",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ },
+ "devDependencies": {
+ "@babel/generator": "7.12.5",
+ "@babel/parser": "7.12.7",
+ "chalk": "^4.1.0"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js
index bf0b036c189..bf0b036c189 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generateTypeHelpers.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generateTypeHelpers.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js
new file mode 100644
index 00000000000..169894895b3
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/docs.js
@@ -0,0 +1,121 @@
+"use strict";
+
+const util = require("util");
+const stringifyValidator = require("../utils/stringifyValidator");
+const toFunctionName = require("../utils/toFunctionName");
+
+const types = require("../../");
+
+const readme = [
+ `# @babel/types
+
+> This module contains methods for building ASTs manually and for checking the types of AST nodes.
+
+## Install
+
+\`\`\`sh
+npm install --save-dev @babel/types
+\`\`\`
+
+## API`,
+];
+
+const customTypes = {
+ ClassMethod: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+ Identifier: {
+ name: "`string`",
+ },
+ MemberExpression: {
+ property: "if computed then `Expression` else `Identifier`",
+ },
+ ObjectMethod: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+ ObjectProperty: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+};
+Object.keys(types.BUILDER_KEYS)
+ .sort()
+ .forEach(function (key) {
+ readme.push("### " + key[0].toLowerCase() + key.substr(1));
+ readme.push("```javascript");
+ readme.push(
+ "t." +
+ toFunctionName(key) +
+ "(" +
+ types.BUILDER_KEYS[key].join(", ") +
+ ")"
+ );
+ readme.push("```");
+ readme.push("");
+ readme.push(
+ "See also `t.is" +
+ key +
+ "(node, opts)` and `t.assert" +
+ key +
+ "(node, opts)`."
+ );
+ readme.push("");
+ if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) {
+ readme.push(
+ "Aliases: " +
+ types.ALIAS_KEYS[key]
+ .map(function (key) {
+ return "`" + key + "`";
+ })
+ .join(", ")
+ );
+ readme.push("");
+ }
+ Object.keys(types.NODE_FIELDS[key])
+ .sort(function (fieldA, fieldB) {
+ const indexA = types.BUILDER_KEYS[key].indexOf(fieldA);
+ const indexB = types.BUILDER_KEYS[key].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ })
+ .forEach(function (field) {
+ const defaultValue = types.NODE_FIELDS[key][field].default;
+ const fieldDescription = ["`" + field + "`"];
+ const validator = types.NODE_FIELDS[key][field].validate;
+ if (customTypes[key] && customTypes[key][field]) {
+ fieldDescription.push(`: ${customTypes[key][field]}`);
+ } else if (validator) {
+ try {
+ fieldDescription.push(
+ ": `" + stringifyValidator(validator, "") + "`"
+ );
+ } catch (ex) {
+ if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") {
+ console.log(
+ "Unrecognised validator type for " + key + "." + field
+ );
+ console.dir(ex.validator, { depth: 10, colors: true });
+ }
+ }
+ }
+ if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) {
+ fieldDescription.push(
+ " (default: `" + util.inspect(defaultValue) + "`"
+ );
+ if (types.BUILDER_KEYS[key].indexOf(field) < 0) {
+ fieldDescription.push(", excluded from builder function");
+ }
+ fieldDescription.push(")");
+ } else {
+ fieldDescription.push(" (required)");
+ }
+ readme.push(" - " + fieldDescription.join(""));
+ });
+
+ readme.push("");
+ readme.push("---");
+ readme.push("");
+ });
+
+process.stdout.write(readme.join("\n"));
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js
new file mode 100644
index 00000000000..2a91703353d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/flow.js
@@ -0,0 +1,257 @@
+"use strict";
+
+const t = require("../../");
+const stringifyValidator = require("../utils/stringifyValidator");
+const toFunctionName = require("../utils/toFunctionName");
+
+const NODE_PREFIX = "BabelNode";
+
+let code = `// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/flow.js for script used.
+
+declare class ${NODE_PREFIX}Comment {
+ value: string;
+ start: number;
+ end: number;
+ loc: ${NODE_PREFIX}SourceLocation;
+}
+
+declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment {
+ type: "CommentBlock";
+}
+
+declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment {
+ type: "CommentLine";
+}
+
+declare class ${NODE_PREFIX}SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+declare class ${NODE_PREFIX} {
+ leadingComments?: Array<${NODE_PREFIX}Comment>;
+ innerComments?: Array<${NODE_PREFIX}Comment>;
+ trailingComments?: Array<${NODE_PREFIX}Comment>;
+ start: ?number;
+ end: ?number;
+ loc: ?${NODE_PREFIX}SourceLocation;
+ extra?: { [string]: mixed };
+}\n\n`;
+
+//
+
+const lines = [];
+
+for (const type in t.NODE_FIELDS) {
+ const fields = t.NODE_FIELDS[type];
+
+ const struct = ['type: "' + type + '";'];
+ const args = [];
+ const builderNames = t.BUILDER_KEYS[type];
+
+ Object.keys(t.NODE_FIELDS[type])
+ .sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ })
+ .forEach(fieldName => {
+ const field = fields[fieldName];
+
+ let suffix = "";
+ if (field.optional || field.default != null) suffix += "?";
+
+ let typeAnnotation = "any";
+
+ const validate = field.validate;
+ if (validate) {
+ typeAnnotation = stringifyValidator(validate, NODE_PREFIX);
+ }
+
+ if (typeAnnotation) {
+ suffix += ": " + typeAnnotation;
+ }
+ if (builderNames.includes(fieldName)) {
+ args.push(t.toBindingIdentifierName(fieldName) + suffix);
+ }
+
+ if (t.isValidIdentifier(fieldName)) {
+ struct.push(fieldName + suffix + ";");
+ }
+ });
+
+ code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} {
+ ${struct.join("\n ").trim()}
+}\n\n`;
+
+ // Flow chokes on super() and import() :/
+ if (type !== "Super" && type !== "Import") {
+ lines.push(
+ `declare function ${toFunctionName(type)}(${args.join(
+ ", "
+ )}): ${NODE_PREFIX}${type};`
+ );
+ } else {
+ const functionName = toFunctionName(type);
+ lines.push(
+ `declare function _${functionName}(${args.join(
+ ", "
+ )}): ${NODE_PREFIX}${type};`,
+ `declare export { _${functionName} as ${functionName} }`
+ );
+ }
+}
+
+for (const typeName of t.TYPES) {
+ const isDeprecated = !!t.DEPRECATED_KEYS[typeName];
+ const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName;
+
+ let decl = `declare function is${typeName}(node: ?Object, opts?: ?Object): boolean`;
+ if (t.NODE_FIELDS[realName]) {
+ decl += ` %checks (node instanceof ${NODE_PREFIX}${realName})`;
+ }
+ lines.push(decl);
+
+ lines.push(
+ `declare function assert${typeName}(node: ?Object, opts?: ?Object): void`
+ );
+}
+
+lines.push(
+ // assert/
+ `declare function assertNode(obj: any): void`,
+
+ // builders/
+ // eslint-disable-next-line max-len
+ `declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`,
+ // eslint-disable-next-line max-len
+ `declare function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
+ // eslint-disable-next-line max-len
+ `declare function createFlowUnionType(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
+ // this smells like "internal API"
+ // eslint-disable-next-line max-len
+ `declare function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`,
+
+ // clone/
+ `declare function clone<T>(n: T): T;`,
+ `declare function cloneDeep<T>(n: T): T;`,
+ `declare function cloneDeepWithoutLoc<T>(n: T): T;`,
+ `declare function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;`,
+ `declare function cloneWithoutLoc<T>(n: T): T;`,
+
+ // comments/
+ `declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`,
+ // eslint-disable-next-line max-len
+ `declare function addComment<T: Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `declare function addComments<T: Node>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T`,
+ `declare function inheritInnerComments(node: Node, parent: Node): void`,
+ `declare function inheritLeadingComments(node: Node, parent: Node): void`,
+ `declare function inheritsComments<T: Node>(node: T, parent: Node): void`,
+ `declare function inheritTrailingComments(node: Node, parent: Node): void`,
+ `declare function removeComments<T: Node>(node: T): T`,
+
+ // converters/
+ `declare function ensureBlock(node: ${NODE_PREFIX}, key: string): ${NODE_PREFIX}BlockStatement`,
+ `declare function toBindingIdentifierName(name?: ?string): string`,
+ // eslint-disable-next-line max-len
+ `declare function toBlock(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Expression, parent?: ${NODE_PREFIX}Function | null): ${NODE_PREFIX}BlockStatement`,
+ // eslint-disable-next-line max-len
+ `declare function toComputedKey(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}Expression | ${NODE_PREFIX}Identifier): ${NODE_PREFIX}Expression`,
+ // eslint-disable-next-line max-len
+ `declare function toExpression(node: ${NODE_PREFIX}ExpressionStatement | ${NODE_PREFIX}Expression | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function): ${NODE_PREFIX}Expression`,
+ `declare function toIdentifier(name?: ?string): string`,
+ // eslint-disable-next-line max-len
+ `declare function toKeyAlias(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}): string`,
+ // toSequenceExpression relies on types that aren't declared in flow
+ // eslint-disable-next-line max-len
+ `declare function toStatement(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function | ${NODE_PREFIX}AssignmentExpression, ignore?: boolean): ${NODE_PREFIX}Statement | void`,
+ `declare function valueToNode(value: any): ${NODE_PREFIX}Expression`,
+
+ // modifications/
+ // eslint-disable-next-line max-len
+ `declare function removeTypeDuplicates(types: Array<${NODE_PREFIX}FlowType>): Array<${NODE_PREFIX}FlowType>`,
+ // eslint-disable-next-line max-len
+ `declare function appendToMemberExpression(member: ${NODE_PREFIX}MemberExpression, append: ${NODE_PREFIX}, computed?: boolean): ${NODE_PREFIX}MemberExpression`,
+ // eslint-disable-next-line max-len
+ `declare function inherits<T: Node>(child: T, parent: ${NODE_PREFIX} | null | void): T`,
+ // eslint-disable-next-line max-len
+ `declare function prependToMemberExpression(member: ${NODE_PREFIX}MemberExpression, prepend: ${NODE_PREFIX}Expression): ${NODE_PREFIX}MemberExpression`,
+ `declare function removeProperties<T>(n: T, opts: ?{}): void;`,
+ `declare function removePropertiesDeep<T>(n: T, opts: ?{}): T;`,
+
+ // retrievers/
+ // eslint-disable-next-line max-len
+ `declare function getBindingIdentifiers(node: ${NODE_PREFIX}, duplicates: boolean, outerOnly?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`,
+ // eslint-disable-next-line max-len
+ `declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`,
+
+ // traverse/
+ `declare type TraversalAncestors = Array<{
+ node: BabelNode,
+ key: string,
+ index?: number,
+ }>;
+ declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
+ declare type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };`.replace(/(^|\n) {2}/g, "$1"),
+ // eslint-disable-next-line
+ `declare function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`,
+ `declare function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;`,
+
+ // utils/
+ // cleanJSXElementLiteralChild is not exported
+ // inherit is not exported
+ `declare function shallowEqual(actual: Object, expected: Object): boolean`,
+
+ // validators/
+ // eslint-disable-next-line max-len
+ `declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean`,
+ `declare function is(type: string, n: BabelNode, opts: Object): boolean;`,
+ `declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`,
+ `declare function isBlockScoped(node: BabelNode): boolean`,
+ `declare function isImmutable(node: BabelNode): boolean`,
+ `declare function isLet(node: BabelNode): boolean`,
+ `declare function isNode(node: ?Object): boolean`,
+ `declare function isNodesEquivalent(a: any, b: any): boolean`,
+ `declare function isPlaceholderType(placeholderType: string, targetType: string): boolean`,
+ `declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`,
+ `declare function isScope(node: BabelNode, parent: BabelNode): boolean`,
+ `declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean`,
+ `declare function isType(nodetype: ?string, targetType: string): boolean`,
+ `declare function isValidES3Identifier(name: string): boolean`,
+ `declare function isValidES3Identifier(name: string): boolean`,
+ `declare function isValidIdentifier(name: string): boolean`,
+ `declare function isVar(node: BabelNode): boolean`,
+ // eslint-disable-next-line max-len
+ `declare function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean`,
+ `declare function validate(n: BabelNode, key: string, value: mixed): void;`
+);
+
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ const types = t.FLIPPED_ALIAS_KEYS[type];
+ code += `type ${NODE_PREFIX}${type} = ${types
+ .map(type => `${NODE_PREFIX}${type}`)
+ .join(" | ")};\n`;
+}
+
+code += `\ndeclare module "@babel/types" {
+ ${lines.join("\n").replace(/\n/g, "\n ").trim()}
+}\n`;
+
+//
+
+process.stdout.write(code);
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js
new file mode 100644
index 00000000000..26bdb8dccbe
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateAsserts.js
@@ -0,0 +1,44 @@
+"use strict";
+const definitions = require("../../lib/definitions");
+
+function addAssertHelper(type) {
+ return `export function assert${type}(node: Object, opts?: Object = {}): void {
+ assert("${type}", node, opts) }
+ `;
+}
+
+module.exports = function generateAsserts() {
+ let output = `// @flow
+/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import is from "../../validators/is";
+
+function assert(type: string, node: Object, opts?: Object): void {
+ if (!is(type, node, opts)) {
+ throw new Error(
+ \`Expected type "\${type}" with option \${JSON.stringify((opts: any))}, \` +
+ \`but instead got "\${node.type}".\`,
+ );
+ }
+}\n\n`;
+
+ Object.keys(definitions.VISITOR_KEYS).forEach(type => {
+ output += addAssertHelper(type);
+ });
+
+ Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
+ output += addAssertHelper(type);
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const newType = definitions.DEPRECATED_KEYS[type];
+ output += `export function assert${type}(node: Object, opts: Object): void {
+ console.trace("The node type ${type} has been renamed to ${newType}");
+ assert("${type}", node, opts);
+}\n`;
+ });
+
+ return output;
+};
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js
new file mode 100644
index 00000000000..5ca9f74643a
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateBuilders.js
@@ -0,0 +1,57 @@
+"use strict";
+const definitions = require("../../lib/definitions");
+const formatBuilderName = require("../utils/formatBuilderName");
+const lowerFirst = require("../utils/lowerFirst");
+
+module.exports = function generateBuilders() {
+ let output = `// @flow
+/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import builder from "../builder";\n\n`;
+
+ const reservedNames = new Set(["super", "import"]);
+ Object.keys(definitions.BUILDER_KEYS).forEach(type => {
+ const formatedBuilderName = formatBuilderName(type);
+ const formatedBuilderNameLocal = reservedNames.has(formatedBuilderName)
+ ? `_${formatedBuilderName}`
+ : formatedBuilderName;
+ output += `${
+ formatedBuilderNameLocal === formatedBuilderName ? "export " : ""
+ }function ${formatedBuilderNameLocal}(...args: Array<any>): Object { return builder("${type}", ...args); }\n`;
+ // This is needed for backwards compatibility.
+ // arrayExpression -> ArrayExpression
+ output += `export { ${formatedBuilderNameLocal} as ${type} };\n`;
+ if (formatedBuilderNameLocal !== formatedBuilderName) {
+ output += `export { ${formatedBuilderNameLocal} as ${formatedBuilderName} };\n`;
+ }
+
+ // This is needed for backwards compatibility.
+ // It should be removed in the next major version.
+ // JSXIdentifier -> jSXIdentifier
+ if (/^[A-Z]{2}/.test(type)) {
+ output += `export { ${formatedBuilderNameLocal} as ${lowerFirst(
+ type
+ )} }\n`;
+ }
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const newType = definitions.DEPRECATED_KEYS[type];
+ output += `export function ${type}(...args: Array<any>): Object {
+ console.trace("The node type ${type} has been renamed to ${newType}");
+ return builder("${type}", ...args);
+}
+export { ${type} as ${formatBuilderName(type)} };\n`;
+
+ // This is needed for backwards compatibility.
+ // It should be removed in the next major version.
+ // JSXIdentifier -> jSXIdentifier
+ if (/^[A-Z]{2}/.test(type)) {
+ output += `export { ${type} as ${lowerFirst(type)} }\n`;
+ }
+ });
+
+ return output;
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateConstants.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateConstants.js
index 1e4d2cabaec..1e4d2cabaec 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateConstants.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateConstants.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js
index 1455f99e5b6..1455f99e5b6 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateValidators.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/generateValidators.js
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js
new file mode 100644
index 00000000000..210124d829d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/generators/typescript.js
@@ -0,0 +1,381 @@
+"use strict";
+
+const t = require("../../");
+const stringifyValidator = require("../utils/stringifyValidator");
+const toFunctionName = require("../utils/toFunctionName");
+
+// For backward compat, we cannot use TS 3.7 syntax in published packages
+const ts3_7 = process.argv.includes("--ts3.7");
+
+// TypeScript 3.7: https://github.com/microsoft/TypeScript/pull/32695 will allow assert declarations
+const asserts = ts3_7 ? assertion => `asserts ${assertion}` : () => `void`;
+
+let code = `// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/typescript.js for script used.
+
+interface BaseComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: SourceLocation;
+ type: "CommentBlock" | "CommentLine";
+}
+
+export interface CommentBlock extends BaseComment {
+ type: "CommentBlock";
+}
+
+export interface CommentLine extends BaseComment {
+ type: "CommentLine";
+}
+
+export type Comment = CommentBlock | CommentLine;
+
+export interface SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+interface BaseNode {
+ leadingComments: ReadonlyArray<Comment> | null;
+ innerComments: ReadonlyArray<Comment> | null;
+ trailingComments: ReadonlyArray<Comment> | null;
+ start: number | null;
+ end: number | null;
+ loc: SourceLocation | null;
+ type: Node["type"];
+ extra?: Record<string, unknown>;
+}
+
+export type Node = ${t.TYPES.sort().join(" | ")};\n\n`;
+
+//
+
+const lines = [];
+
+for (const type in t.NODE_FIELDS) {
+ const fields = t.NODE_FIELDS[type];
+ const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type);
+ const builderNames = t.BUILDER_KEYS[type];
+
+ const struct = ['type: "' + type + '";'];
+ const args = [];
+
+ fieldNames.forEach(fieldName => {
+ const field = fields[fieldName];
+ // Future / annoying TODO:
+ // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either:
+ // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key,
+ // - declare an alias type for valid keys, detect the case and reuse it here,
+ // - declare a disjoint union with, for example, ObjectPropertyBase,
+ // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty
+ // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)"
+ let typeAnnotation = stringifyValidator(field.validate, "");
+
+ if (isNullable(field) && !hasDefault(field)) {
+ typeAnnotation += " | null";
+ }
+
+ if (builderNames.includes(fieldName)) {
+ if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) {
+ args.push(
+ `${t.toBindingIdentifierName(fieldName)}${
+ isNullable(field) ? "?:" : ":"
+ } ${typeAnnotation}`
+ );
+ } else {
+ args.push(
+ `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${
+ isNullable(field) ? " | undefined" : ""
+ }`
+ );
+ }
+ }
+
+ const alphaNumeric = /^\w+$/;
+
+ if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) {
+ struct.push(`${fieldName}: ${typeAnnotation};`);
+ } else {
+ struct.push(`"${fieldName}": ${typeAnnotation};`);
+ }
+ });
+
+ code += `export interface ${type} extends BaseNode {
+ ${struct.join("\n ").trim()}
+}\n\n`;
+
+ // super and import are reserved words in JavaScript
+ if (type !== "Super" && type !== "Import") {
+ lines.push(
+ `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};`
+ );
+ } else {
+ const functionName = toFunctionName(type);
+ lines.push(
+ `declare function _${functionName}(${args.join(", ")}): ${type};`,
+ `export { _${functionName} as ${functionName}}`
+ );
+ }
+}
+
+for (const typeName of t.TYPES) {
+ const isDeprecated = !!t.DEPRECATED_KEYS[typeName];
+ const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName;
+
+ const result =
+ t.NODE_FIELDS[realName] || t.FLIPPED_ALIAS_KEYS[realName]
+ ? `node is ${realName}`
+ : "boolean";
+
+ if (isDeprecated) {
+ lines.push(`/** @deprecated Use \`is${realName}\` */`);
+ }
+ lines.push(
+ `export function is${typeName}(node: object | null | undefined, opts?: object | null): ${result};`
+ );
+
+ if (isDeprecated) {
+ lines.push(`/** @deprecated Use \`assert${realName}\` */`);
+ }
+ lines.push(
+ `export function assert${typeName}(node: object | null | undefined, opts?: object | null): ${asserts(
+ result === "boolean" ? "node" : result
+ )};`
+ );
+}
+
+lines.push(
+ // assert/
+ `export function assertNode(obj: any): ${asserts("obj is Node")}`,
+
+ // builders/
+ // eslint-disable-next-line max-len
+ `export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`,
+ `export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T`,
+ `export function createFlowUnionType<T extends FlowType>(types: [T]): T`,
+ // this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1
+ // it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0
+ `export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
+ `export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
+ // this smells like "internal API"
+ // eslint-disable-next-line max-len
+ `export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children']`,
+
+ // clone/
+ `export function clone<T extends Node>(n: T): T;`,
+ `export function cloneDeep<T extends Node>(n: T): T;`,
+ `export function cloneDeepWithoutLoc<T extends Node>(n: T): T;`,
+ `export function cloneNode<T extends Node>(n: T, deep?: boolean, withoutLoc?: boolean): T;`,
+ `export function cloneWithoutLoc<T extends Node>(n: T): T;`,
+
+ // comments/
+ `export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`,
+ // eslint-disable-next-line max-len
+ `export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T`,
+ `export function inheritInnerComments(node: Node, parent: Node): void`,
+ `export function inheritLeadingComments(node: Node, parent: Node): void`,
+ `export function inheritsComments<T extends Node>(node: T, parent: Node): void`,
+ `export function inheritTrailingComments(node: Node, parent: Node): void`,
+ `export function removeComments<T extends Node>(node: T): T`,
+
+ // converters/
+ // eslint-disable-next-line max-len
+ `export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement`,
+ // too complex?
+ // eslint-disable-next-line max-len
+ `export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement`,
+ // gatherSequenceExpressions is not exported
+ `export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`,
+ `export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`,
+ // it is possible for `node` to be an arbitrary object if `key` is always provided,
+ // but that doesn't look like intended API
+ // eslint-disable-next-line max-len
+ `export function toComputedKey<T extends Extract<Node, { computed: boolean | null }>>(node: T, key?: Expression | Identifier): Expression`,
+ `export function toExpression(node: Function): FunctionExpression`,
+ `export function toExpression(node: Class): ClassExpression`,
+ `export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression`,
+ `export function toIdentifier(name: { toString(): string } | null | undefined): string`,
+ `export function toKeyAlias(node: Method | Property, key?: Node): string`,
+ // NOTE: this actually uses Scope from @babel/traverse, but we can't add a dependency on its types,
+ // as they live in @types. Declare the structural subset that is required.
+ // eslint-disable-next-line max-len
+ `export function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined`,
+ `export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement`,
+ `export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement`,
+ `export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined`,
+ `export function toStatement(node: Class, ignore?: boolean): ClassDeclaration`,
+ `export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined`,
+ `export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration`,
+ // eslint-disable-next-line max-len
+ `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined`,
+ // eslint-disable-next-line max-len
+ `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: undefined): Identifier`, // (should this not be a UnaryExpression to avoid shadowing?)
+ `export function valueToNode(value: boolean): BooleanLiteral`,
+ `export function valueToNode(value: null): NullLiteral`,
+ `export function valueToNode(value: string): StringLiteral`,
+ // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression
+ `export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression`,
+ `export function valueToNode(value: RegExp): RegExpLiteral`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: ReadonlyArray<undefined | boolean | null | string | number | RegExp | object>): ArrayExpression`,
+ // this throws with objects that are not PlainObject according to lodash,
+ // or if there are non-valueToNode-able values
+ `export function valueToNode(value: object): ObjectExpression`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression`,
+
+ // modifications/
+ // eslint-disable-next-line max-len
+ `export function removeTypeDuplicates(types: ReadonlyArray<FlowType | false | null | undefined>): FlowType[]`,
+ // eslint-disable-next-line max-len
+ `export function appendToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, append: MemberExpression['property'], computed?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `export function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T`,
+ // eslint-disable-next-line max-len
+ `export function prependToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, prepend: MemberExpression['object']): T`,
+ `export function removeProperties(
+ n: Node,
+ opts?: { preserveComments: boolean } | null
+): void;`,
+ `export function removePropertiesDeep<T extends Node>(
+ n: T,
+ opts?: { preserveComments: boolean } | null
+): T;`,
+
+ // retrievers/
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>`,
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>`,
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record<string, Identifier | Array<Identifier>>`,
+ // eslint-disable-next-line max-len
+ `export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record<string, Array<Identifier>>`,
+ `export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record<string, Identifier>`,
+ // eslint-disable-next-line max-len
+ `export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record<string, Identifier | Array<Identifier>>`,
+
+ // traverse/
+ `export type TraversalAncestors = ReadonlyArray<{
+ node: Node,
+ key: string,
+ index?: number,
+ }>;
+ export type TraversalHandler<T> = (
+ this: undefined, node: Node, parent: TraversalAncestors, type: T
+ ) => void;
+ export type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };`.replace(/(^|\n) {2}/g, "$1"),
+ // eslint-disable-next-line
+ `export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`,
+ `export function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;`,
+
+ // utils/
+ // cleanJSXElementLiteralChild is not exported
+ // inherit is not exported
+ `export function shallowEqual<T extends object>(actual: object, expected: T): actual is T`,
+
+ // validators/
+ // eslint-disable-next-line max-len
+ `export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression`,
+ // eslint-disable-next-line max-len
+ `export function is<T extends Node['type']>(type: T, n: Node | null | undefined, required?: undefined): n is Extract<Node, { type: T }>`,
+ // eslint-disable-next-line max-len
+ `export function is<T extends Node['type'], P extends Extract<Node, { type: T }>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P`,
+ // eslint-disable-next-line max-len
+ `export function is<P extends Node>(type: string, n: Node | null | undefined, required: Partial<P>): n is P`,
+ `export function is(type: string, n: Node | null | undefined, required?: Partial<Node>): n is Node`,
+ `export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean`,
+ // eslint-disable-next-line max-len
+ `export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration`,
+ `export function isImmutable(node: Node): node is Immutable`,
+ `export function isLet(node: Node): node is VariableDeclaration`,
+ `export function isNode(node: object | null | undefined): node is Node`,
+ `export function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T`,
+ `export function isNodesEquivalent(a: any, b: any): boolean`,
+ `export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean`,
+ `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`,
+ `export function isScope(node: Node, parent: Node): node is Scopable`,
+ `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`,
+ `export function isType<T extends Node['type']>(nodetype: string, targetType: T): nodetype is T`,
+ `export function isType(nodetype: string | null | undefined, targetType: string): boolean`,
+ `export function isValidES3Identifier(name: string): boolean`,
+ `export function isValidIdentifier(name: string): boolean`,
+ `export function isVar(node: Node): node is VariableDeclaration`,
+ // the MemberExpression implication is incidental, but it follows from the implementation
+ // eslint-disable-next-line max-len
+ `export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray<string>, allowPartial?: boolean): node is MemberExpression`,
+ // eslint-disable-next-line max-len
+ `export function validate<T extends Node, K extends keyof T>(n: Node | null | undefined, key: K, value: T[K]): ${asserts(
+ "n is T"
+ )}`,
+ `export function validate(n: Node, key: string, value: any): void;`
+);
+
+for (const type in t.DEPRECATED_KEYS) {
+ code += `/**
+ * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\`
+ */
+export type ${type} = ${t.DEPRECATED_KEYS[type]};\n
+`;
+}
+
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ const types = t.FLIPPED_ALIAS_KEYS[type];
+ code += `export type ${type} = ${types
+ .map(type => `${type}`)
+ .join(" | ")};\n`;
+}
+code += "\n";
+
+code += "export interface Aliases {\n";
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ code += ` ${type}: ${type};\n`;
+}
+code += "}\n\n";
+
+code += lines.join("\n") + "\n";
+
+//
+
+process.stdout.write(code);
+
+//
+
+function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) {
+ const index = fieldNames.indexOf(fieldName);
+ return fieldNames.slice(index).every(_ => isNullable(fields[_]));
+}
+
+function hasDefault(field) {
+ return field.default != null;
+}
+
+function isNullable(field) {
+ return field.optional || hasDefault(field);
+}
+
+function sortFieldNames(fields, type) {
+ return fields.sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+}
diff --git a/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js
new file mode 100644
index 00000000000..621c4682195
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/formatBuilderName.js
@@ -0,0 +1,10 @@
+"use strict";
+
+const toLowerCase = Function.call.bind("".toLowerCase);
+
+module.exports = function formatBuilderName(type) {
+ // FunctionExpression -> functionExpression
+ // JSXIdentifier -> jsxIdentifier
+ // V8IntrinsicIdentifier -> v8IntrinsicIdentifier
+ return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase);
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/lowerFirst.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/lowerFirst.js
index 9e7b0cee51c..9e7b0cee51c 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/lowerFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/lowerFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js
index 2ea1e80357d..2ea1e80357d 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/stringifyValidator.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/stringifyValidator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js
index 627c9a7d8f0..627c9a7d8f0 100644
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/toFunctionName.js
+++ b/tools/node_modules/@babel/core/node_modules/@babel/types/scripts/utils/toFunctionName.js
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js b/tools/node_modules/@babel/core/node_modules/ansi-styles/index.js
index 90a871c4d78..90a871c4d78 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/index.js
+++ b/tools/node_modules/@babel/core/node_modules/ansi-styles/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/license b/tools/node_modules/@babel/core/node_modules/ansi-styles/license
index e7af2f77107..e7af2f77107 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/license
+++ b/tools/node_modules/@babel/core/node_modules/ansi-styles/license
diff --git a/tools/node_modules/@babel/core/node_modules/ansi-styles/package.json b/tools/node_modules/@babel/core/node_modules/ansi-styles/package.json
new file mode 100644
index 00000000000..65edb48c399
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/ansi-styles/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "ansi-styles",
+ "version": "3.2.1",
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "license": "MIT",
+ "repository": "chalk/ansi-styles",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "babel-polyfill": "^6.23.0",
+ "svg-term-cli": "^2.1.1",
+ "xo": "*"
+ },
+ "ava": {
+ "require": "babel-polyfill"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md b/tools/node_modules/@babel/core/node_modules/ansi-styles/readme.md
index 3158e2df59c..3158e2df59c 100644
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/ansi-styles/readme.md
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/index.js b/tools/node_modules/@babel/core/node_modules/chalk/index.js
index 1cc5fa89a95..1cc5fa89a95 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/index.js
+++ b/tools/node_modules/@babel/core/node_modules/chalk/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow b/tools/node_modules/@babel/core/node_modules/chalk/index.js.flow
index 622caaa2e80..622caaa2e80 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/index.js.flow
+++ b/tools/node_modules/@babel/core/node_modules/chalk/index.js.flow
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/license b/tools/node_modules/@babel/core/node_modules/chalk/license
index e7af2f77107..e7af2f77107 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/license
+++ b/tools/node_modules/@babel/core/node_modules/chalk/license
diff --git a/tools/node_modules/@babel/core/node_modules/chalk/package.json b/tools/node_modules/@babel/core/node_modules/chalk/package.json
new file mode 100644
index 00000000000..bc324685a76
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/chalk/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "chalk",
+ "version": "2.4.2",
+ "description": "Terminal string styling done right",
+ "license": "MIT",
+ "repository": "chalk/chalk",
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava",
+ "bench": "matcha benchmark.js",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "index.js",
+ "templates.js",
+ "types/index.d.ts",
+ "index.js.flow"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "str",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "coveralls": "^3.0.0",
+ "execa": "^0.9.0",
+ "flow-bin": "^0.68.0",
+ "import-fresh": "^2.0.0",
+ "matcha": "^0.7.0",
+ "nyc": "^11.0.2",
+ "resolve-from": "^4.0.0",
+ "typescript": "^2.5.3",
+ "xo": "*"
+ },
+ "types": "types/index.d.ts",
+ "xo": {
+ "envs": [
+ "node",
+ "mocha"
+ ],
+ "ignores": [
+ "test/_flow.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/readme.md b/tools/node_modules/@babel/core/node_modules/chalk/readme.md
index d298e2c48d6..d298e2c48d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/chalk/readme.md
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/templates.js b/tools/node_modules/@babel/core/node_modules/chalk/templates.js
index dbdf9b22112..dbdf9b22112 100644
--- a/tools/node_modules/babel-eslint/node_modules/chalk/templates.js
+++ b/tools/node_modules/@babel/core/node_modules/chalk/templates.js
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/LICENSE b/tools/node_modules/@babel/core/node_modules/color-convert/LICENSE
index 5b4c386f926..5b4c386f926 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/README.md b/tools/node_modules/@babel/core/node_modules/color-convert/README.md
index d4b08fc3699..d4b08fc3699 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/README.md
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js b/tools/node_modules/@babel/core/node_modules/color-convert/conversions.js
index 32172007ec0..32172007ec0 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/conversions.js
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/conversions.js
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/index.js b/tools/node_modules/@babel/core/node_modules/color-convert/index.js
index e65b5d775da..e65b5d775da 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/index.js
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/index.js
diff --git a/tools/node_modules/@babel/core/node_modules/color-convert/package.json b/tools/node_modules/@babel/core/node_modules/color-convert/package.json
new file mode 100644
index 00000000000..dfbc471407f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "color-convert",
+ "description": "Plain color conversion functions",
+ "version": "1.9.3",
+ "author": "Heather Arthur <fayearthur@gmail.com>",
+ "license": "MIT",
+ "repository": "Qix-/color-convert",
+ "scripts": {
+ "pretest": "xo",
+ "test": "node test/basic.js"
+ },
+ "keywords": [
+ "color",
+ "colour",
+ "convert",
+ "converter",
+ "conversion",
+ "rgb",
+ "hsl",
+ "hsv",
+ "hwb",
+ "cmyk",
+ "ansi",
+ "ansi16"
+ ],
+ "files": [
+ "index.js",
+ "conversions.js",
+ "css-keywords.js",
+ "route.js"
+ ],
+ "xo": {
+ "rules": {
+ "default-case": 0,
+ "no-inline-comments": 0,
+ "operator-linebreak": 0
+ }
+ },
+ "devDependencies": {
+ "chalk": "1.1.1",
+ "xo": "0.11.2"
+ },
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/route.js b/tools/node_modules/@babel/core/node_modules/color-convert/route.js
index 0a1fdea689e..0a1fdea689e 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/route.js
+++ b/tools/node_modules/@babel/core/node_modules/color-convert/route.js
diff --git a/tools/node_modules/babel-eslint/node_modules/color-name/LICENSE b/tools/node_modules/@babel/core/node_modules/color-name/LICENSE
index c6b10012540..c6b10012540 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-name/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/color-name/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/color-name/README.md b/tools/node_modules/@babel/core/node_modules/color-name/README.md
index 932b979176f..932b979176f 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-name/README.md
+++ b/tools/node_modules/@babel/core/node_modules/color-name/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/color-name/index.js b/tools/node_modules/@babel/core/node_modules/color-name/index.js
index b7c198a6f3d..b7c198a6f3d 100644
--- a/tools/node_modules/babel-eslint/node_modules/color-name/index.js
+++ b/tools/node_modules/@babel/core/node_modules/color-name/index.js
diff --git a/tools/node_modules/@babel/core/node_modules/color-name/package.json b/tools/node_modules/@babel/core/node_modules/color-name/package.json
new file mode 100644
index 00000000000..d061123ef02
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/color-name/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "color-name",
+ "version": "1.1.3",
+ "description": "A list of color names and its values",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:dfcreative/color-name.git"
+ },
+ "keywords": [
+ "color-name",
+ "color",
+ "color-keyword",
+ "keyword"
+ ],
+ "author": "DY <dfcreative@gmail.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/dfcreative/color-name/issues"
+ },
+ "homepage": "https://github.com/dfcreative/color-name"
+}
diff --git a/tools/node_modules/@babel/core/node_modules/convert-source-map/LICENSE b/tools/node_modules/@babel/core/node_modules/convert-source-map/LICENSE
new file mode 100644
index 00000000000..41702c50434
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/convert-source-map/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2013 Thorsten Lorenz.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/convert-source-map/README.md b/tools/node_modules/@babel/core/node_modules/convert-source-map/README.md
new file mode 100644
index 00000000000..86b218e0518
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/convert-source-map/README.md
@@ -0,0 +1,125 @@
+# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.svg?branch=master)](http://travis-ci.org/thlorenz/convert-source-map)
+
+<a href="https://www.patreon.com/bePatron?u=8663953"><img alt="become a patron" src="https://c5.patreon.com/external/logo/become_a_patron_button.png" height="35px"></a>
+
+Converts a source-map from/to different formats and allows adding/changing properties.
+
+```js
+var convert = require('convert-source-map');
+
+var json = convert
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .toJSON();
+
+var modified = convert
+ .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=')
+ .setProperty('sources', [ 'SRC/FOO.JS' ])
+ .toJSON();
+
+console.log(json);
+console.log(modified);
+```
+
+```json
+{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
+{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"}
+```
+
+## API
+
+### fromObject(obj)
+
+Returns source map converter from given object.
+
+### fromJSON(json)
+
+Returns source map converter from given json string.
+
+### fromBase64(base64)
+
+Returns source map converter from given base64 encoded json string.
+
+### fromComment(comment)
+
+Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`.
+
+### fromMapFileComment(comment, mapFileDir)
+
+Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`.
+
+`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the
+generated file, i.e. the one containing the source map.
+
+### fromSource(source)
+
+Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found.
+
+### fromMapFileSource(source, mapFileDir)
+
+Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was
+found.
+
+The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see
+fromMapFileComment.
+
+### toObject()
+
+Returns a copy of the underlying source map.
+
+### toJSON([space])
+
+Converts source map to json string. If `space` is given (optional), this will be passed to
+[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the
+JSON string is generated.
+
+### toBase64()
+
+Converts source map to base64 encoded json string.
+
+### toComment([options])
+
+Converts source map to an inline comment that can be appended to the source-file.
+
+By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would
+normally see in a JS source file.
+
+When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
+
+### addProperty(key, value)
+
+Adds given property to the source map. Throws an error if property already exists.
+
+### setProperty(key, value)
+
+Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated.
+
+### getProperty(key)
+
+Gets given property of the source map.
+
+### removeComments(src)
+
+Returns `src` with all source map comments removed
+
+### removeMapFileComments(src)
+
+Returns `src` with all source map comments pointing to map files removed.
+
+### commentRegex
+
+Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments.
+
+### mapFileCommentRegex
+
+Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files.
+
+### generateMapFileComment(file, [options])
+
+Returns a comment that links to an external source map via `file`.
+
+By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file.
+
+When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file.
+
+
+[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
diff --git a/tools/node_modules/@babel/core/node_modules/convert-source-map/index.js b/tools/node_modules/@babel/core/node_modules/convert-source-map/index.js
new file mode 100644
index 00000000000..3aeae10484d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/convert-source-map/index.js
@@ -0,0 +1,136 @@
+'use strict';
+var fs = require('fs');
+var path = require('path');
+var SafeBuffer = require('safe-buffer');
+
+Object.defineProperty(exports, 'commentRegex', {
+ get: function getCommentRegex () {
+ return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
+ }
+});
+
+Object.defineProperty(exports, 'mapFileCommentRegex', {
+ get: function getMapFileCommentRegex () {
+ // Matches sourceMappingURL in either // or /* comment styles.
+ return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
+ }
+});
+
+
+function decodeBase64(base64) {
+ return SafeBuffer.Buffer.from(base64, 'base64').toString();
+}
+
+function stripComment(sm) {
+ return sm.split(',').pop();
+}
+
+function readFromFileMap(sm, dir) {
+ // NOTE: this will only work on the server since it attempts to read the map file
+
+ var r = exports.mapFileCommentRegex.exec(sm);
+
+ // for some odd reason //# .. captures in 1 and /* .. */ in 2
+ var filename = r[1] || r[2];
+ var filepath = path.resolve(dir, filename);
+
+ try {
+ return fs.readFileSync(filepath, 'utf8');
+ } catch (e) {
+ throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
+ }
+}
+
+function Converter (sm, opts) {
+ opts = opts || {};
+
+ if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
+ if (opts.hasComment) sm = stripComment(sm);
+ if (opts.isEncoded) sm = decodeBase64(sm);
+ if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
+
+ this.sourcemap = sm;
+}
+
+Converter.prototype.toJSON = function (space) {
+ return JSON.stringify(this.sourcemap, null, space);
+};
+
+Converter.prototype.toBase64 = function () {
+ var json = this.toJSON();
+ return SafeBuffer.Buffer.from(json, 'utf8').toString('base64');
+};
+
+Converter.prototype.toComment = function (options) {
+ var base64 = this.toBase64();
+ var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
+ return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
+};
+
+// returns copy instead of original
+Converter.prototype.toObject = function () {
+ return JSON.parse(this.toJSON());
+};
+
+Converter.prototype.addProperty = function (key, value) {
+ if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
+ return this.setProperty(key, value);
+};
+
+Converter.prototype.setProperty = function (key, value) {
+ this.sourcemap[key] = value;
+ return this;
+};
+
+Converter.prototype.getProperty = function (key) {
+ return this.sourcemap[key];
+};
+
+exports.fromObject = function (obj) {
+ return new Converter(obj);
+};
+
+exports.fromJSON = function (json) {
+ return new Converter(json, { isJSON: true });
+};
+
+exports.fromBase64 = function (base64) {
+ return new Converter(base64, { isEncoded: true });
+};
+
+exports.fromComment = function (comment) {
+ comment = comment
+ .replace(/^\/\*/g, '//')
+ .replace(/\*\/$/g, '');
+
+ return new Converter(comment, { isEncoded: true, hasComment: true });
+};
+
+exports.fromMapFileComment = function (comment, dir) {
+ return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
+};
+
+// Finds last sourcemap comment in file or returns null if none was found
+exports.fromSource = function (content) {
+ var m = content.match(exports.commentRegex);
+ return m ? exports.fromComment(m.pop()) : null;
+};
+
+// Finds last sourcemap comment in file or returns null if none was found
+exports.fromMapFileSource = function (content, dir) {
+ var m = content.match(exports.mapFileCommentRegex);
+ return m ? exports.fromMapFileComment(m.pop(), dir) : null;
+};
+
+exports.removeComments = function (src) {
+ return src.replace(exports.commentRegex, '');
+};
+
+exports.removeMapFileComments = function (src) {
+ return src.replace(exports.mapFileCommentRegex, '');
+};
+
+exports.generateMapFileComment = function (file, options) {
+ var data = 'sourceMappingURL=' + file;
+ return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
+};
diff --git a/tools/node_modules/@babel/core/node_modules/convert-source-map/package.json b/tools/node_modules/@babel/core/node_modules/convert-source-map/package.json
new file mode 100644
index 00000000000..c1a9592cfb0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/convert-source-map/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "convert-source-map",
+ "version": "1.7.0",
+ "description": "Converts a source-map from/to different formats and allows adding/changing properties.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap test/*.js --color"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/thlorenz/convert-source-map.git"
+ },
+ "homepage": "https://github.com/thlorenz/convert-source-map",
+ "dependencies": {
+ "safe-buffer": "~5.1.1"
+ },
+ "devDependencies": {
+ "inline-source-map": "~0.6.2",
+ "tap": "~9.0.0"
+ },
+ "keywords": [
+ "convert",
+ "sourcemap",
+ "source",
+ "map",
+ "browser",
+ "debug"
+ ],
+ "author": {
+ "name": "Thorsten Lorenz",
+ "email": "thlorenz@gmx.de",
+ "url": "http://thlorenz.com"
+ },
+ "license": "MIT",
+ "engine": {
+ "node": ">=0.6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "browser": {
+ "fs": false
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/LICENSE b/tools/node_modules/@babel/core/node_modules/debug/LICENSE
index 658c933d282..658c933d282 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/debug/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/README.md b/tools/node_modules/@babel/core/node_modules/debug/README.md
index 88dae35d9fc..88dae35d9fc 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/README.md
+++ b/tools/node_modules/@babel/core/node_modules/debug/README.md
diff --git a/tools/node_modules/@babel/core/node_modules/debug/package.json b/tools/node_modules/@babel/core/node_modules/debug/package.json
new file mode 100644
index 00000000000..da809d2b8d2
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/debug/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "debug",
+ "version": "4.3.1",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/visionmedia/debug.git"
+ },
+ "description": "small debugging utility",
+ "keywords": [
+ "debug",
+ "log",
+ "debugger"
+ ],
+ "files": [
+ "src",
+ "LICENSE",
+ "README.md"
+ ],
+ "author": "TJ Holowaychuk <tj@vision-media.ca>",
+ "contributors": [
+ "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+ "Andrew Rhyne <rhyneandrew@gmail.com>",
+ "Josh Junon <josh@junon.me>"
+ ],
+ "license": "MIT",
+ "scripts": {
+ "lint": "xo",
+ "test": "npm run test:node && npm run test:browser && npm run lint",
+ "test:node": "istanbul cover _mocha -- test.js",
+ "test:browser": "karma start --single-run",
+ "test:coverage": "cat ./coverage/lcov.info | coveralls"
+ },
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "devDependencies": {
+ "brfs": "^2.0.1",
+ "browserify": "^16.2.3",
+ "coveralls": "^3.0.2",
+ "istanbul": "^0.4.5",
+ "karma": "^3.1.4",
+ "karma-browserify": "^6.0.0",
+ "karma-chrome-launcher": "^2.2.0",
+ "karma-mocha": "^1.3.0",
+ "mocha": "^5.2.0",
+ "mocha-lcov-reporter": "^1.2.0",
+ "xo": "^0.23.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ },
+ "main": "./src/index.js",
+ "browser": "./src/browser.js",
+ "engines": {
+ "node": ">=6.0"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/debug/src/browser.js b/tools/node_modules/@babel/core/node_modules/debug/src/browser.js
new file mode 100644
index 00000000000..cd0fc35d1ee
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/debug/src/browser.js
@@ -0,0 +1,269 @@
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+exports.destroy = (() => {
+ let warned = false;
+
+ return () => {
+ if (!warned) {
+ warned = true;
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+ };
+})();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+ '#0000CC',
+ '#0000FF',
+ '#0033CC',
+ '#0033FF',
+ '#0066CC',
+ '#0066FF',
+ '#0099CC',
+ '#0099FF',
+ '#00CC00',
+ '#00CC33',
+ '#00CC66',
+ '#00CC99',
+ '#00CCCC',
+ '#00CCFF',
+ '#3300CC',
+ '#3300FF',
+ '#3333CC',
+ '#3333FF',
+ '#3366CC',
+ '#3366FF',
+ '#3399CC',
+ '#3399FF',
+ '#33CC00',
+ '#33CC33',
+ '#33CC66',
+ '#33CC99',
+ '#33CCCC',
+ '#33CCFF',
+ '#6600CC',
+ '#6600FF',
+ '#6633CC',
+ '#6633FF',
+ '#66CC00',
+ '#66CC33',
+ '#9900CC',
+ '#9900FF',
+ '#9933CC',
+ '#9933FF',
+ '#99CC00',
+ '#99CC33',
+ '#CC0000',
+ '#CC0033',
+ '#CC0066',
+ '#CC0099',
+ '#CC00CC',
+ '#CC00FF',
+ '#CC3300',
+ '#CC3333',
+ '#CC3366',
+ '#CC3399',
+ '#CC33CC',
+ '#CC33FF',
+ '#CC6600',
+ '#CC6633',
+ '#CC9900',
+ '#CC9933',
+ '#CCCC00',
+ '#CCCC33',
+ '#FF0000',
+ '#FF0033',
+ '#FF0066',
+ '#FF0099',
+ '#FF00CC',
+ '#FF00FF',
+ '#FF3300',
+ '#FF3333',
+ '#FF3366',
+ '#FF3399',
+ '#FF33CC',
+ '#FF33FF',
+ '#FF6600',
+ '#FF6633',
+ '#FF9900',
+ '#FF9933',
+ '#FFCC00',
+ '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+// eslint-disable-next-line complexity
+function useColors() {
+ // NB: In an Electron preload script, document will be defined but not fully
+ // initialized. Since we know we're in Chrome, we'll just detect this case
+ // explicitly
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+ return true;
+ }
+
+ // Internet Explorer and Edge do not support colors.
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+ return false;
+ }
+
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+ // Is firebug? http://stackoverflow.com/a/398120/376773
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+ // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+ // Double check webkit in userAgent just in case we are in a worker
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') +
+ this.namespace +
+ (this.useColors ? ' %c' : ' ') +
+ args[0] +
+ (this.useColors ? '%c ' : ' ') +
+ '+' + module.exports.humanize(this.diff);
+
+ if (!this.useColors) {
+ return;
+ }
+
+ const c = 'color: ' + this.color;
+ args.splice(1, 0, c, 'color: inherit');
+
+ // The final "%c" is somewhat tricky, because there could be other
+ // arguments passed either before or after the %c, so we need to
+ // figure out the correct index to insert the CSS into
+ let index = 0;
+ let lastC = 0;
+ args[0].replace(/%[a-zA-Z%]/g, match => {
+ if (match === '%%') {
+ return;
+ }
+ index++;
+ if (match === '%c') {
+ // We only are interested in the *last* %c
+ // (the user may have provided their own)
+ lastC = index;
+ }
+ });
+
+ args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.debug()` when available.
+ * No-op when `console.debug` is not a "function".
+ * If `console.debug` is not available, falls back
+ * to `console.log`.
+ *
+ * @api public
+ */
+exports.log = console.debug || console.log || (() => {});
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ try {
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
+ } else {
+ exports.storage.removeItem('debug');
+ }
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+function load() {
+ let r;
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
+ r = process.env.DEBUG;
+ }
+
+ return r;
+}
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+ try {
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {
+ // Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
diff --git a/tools/node_modules/@babel/core/node_modules/debug/src/common.js b/tools/node_modules/@babel/core/node_modules/debug/src/common.js
new file mode 100644
index 00000000000..392a8e005a0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/debug/src/common.js
@@ -0,0 +1,261 @@
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+
+function setup(env) {
+ createDebug.debug = createDebug;
+ createDebug.default = createDebug;
+ createDebug.coerce = coerce;
+ createDebug.disable = disable;
+ createDebug.enable = enable;
+ createDebug.enabled = enabled;
+ createDebug.humanize = require('ms');
+ createDebug.destroy = destroy;
+
+ Object.keys(env).forEach(key => {
+ createDebug[key] = env[key];
+ });
+
+ /**
+ * The currently active debug mode names, and names to skip.
+ */
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ /**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+ createDebug.formatters = {};
+
+ /**
+ * Selects a color for a debug namespace
+ * @param {String} namespace The namespace string for the for the debug instance to be colored
+ * @return {Number|String} An ANSI color code for the given namespace
+ * @api private
+ */
+ function selectColor(namespace) {
+ let hash = 0;
+
+ for (let i = 0; i < namespace.length; i++) {
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
+ hash |= 0; // Convert to 32bit integer
+ }
+
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+ }
+ createDebug.selectColor = selectColor;
+
+ /**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+ function createDebug(namespace) {
+ let prevTime;
+ let enableOverride = null;
+
+ function debug(...args) {
+ // Disabled?
+ if (!debug.enabled) {
+ return;
+ }
+
+ const self = debug;
+
+ // Set `diff` timestamp
+ const curr = Number(new Date());
+ const ms = curr - (prevTime || curr);
+ self.diff = ms;
+ self.prev = prevTime;
+ self.curr = curr;
+ prevTime = curr;
+
+ args[0] = createDebug.coerce(args[0]);
+
+ if (typeof args[0] !== 'string') {
+ // Anything else let's inspect with %O
+ args.unshift('%O');
+ }
+
+ // Apply any `formatters` transformations
+ let index = 0;
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
+ // If we encounter an escaped % then don't increase the array index
+ if (match === '%%') {
+ return '%';
+ }
+ index++;
+ const formatter = createDebug.formatters[format];
+ if (typeof formatter === 'function') {
+ const val = args[index];
+ match = formatter.call(self, val);
+
+ // Now we need to remove `args[index]` since it's inlined in the `format`
+ args.splice(index, 1);
+ index--;
+ }
+ return match;
+ });
+
+ // Apply env-specific formatting (colors, etc.)
+ createDebug.formatArgs.call(self, args);
+
+ const logFn = self.log || createDebug.log;
+ logFn.apply(self, args);
+ }
+
+ debug.namespace = namespace;
+ debug.useColors = createDebug.useColors();
+ debug.color = createDebug.selectColor(namespace);
+ debug.extend = extend;
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
+
+ Object.defineProperty(debug, 'enabled', {
+ enumerable: true,
+ configurable: false,
+ get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride,
+ set: v => {
+ enableOverride = v;
+ }
+ });
+
+ // Env-specific initialization logic for debug instances
+ if (typeof createDebug.init === 'function') {
+ createDebug.init(debug);
+ }
+
+ return debug;
+ }
+
+ function extend(namespace, delimiter) {
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+ newDebug.log = this.log;
+ return newDebug;
+ }
+
+ /**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+ function enable(namespaces) {
+ createDebug.save(namespaces);
+
+ createDebug.names = [];
+ createDebug.skips = [];
+
+ let i;
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+ const len = split.length;
+
+ for (i = 0; i < len; i++) {
+ if (!split[i]) {
+ // ignore empty strings
+ continue;
+ }
+
+ namespaces = split[i].replace(/\*/g, '.*?');
+
+ if (namespaces[0] === '-') {
+ createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+ } else {
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
+ }
+ }
+ }
+
+ /**
+ * Disable debug output.
+ *
+ * @return {String} namespaces
+ * @api public
+ */
+ function disable() {
+ const namespaces = [
+ ...createDebug.names.map(toNamespace),
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
+ ].join(',');
+ createDebug.enable('');
+ return namespaces;
+ }
+
+ /**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+ function enabled(name) {
+ if (name[name.length - 1] === '*') {
+ return true;
+ }
+
+ let i;
+ let len;
+
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
+ if (createDebug.skips[i].test(name)) {
+ return false;
+ }
+ }
+
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
+ if (createDebug.names[i].test(name)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Convert regexp to namespace
+ *
+ * @param {RegExp} regxep
+ * @return {String} namespace
+ * @api private
+ */
+ function toNamespace(regexp) {
+ return regexp.toString()
+ .substring(2, regexp.toString().length - 2)
+ .replace(/\.\*\?$/, '*');
+ }
+
+ /**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
+ }
+ return val;
+ }
+
+ /**
+ * XXX DO NOT USE. This is a temporary stub function.
+ * XXX It WILL be removed in the next major release.
+ */
+ function destroy() {
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
+ }
+
+ createDebug.enable(createDebug.load());
+
+ return createDebug;
+}
+
+module.exports = setup;
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/src/index.js b/tools/node_modules/@babel/core/node_modules/debug/src/index.js
index bf4c57f259d..bf4c57f259d 100644
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/index.js
+++ b/tools/node_modules/@babel/core/node_modules/debug/src/index.js
diff --git a/tools/node_modules/@babel/core/node_modules/debug/src/node.js b/tools/node_modules/@babel/core/node_modules/debug/src/node.js
new file mode 100644
index 00000000000..79bc085cb02
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/debug/src/node.js
@@ -0,0 +1,263 @@
+/**
+ * Module dependencies.
+ */
+
+const tty = require('tty');
+const util = require('util');
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.destroy = util.deprecate(
+ () => {},
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
+);
+
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
+ const supportsColor = require('supports-color');
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [
+ 20,
+ 21,
+ 26,
+ 27,
+ 32,
+ 33,
+ 38,
+ 39,
+ 40,
+ 41,
+ 42,
+ 43,
+ 44,
+ 45,
+ 56,
+ 57,
+ 62,
+ 63,
+ 68,
+ 69,
+ 74,
+ 75,
+ 76,
+ 77,
+ 78,
+ 79,
+ 80,
+ 81,
+ 92,
+ 93,
+ 98,
+ 99,
+ 112,
+ 113,
+ 128,
+ 129,
+ 134,
+ 135,
+ 148,
+ 149,
+ 160,
+ 161,
+ 162,
+ 163,
+ 164,
+ 165,
+ 166,
+ 167,
+ 168,
+ 169,
+ 170,
+ 171,
+ 172,
+ 173,
+ 178,
+ 179,
+ 184,
+ 185,
+ 196,
+ 197,
+ 198,
+ 199,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 207,
+ 208,
+ 209,
+ 214,
+ 215,
+ 220,
+ 221
+ ];
+ }
+} catch (error) {
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(key => {
+ return /^debug_/i.test(key);
+}).reduce((obj, key) => {
+ // Camel-case
+ const prop = key
+ .substring(6)
+ .toLowerCase()
+ .replace(/_([a-z])/g, (_, k) => {
+ return k.toUpperCase();
+ });
+
+ // Coerce string value into JS value
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
+
+ obj[prop] = val;
+ return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+ return 'colors' in exports.inspectOpts ?
+ Boolean(exports.inspectOpts.colors) :
+ tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+ const {namespace: name, useColors} = this;
+
+ if (useColors) {
+ const c = this.color;
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
+
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
+ } else {
+ args[0] = getDate() + name + ' ' + args[0];
+ }
+}
+
+function getDate() {
+ if (exports.inspectOpts.hideDate) {
+ return '';
+ }
+ return new Date().toISOString() + ' ';
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log(...args) {
+ return process.stderr.write(util.format(...args) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+function save(namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
+ // If you set a process.env field to null or undefined, it gets cast to the
+ // string 'null' or 'undefined'. Just delete instead.
+ delete process.env.DEBUG;
+ }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+ return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init(debug) {
+ debug.inspectOpts = {};
+
+ const keys = Object.keys(exports.inspectOpts);
+ for (let i = 0; i < keys.length; i++) {
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+ }
+}
+
+module.exports = require('./common')(exports);
+
+const {formatters} = module.exports;
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts)
+ .split('\n')
+ .map(str => str.trim())
+ .join(' ');
+};
+
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/index.js b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/index.js
index 7834bf9b24c..7834bf9b24c 100644
--- a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/index.js
+++ b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/license b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/license
index 654d0bfe943..654d0bfe943 100644
--- a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/license
+++ b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/license
diff --git a/tools/node_modules/@babel/core/node_modules/escape-string-regexp/package.json b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/package.json
new file mode 100644
index 00000000000..f307df34a23
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.5",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/readme.md b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/readme.md
index 87ac82d5ef8..87ac82d5ef8 100644
--- a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/escape-string-regexp/readme.md
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/.jscs.json b/tools/node_modules/@babel/core/node_modules/function-bind/.jscs.json
new file mode 100644
index 00000000000..8c4479480be
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/.jscs.json
@@ -0,0 +1,176 @@
+{
+ "es3": true,
+
+ "additionalRules": [],
+
+ "requireSemicolons": true,
+
+ "disallowMultipleSpaces": true,
+
+ "disallowIdentifierNames": [],
+
+ "requireCurlyBraces": {
+ "allExcept": [],
+ "keywords": ["if", "else", "for", "while", "do", "try", "catch"]
+ },
+
+ "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
+
+ "disallowSpaceAfterKeywords": [],
+
+ "disallowSpaceBeforeComma": true,
+ "disallowSpaceAfterComma": false,
+ "disallowSpaceBeforeSemicolon": true,
+
+ "disallowNodeTypes": [
+ "DebuggerStatement",
+ "ForInStatement",
+ "LabeledStatement",
+ "SwitchCase",
+ "SwitchStatement",
+ "WithStatement"
+ ],
+
+ "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] },
+
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
+ "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
+ "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
+
+ "requireSpaceBetweenArguments": true,
+
+ "disallowSpacesInsideParentheses": true,
+
+ "disallowSpacesInsideArrayBrackets": true,
+
+ "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] },
+
+ "disallowSpaceAfterObjectKeys": true,
+
+ "requireCommaBeforeLineBreak": true,
+
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
+ "requireSpaceAfterPrefixUnaryOperators": [],
+
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "requireSpaceBeforePostfixUnaryOperators": [],
+
+ "disallowSpaceBeforeBinaryOperators": [],
+ "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+
+ "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
+ "disallowSpaceAfterBinaryOperators": [],
+
+ "disallowImplicitTypeConversion": ["binary", "string"],
+
+ "disallowKeywords": ["with", "eval"],
+
+ "requireKeywordsOnNewLine": [],
+ "disallowKeywordsOnNewLine": ["else"],
+
+ "requireLineFeedAtFileEnd": true,
+
+ "disallowTrailingWhitespace": true,
+
+ "disallowTrailingComma": true,
+
+ "excludeFiles": ["node_modules/**", "vendor/**"],
+
+ "disallowMultipleLineStrings": true,
+
+ "requireDotNotation": { "allExcept": ["keywords"] },
+
+ "requireParenthesesAroundIIFE": true,
+
+ "validateLineBreaks": "LF",
+
+ "validateQuoteMarks": {
+ "escape": true,
+ "mark": "'"
+ },
+
+ "disallowOperatorBeforeLineBreak": [],
+
+ "requireSpaceBeforeKeywords": [
+ "do",
+ "for",
+ "if",
+ "else",
+ "switch",
+ "case",
+ "try",
+ "catch",
+ "finally",
+ "while",
+ "with",
+ "return"
+ ],
+
+ "validateAlignedFunctionParameters": {
+ "lineBreakAfterOpeningBraces": true,
+ "lineBreakBeforeClosingBraces": true
+ },
+
+ "requirePaddingNewLinesBeforeExport": true,
+
+ "validateNewlineAfterArrayElements": {
+ "maximum": 8
+ },
+
+ "requirePaddingNewLinesAfterUseStrict": true,
+
+ "disallowArrowFunctions": true,
+
+ "disallowMultiLineTernary": true,
+
+ "validateOrderInObjectKeys": "asc-insensitive",
+
+ "disallowIdenticalDestructuringNames": true,
+
+ "disallowNestedTernaries": { "maxLevel": 1 },
+
+ "requireSpaceAfterComma": { "allExcept": ["trailing"] },
+ "requireAlignedMultilineParams": false,
+
+ "requireSpacesInGenerator": {
+ "afterStar": true
+ },
+
+ "disallowSpacesInGenerator": {
+ "beforeStar": true
+ },
+
+ "disallowVar": false,
+
+ "requireArrayDestructuring": false,
+
+ "requireEnhancedObjectLiterals": false,
+
+ "requireObjectDestructuring": false,
+
+ "requireEarlyReturn": false,
+
+ "requireCapitalizedConstructorsNew": {
+ "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"]
+ },
+
+ "requireImportAlphabetized": false,
+
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeDestructuredValues": true,
+
+ "disallowSpacesInsideTemplateStringPlaceholders": true,
+
+ "disallowArrayDestructuringReturn": false,
+
+ "requireNewlineBeforeSingleStatementsInIf": false,
+
+ "disallowUnusedVariables": true,
+
+ "requireSpacesInsideImportedObjectBraces": true,
+
+ "requireUseStrict": true
+}
+
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/LICENSE b/tools/node_modules/@babel/core/node_modules/function-bind/LICENSE
new file mode 100644
index 00000000000..62d6d237ff1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2013 Raynos.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/README.md b/tools/node_modules/@babel/core/node_modules/function-bind/README.md
new file mode 100644
index 00000000000..81862a02cb9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/README.md
@@ -0,0 +1,48 @@
+# function-bind
+
+<!--
+ [![build status][travis-svg]][travis-url]
+ [![NPM version][npm-badge-svg]][npm-url]
+ [![Coverage Status][5]][6]
+ [![gemnasium Dependency Status][7]][8]
+ [![Dependency status][deps-svg]][deps-url]
+ [![Dev Dependency status][dev-deps-svg]][dev-deps-url]
+-->
+
+<!-- [![browser support][11]][12] -->
+
+Implementation of function.prototype.bind
+
+## Example
+
+I mainly do this for unit tests I run on phantomjs.
+PhantomJS does not have Function.prototype.bind :(
+
+```js
+Function.prototype.bind = require("function-bind")
+```
+
+## Installation
+
+`npm install function-bind`
+
+## Contributors
+
+ - Raynos
+
+## MIT Licenced
+
+ [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg
+ [travis-url]: https://travis-ci.org/Raynos/function-bind
+ [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg
+ [npm-url]: https://npmjs.org/package/function-bind
+ [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png
+ [6]: https://coveralls.io/r/Raynos/function-bind
+ [7]: https://gemnasium.com/Raynos/function-bind.png
+ [8]: https://gemnasium.com/Raynos/function-bind
+ [deps-svg]: https://david-dm.org/Raynos/function-bind.svg
+ [deps-url]: https://david-dm.org/Raynos/function-bind
+ [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg
+ [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies
+ [11]: https://ci.testling.com/Raynos/function-bind.png
+ [12]: https://ci.testling.com/Raynos/function-bind
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js b/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js
new file mode 100644
index 00000000000..cc4daec1b08
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/implementation.js
@@ -0,0 +1,52 @@
+'use strict';
+
+/* eslint no-invalid-this: 1 */
+
+var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
+var slice = Array.prototype.slice;
+var toStr = Object.prototype.toString;
+var funcType = '[object Function]';
+
+module.exports = function bind(that) {
+ var target = this;
+ if (typeof target !== 'function' || toStr.call(target) !== funcType) {
+ throw new TypeError(ERROR_MESSAGE + target);
+ }
+ var args = slice.call(arguments, 1);
+
+ var bound;
+ var binder = function () {
+ if (this instanceof bound) {
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+ }
+ };
+
+ var boundLength = Math.max(0, target.length - args.length);
+ var boundArgs = [];
+ for (var i = 0; i < boundLength; i++) {
+ boundArgs.push('$' + i);
+ }
+
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
+
+ if (target.prototype) {
+ var Empty = function Empty() {};
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+
+ return bound;
+};
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/index.js b/tools/node_modules/@babel/core/node_modules/function-bind/index.js
new file mode 100644
index 00000000000..3bb6b960988
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var implementation = require('./implementation');
+
+module.exports = Function.prototype.bind || implementation;
diff --git a/tools/node_modules/@babel/core/node_modules/function-bind/package.json b/tools/node_modules/@babel/core/node_modules/function-bind/package.json
new file mode 100644
index 00000000000..20a1727cbf8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/function-bind/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "function-bind",
+ "version": "1.1.1",
+ "description": "Implementation of Function.prototype.bind",
+ "keywords": [
+ "function",
+ "bind",
+ "shim",
+ "es5"
+ ],
+ "author": "Raynos <raynos2@gmail.com>",
+ "repository": "git://github.com/Raynos/function-bind.git",
+ "main": "index",
+ "homepage": "https://github.com/Raynos/function-bind",
+ "contributors": [
+ {
+ "name": "Raynos"
+ },
+ {
+ "name": "Jordan Harband",
+ "url": "https://github.com/ljharb"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/Raynos/function-bind/issues",
+ "email": "raynos2@gmail.com"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "covert": "^1.1.0",
+ "eslint": "^4.5.0",
+ "jscs": "^3.0.7",
+ "tape": "^4.8.0"
+ },
+ "license": "MIT",
+ "scripts": {
+ "pretest": "npm run lint",
+ "test": "npm run tests-only",
+ "posttest": "npm run coverage -- --quiet",
+ "tests-only": "node test",
+ "coverage": "covert test/*.js",
+ "lint": "npm run jscs && npm run eslint",
+ "jscs": "jscs *.js */*.js",
+ "eslint": "eslint *.js */*.js"
+ },
+ "testling": {
+ "files": "test/index.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/16..latest",
+ "firefox/nightly",
+ "chrome/22..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/gensync/LICENSE b/tools/node_modules/@babel/core/node_modules/gensync/LICENSE
new file mode 100644
index 00000000000..af7f781f59e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/gensync/LICENSE
@@ -0,0 +1,7 @@
+Copyright 2018 Logan Smyth <loganfsmyth@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/gensync/README.md b/tools/node_modules/@babel/core/node_modules/gensync/README.md
new file mode 100644
index 00000000000..f68ce1a37b9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/gensync/README.md
@@ -0,0 +1,196 @@
+# gensync
+
+This module allows for developers to write common code that can share
+implementation details, hiding whether an underlying request happens
+synchronously or asynchronously. This is in contrast with many current Node
+APIs which explicitly implement the same API twice, once with calls to
+synchronous functions, and once with asynchronous functions.
+
+Take for example `fs.readFile` and `fs.readFileSync`, if you're writing an API
+that loads a file and then performs a synchronous operation on the data, it
+can be frustrating to maintain two parallel functions.
+
+
+## Example
+
+```js
+const fs = require("fs");
+const gensync = require("gensync");
+
+const readFile = gensync({
+ sync: fs.readFileSync,
+ errback: fs.readFile,
+});
+
+const myOperation = gensync(function* (filename) {
+ const code = yield* readFile(filename, "utf8");
+
+ return "// some custom prefix\n" + code;
+});
+
+// Load and add the prefix synchronously:
+const result = myOperation.sync("./some-file.js");
+
+// Load and add the prefix asynchronously with promises:
+myOperation.async("./some-file.js").then(result => {
+
+});
+
+// Load and add the prefix asynchronously with promises:
+myOperation.errback("./some-file.js", (err, result) => {
+
+});
+```
+
+This could even be exposed as your official API by doing
+```js
+// Using the common 'Sync' suffix for sync functions, and 'Async' suffix for
+// promise-returning versions.
+exports.myOperationSync = myOperation.sync;
+exports.myOperationAsync = myOperation.async;
+exports.myOperation = myOperation.errback;
+```
+or potentially expose one of the async versions as the default, with a
+`.sync` property on the function to expose the synchronous version.
+```js
+module.exports = myOperation.errback;
+module.exports.sync = myOperation.sync;
+````
+
+
+## API
+
+### gensync(generatorFnOrOptions)
+
+Returns a function that can be "await"-ed in another `gensync` generator
+function, or executed via
+
+* `.sync(...args)` - Returns the computed value, or throws.
+* `.async(...args)` - Returns a promise for the computed value.
+* `.errback(...args, (err, result) => {})` - Calls the callback with the computed value, or error.
+
+
+#### Passed a generator
+
+Wraps the generator to populate the `.sync`/`.async`/`.errback` helpers above to
+allow for evaluation of the generator for the final value.
+
+##### Example
+
+```js
+const readFile = function* () {
+ return 42;
+};
+
+const readFileAndMore = gensync(function* (){
+ const val = yield* readFile();
+ return 42 + val;
+});
+
+// In general cases
+const code = readFileAndMore.sync("./file.js", "utf8");
+readFileAndMore.async("./file.js", "utf8").then(code => {})
+readFileAndMore.errback("./file.js", "utf8", (err, code) => {});
+
+// In a generator being called indirectly with .sync/.async/.errback
+const code = yield* readFileAndMore("./file.js", "utf8");
+```
+
+
+#### Passed an options object
+
+* `opts.sync`
+
+ Example: `(...args) => 4`
+
+ A function that will be called when `.sync()` is called on the `gensync()`
+ result, or when the result is passed to `yield*` in another generator that
+ is being run synchronously.
+
+ Also called for `.async()` calls if no async handlers are provided.
+
+* `opts.async`
+
+ Example: `async (...args) => 4`
+
+ A function that will be called when `.async()` or `.errback()` is called on
+ the `gensync()` result, or when the result is passed to `yield*` in another
+ generator that is being run asynchronously.
+
+* `opts.errback`
+
+ Example: `(...args, cb) => cb(null, 4)`
+
+ A function that will be called when `.async()` or `.errback()` is called on
+ the `gensync()` result, or when the result is passed to `yield*` in another
+ generator that is being run asynchronously.
+
+ This option allows for simpler compatibility with many existing Node APIs,
+ and also avoids introducing the extra even loop turns that promises introduce
+ to access the result value.
+
+* `opts.name`
+
+ Example: `"readFile"`
+
+ A string name to apply to the returned function. If no value is provided,
+ the name of `errback`/`async`/`sync` functions will be used, with any
+ `Sync` or `Async` suffix stripped off. If the callback is simply named
+ with ES6 inference (same name as the options property), the name is ignored.
+
+* `opts.arity`
+
+ Example: `4`
+
+ A number for the length to set on the returned function. If no value
+ is provided, the length will be carried over from the `sync` function's
+ `length` value.
+
+##### Example
+
+```js
+const readFile = gensync({
+ sync: fs.readFileSync,
+ errback: fs.readFile,
+});
+
+const code = readFile.sync("./file.js", "utf8");
+readFile.async("./file.js", "utf8").then(code => {})
+readFile.errback("./file.js", "utf8", (err, code) => {});
+```
+
+
+### gensync.all(iterable)
+
+`Promise.all`-like combinator that works with an iterable of generator objects
+that could be passed to `yield*` within a gensync generator.
+
+#### Example
+
+```js
+const loadFiles = gensync(function* () {
+ return yield* gensync.all([
+ readFile("./one.js"),
+ readFile("./two.js"),
+ readFile("./three.js"),
+ ]);
+});
+```
+
+
+### gensync.race(iterable)
+
+`Promise.race`-like combinator that works with an iterable of generator objects
+that could be passed to `yield*` within a gensync generator.
+
+#### Example
+
+```js
+const loadFiles = gensync(function* () {
+ return yield* gensync.race([
+ readFile("./one.js"),
+ readFile("./two.js"),
+ readFile("./three.js"),
+ ]);
+});
+```
diff --git a/tools/node_modules/@babel/core/node_modules/gensync/index.js b/tools/node_modules/@babel/core/node_modules/gensync/index.js
new file mode 100644
index 00000000000..ee0ea616595
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/gensync/index.js
@@ -0,0 +1,373 @@
+"use strict";
+
+// These use the global symbol registry so that multiple copies of this
+// library can work together in case they are not deduped.
+const GENSYNC_START = Symbol.for("gensync:v1:start");
+const GENSYNC_SUSPEND = Symbol.for("gensync:v1:suspend");
+
+const GENSYNC_EXPECTED_START = "GENSYNC_EXPECTED_START";
+const GENSYNC_EXPECTED_SUSPEND = "GENSYNC_EXPECTED_SUSPEND";
+const GENSYNC_OPTIONS_ERROR = "GENSYNC_OPTIONS_ERROR";
+const GENSYNC_RACE_NONEMPTY = "GENSYNC_RACE_NONEMPTY";
+const GENSYNC_ERRBACK_NO_CALLBACK = "GENSYNC_ERRBACK_NO_CALLBACK";
+
+module.exports = Object.assign(
+ function gensync(optsOrFn) {
+ let genFn = optsOrFn;
+ if (typeof optsOrFn !== "function") {
+ genFn = newGenerator(optsOrFn);
+ } else {
+ genFn = wrapGenerator(optsOrFn);
+ }
+
+ return Object.assign(genFn, makeFunctionAPI(genFn));
+ },
+ {
+ all: buildOperation({
+ name: "all",
+ arity: 1,
+ sync: function(args) {
+ const items = Array.from(args[0]);
+ return items.map(item => evaluateSync(item));
+ },
+ async: function(args, resolve, reject) {
+ const items = Array.from(args[0]);
+
+ if (items.length === 0) {
+ Promise.resolve().then(() => resolve([]));
+ return;
+ }
+
+ let count = 0;
+ const results = items.map(() => undefined);
+ items.forEach((item, i) => {
+ evaluateAsync(
+ item,
+ val => {
+ results[i] = val;
+ count += 1;
+
+ if (count === results.length) resolve(results);
+ },
+ reject
+ );
+ });
+ },
+ }),
+ race: buildOperation({
+ name: "race",
+ arity: 1,
+ sync: function(args) {
+ const items = Array.from(args[0]);
+ if (items.length === 0) {
+ throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
+ }
+
+ return evaluateSync(items[0]);
+ },
+ async: function(args, resolve, reject) {
+ const items = Array.from(args[0]);
+ if (items.length === 0) {
+ throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
+ }
+
+ for (const item of items) {
+ evaluateAsync(item, resolve, reject);
+ }
+ },
+ }),
+ }
+);
+
+/**
+ * Given a generator function, return the standard API object that executes
+ * the generator and calls the callbacks.
+ */
+function makeFunctionAPI(genFn) {
+ const fns = {
+ sync: function(...args) {
+ return evaluateSync(genFn.apply(this, args));
+ },
+ async: function(...args) {
+ return new Promise((resolve, reject) => {
+ evaluateAsync(genFn.apply(this, args), resolve, reject);
+ });
+ },
+ errback: function(...args) {
+ const cb = args.pop();
+ if (typeof cb !== "function") {
+ throw makeError(
+ "Asynchronous function called without callback",
+ GENSYNC_ERRBACK_NO_CALLBACK
+ );
+ }
+
+ let gen;
+ try {
+ gen = genFn.apply(this, args);
+ } catch (err) {
+ cb(err);
+ return;
+ }
+
+ evaluateAsync(gen, val => cb(undefined, val), err => cb(err));
+ },
+ };
+ return fns;
+}
+
+function assertTypeof(type, name, value, allowUndefined) {
+ if (
+ typeof value === type ||
+ (allowUndefined && typeof value === "undefined")
+ ) {
+ return;
+ }
+
+ let msg;
+ if (allowUndefined) {
+ msg = `Expected opts.${name} to be either a ${type}, or undefined.`;
+ } else {
+ msg = `Expected opts.${name} to be a ${type}.`;
+ }
+
+ throw makeError(msg, GENSYNC_OPTIONS_ERROR);
+}
+function makeError(msg, code) {
+ return Object.assign(new Error(msg), { code });
+}
+
+/**
+ * Given an options object, return a new generator that dispatches the
+ * correct handler based on sync or async execution.
+ */
+function newGenerator({ name, arity, sync, async, errback }) {
+ assertTypeof("string", "name", name, true /* allowUndefined */);
+ assertTypeof("number", "arity", arity, true /* allowUndefined */);
+ assertTypeof("function", "sync", sync);
+ assertTypeof("function", "async", async, true /* allowUndefined */);
+ assertTypeof("function", "errback", errback, true /* allowUndefined */);
+ if (async && errback) {
+ throw makeError(
+ "Expected one of either opts.async or opts.errback, but got _both_.",
+ GENSYNC_OPTIONS_ERROR
+ );
+ }
+
+ if (typeof name !== "string") {
+ let fnName;
+ if (errback && errback.name && errback.name !== "errback") {
+ fnName = errback.name;
+ }
+ if (async && async.name && async.name !== "async") {
+ fnName = async.name.replace(/Async$/, "");
+ }
+ if (sync && sync.name && sync.name !== "sync") {
+ fnName = sync.name.replace(/Sync$/, "");
+ }
+
+ if (typeof fnName === "string") {
+ name = fnName;
+ }
+ }
+
+ if (typeof arity !== "number") {
+ arity = sync.length;
+ }
+
+ return buildOperation({
+ name,
+ arity,
+ sync: function(args) {
+ return sync.apply(this, args);
+ },
+ async: function(args, resolve, reject) {
+ if (async) {
+ async.apply(this, args).then(resolve, reject);
+ } else if (errback) {
+ errback.call(this, ...args, (err, value) => {
+ if (err == null) resolve(value);
+ else reject(err);
+ });
+ } else {
+ resolve(sync.apply(this, args));
+ }
+ },
+ });
+}
+
+function wrapGenerator(genFn) {
+ return setFunctionMetadata(genFn.name, genFn.length, function(...args) {
+ return genFn.apply(this, args);
+ });
+}
+
+function buildOperation({ name, arity, sync, async }) {
+ return setFunctionMetadata(name, arity, function*(...args) {
+ const resume = yield GENSYNC_START;
+ if (!resume) {
+ // Break the tail call to avoid a bug in V8 v6.X with --harmony enabled.
+ const res = sync.call(this, args);
+ return res;
+ }
+
+ let result;
+ try {
+ async.call(
+ this,
+ args,
+ value => {
+ if (result) return;
+
+ result = { value };
+ resume();
+ },
+ err => {
+ if (result) return;
+
+ result = { err };
+ resume();
+ }
+ );
+ } catch (err) {
+ result = { err };
+ resume();
+ }
+
+ // Suspend until the callbacks run. Will resume synchronously if the
+ // callback was already called.
+ yield GENSYNC_SUSPEND;
+
+ if (result.hasOwnProperty("err")) {
+ throw result.err;
+ }
+
+ return result.value;
+ });
+}
+
+function evaluateSync(gen) {
+ let value;
+ while (!({ value } = gen.next()).done) {
+ assertStart(value, gen);
+ }
+ return value;
+}
+
+function evaluateAsync(gen, resolve, reject) {
+ (function step() {
+ try {
+ let value;
+ while (!({ value } = gen.next()).done) {
+ assertStart(value, gen);
+
+ // If this throws, it is considered to have broken the contract
+ // established for async handlers. If these handlers are called
+ // synchronously, it is also considered bad behavior.
+ let sync = true;
+ let didSyncResume = false;
+ const out = gen.next(() => {
+ if (sync) {
+ didSyncResume = true;
+ } else {
+ step();
+ }
+ });
+ sync = false;
+
+ assertSuspend(out, gen);
+
+ if (!didSyncResume) {
+ // Callback wasn't called synchronously, so break out of the loop
+ // and let it call 'step' later.
+ return;
+ }
+ }
+
+ return resolve(value);
+ } catch (err) {
+ return reject(err);
+ }
+ })();
+}
+
+function assertStart(value, gen) {
+ if (value === GENSYNC_START) return;
+
+ throwError(
+ gen,
+ makeError(
+ `Got unexpected yielded value in gensync generator: ${JSON.stringify(
+ value
+ )}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,
+ GENSYNC_EXPECTED_START
+ )
+ );
+}
+function assertSuspend({ value, done }, gen) {
+ if (!done && value === GENSYNC_SUSPEND) return;
+
+ throwError(
+ gen,
+ makeError(
+ done
+ ? "Unexpected generator completion. If you get this, it is probably a gensync bug."
+ : `Expected GENSYNC_SUSPEND, got ${JSON.stringify(
+ value
+ )}. If you get this, it is probably a gensync bug.`,
+ GENSYNC_EXPECTED_SUSPEND
+ )
+ );
+}
+
+function throwError(gen, err) {
+ // Call `.throw` so that users can step in a debugger to easily see which
+ // 'yield' passed an unexpected value. If the `.throw` call didn't throw
+ // back to the generator, we explicitly do it to stop the error
+ // from being swallowed by user code try/catches.
+ if (gen.throw) gen.throw(err);
+ throw err;
+}
+
+function isIterable(value) {
+ return (
+ !!value &&
+ (typeof value === "object" || typeof value === "function") &&
+ !value[Symbol.iterator]
+ );
+}
+
+function setFunctionMetadata(name, arity, fn) {
+ if (typeof name === "string") {
+ // This should always work on the supported Node versions, but for the
+ // sake of users that are compiling to older versions, we check for
+ // configurability so we don't throw.
+ const nameDesc = Object.getOwnPropertyDescriptor(fn, "name");
+ if (!nameDesc || nameDesc.configurable) {
+ Object.defineProperty(
+ fn,
+ "name",
+ Object.assign(nameDesc || {}, {
+ configurable: true,
+ value: name,
+ })
+ );
+ }
+ }
+
+ if (typeof arity === "number") {
+ const lengthDesc = Object.getOwnPropertyDescriptor(fn, "length");
+ if (!lengthDesc || lengthDesc.configurable) {
+ Object.defineProperty(
+ fn,
+ "length",
+ Object.assign(lengthDesc || {}, {
+ configurable: true,
+ value: arity,
+ })
+ );
+ }
+ }
+
+ return fn;
+}
diff --git a/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow b/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow
new file mode 100644
index 00000000000..fa22e0bad97
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/gensync/index.js.flow
@@ -0,0 +1,32 @@
+// @flow
+
+opaque type Next = Function | void;
+opaque type Yield = mixed;
+
+export type Gensync<Args, Return> = {
+ (...args: Args): Handler<Return>,
+ sync(...args: Args): Return,
+ async(...args: Args): Promise<Return>,
+ // ...args: [...Args, Callback]
+ errback(...args: any[]): void,
+};
+
+export type Handler<Return> = Generator<Yield, Return, Next>;
+export type Options<Args, Return> = {
+ sync(...args: Args): Return,
+ arity?: number,
+ name?: string,
+} & (
+ | { async?: (...args: Args) => Promise<Return> }
+ // ...args: [...Args, Callback]
+ | { errback(...args: any[]): void }
+);
+
+declare module.exports: {
+ <Args, Return>(
+ Options<Args, Return> | ((...args: Args) => Handler<Return>)
+ ): Gensync<Args, Return>,
+
+ all<Return>(Array<Handler<Return>>): Handler<Return[]>,
+ race<Return>(Array<Handler<Return>>): Handler<Return>,
+};
diff --git a/tools/node_modules/@babel/core/node_modules/gensync/package.json b/tools/node_modules/@babel/core/node_modules/gensync/package.json
new file mode 100644
index 00000000000..07f87570d87
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/gensync/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "gensync",
+ "version": "1.0.0-beta.2",
+ "license": "MIT",
+ "description": "Allows users to use generators in order to write common functions that can be both sync or async.",
+ "main": "index.js",
+ "author": "Logan Smyth <loganfsmyth@gmail.com>",
+ "homepage": "https://github.com/loganfsmyth/gensync",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/loganfsmyth/gensync.git"
+ },
+ "scripts": {
+ "test": "jest"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "keywords": [
+ "async",
+ "sync",
+ "generators",
+ "async-await",
+ "callbacks"
+ ],
+ "devDependencies": {
+ "babel-core": "^6.26.3",
+ "babel-preset-env": "^1.6.1",
+ "eslint": "^4.19.1",
+ "eslint-config-prettier": "^2.9.0",
+ "eslint-plugin-node": "^6.0.1",
+ "eslint-plugin-prettier": "^2.6.0",
+ "flow-bin": "^0.71.0",
+ "jest": "^22.4.3",
+ "prettier": "^1.12.1"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/globals.json b/tools/node_modules/@babel/core/node_modules/globals/globals.json
index 6f5ac02f1ea..6f5ac02f1ea 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/globals.json
+++ b/tools/node_modules/@babel/core/node_modules/globals/globals.json
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/index.js b/tools/node_modules/@babel/core/node_modules/globals/index.js
index a951582e417..a951582e417 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/index.js
+++ b/tools/node_modules/@babel/core/node_modules/globals/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/license b/tools/node_modules/@babel/core/node_modules/globals/license
index e7af2f77107..e7af2f77107 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/license
+++ b/tools/node_modules/@babel/core/node_modules/globals/license
diff --git a/tools/node_modules/@babel/core/node_modules/globals/package.json b/tools/node_modules/@babel/core/node_modules/globals/package.json
new file mode 100644
index 00000000000..dfe459b6fa6
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/globals/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "globals",
+ "version": "11.12.0",
+ "description": "Global identifiers from different JavaScript environments",
+ "license": "MIT",
+ "repository": "sindresorhus/globals",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "globals.json"
+ ],
+ "keywords": [
+ "globals",
+ "global",
+ "identifiers",
+ "variables",
+ "vars",
+ "jshint",
+ "eslint",
+ "environments"
+ ],
+ "devDependencies": {
+ "ava": "0.21.0",
+ "xo": "0.18.0"
+ },
+ "xo": {
+ "ignores": [
+ "get-browser-globals.js"
+ ]
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/readme.md b/tools/node_modules/@babel/core/node_modules/globals/readme.md
index 8c47855f34d..8c47855f34d 100644
--- a/tools/node_modules/babel-eslint/node_modules/globals/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/globals/readme.md
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/index.js b/tools/node_modules/@babel/core/node_modules/has-flag/index.js
index 5139728fba6..5139728fba6 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/index.js
+++ b/tools/node_modules/@babel/core/node_modules/has-flag/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/license b/tools/node_modules/@babel/core/node_modules/has-flag/license
index e7af2f77107..e7af2f77107 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/license
+++ b/tools/node_modules/@babel/core/node_modules/has-flag/license
diff --git a/tools/node_modules/@babel/core/node_modules/has-flag/package.json b/tools/node_modules/@babel/core/node_modules/has-flag/package.json
new file mode 100644
index 00000000000..e1eb17a15ed
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/has-flag/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "has-flag",
+ "version": "3.0.0",
+ "description": "Check if argv has a specific flag",
+ "license": "MIT",
+ "repository": "sindresorhus/has-flag",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "has",
+ "check",
+ "detect",
+ "contains",
+ "find",
+ "flag",
+ "cli",
+ "command-line",
+ "argv",
+ "process",
+ "arg",
+ "args",
+ "argument",
+ "arguments",
+ "getopt",
+ "minimist",
+ "optimist"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md b/tools/node_modules/@babel/core/node_modules/has-flag/readme.md
index 677893c278a..677893c278a 100644
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/has-flag/readme.md
diff --git a/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT b/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT
new file mode 100644
index 00000000000..ae7014d385d
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/has/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Thiago de Arruda
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/has/README.md b/tools/node_modules/@babel/core/node_modules/has/README.md
new file mode 100644
index 00000000000..635e3a4baab
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/has/README.md
@@ -0,0 +1,18 @@
+# has
+
+> Object.prototype.hasOwnProperty.call shortcut
+
+## Installation
+
+```sh
+npm install --save has
+```
+
+## Usage
+
+```js
+var has = require('has');
+
+has({}, 'hasOwnProperty'); // false
+has(Object.prototype, 'hasOwnProperty'); // true
+```
diff --git a/tools/node_modules/@babel/core/node_modules/has/package.json b/tools/node_modules/@babel/core/node_modules/has/package.json
new file mode 100644
index 00000000000..7c4592f16de
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/has/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "has",
+ "description": "Object.prototype.hasOwnProperty.call shortcut",
+ "version": "1.0.3",
+ "homepage": "https://github.com/tarruda/has",
+ "author": {
+ "name": "Thiago de Arruda",
+ "email": "tpadilha84@gmail.com"
+ },
+ "contributors": [
+ {
+ "name": "Jordan Harband",
+ "email": "ljharb@gmail.com",
+ "url": "http://ljharb.codes"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/tarruda/has.git"
+ },
+ "bugs": {
+ "url": "https://github.com/tarruda/has/issues"
+ },
+ "license": "MIT",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "./src",
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^12.2.1",
+ "eslint": "^4.19.1",
+ "tape": "^4.9.0"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "scripts": {
+ "lint": "eslint .",
+ "pretest": "npm run lint",
+ "test": "tape test"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/has/src/index.js b/tools/node_modules/@babel/core/node_modules/has/src/index.js
new file mode 100644
index 00000000000..dd92dd9094e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/has/src/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+var bind = require('function-bind');
+
+module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE b/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE
new file mode 100644
index 00000000000..2e502872a74
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/is-core-module/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Dave Justice
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/README.md b/tools/node_modules/@babel/core/node_modules/is-core-module/README.md
new file mode 100644
index 00000000000..479d6d24c0f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/is-core-module/README.md
@@ -0,0 +1,37 @@
+# is-core-module <sup>[![Version Badge][2]][1]</sup>
+
+[![Build Status][3]][4]
+[![dependency status][5]][6]
+[![dev dependency status][7]][8]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+
+[![npm badge][11]][1]
+
+Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.
+
+## Example
+
+```js
+var isCore = require('is-core-module');
+var assert = require('assert');
+assert(isCore('fs'));
+assert(!isCore('butts'));
+```
+
+## Tests
+Clone the repo, `npm install`, and run `npm test`
+
+[1]: https://npmjs.org/package/is-core-module
+[2]: https://versionbadg.es/inspect-js/is-core-module.svg
+[3]: https://travis-ci.com/inspect-js/is-core-module.svg
+[4]: https://travis-ci.com/inspect-js/is-core-module
+[5]: https://david-dm.org/inspect-js/is-core-module.svg
+[6]: https://david-dm.org/inspect-js/is-core-module
+[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg
+[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies
+[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/is-core-module.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module
diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/core.json b/tools/node_modules/@babel/core/node_modules/is-core-module/core.json
new file mode 100644
index 00000000000..0238b61a4c7
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/is-core-module/core.json
@@ -0,0 +1,83 @@
+{
+ "assert": true,
+ "assert/strict": ">= 15",
+ "async_hooks": ">= 8",
+ "buffer_ieee754": "< 0.9.7",
+ "buffer": true,
+ "child_process": true,
+ "cluster": true,
+ "console": true,
+ "constants": true,
+ "crypto": true,
+ "_debug_agent": ">= 1 && < 8",
+ "_debugger": "< 8",
+ "dgram": true,
+ "diagnostics_channel": ">= 15.1",
+ "dns": true,
+ "dns/promises": ">= 15",
+ "domain": ">= 0.7.12",
+ "events": true,
+ "freelist": "< 6",
+ "fs": true,
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
+ "_http_agent": ">= 0.11.1",
+ "_http_client": ">= 0.11.1",
+ "_http_common": ">= 0.11.1",
+ "_http_incoming": ">= 0.11.1",
+ "_http_outgoing": ">= 0.11.1",
+ "_http_server": ">= 0.11.1",
+ "http": true,
+ "http2": ">= 8.8",
+ "https": true,
+ "inspector": ">= 8.0.0",
+ "_linklist": "< 8",
+ "module": true,
+ "net": true,
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
+ "os": true,
+ "path": true,
+ "path/posix": ">= 15.3",
+ "path/win32": ">= 15.3",
+ "perf_hooks": ">= 8.5",
+ "process": ">= 1",
+ "punycode": true,
+ "querystring": true,
+ "readline": true,
+ "repl": true,
+ "smalloc": ">= 0.11.5 && < 3",
+ "_stream_duplex": ">= 0.9.4",
+ "_stream_transform": ">= 0.9.4",
+ "_stream_wrap": ">= 1.4.1",
+ "_stream_passthrough": ">= 0.9.4",
+ "_stream_readable": ">= 0.9.4",
+ "_stream_writable": ">= 0.9.4",
+ "stream": true,
+ "stream/promises": ">= 15",
+ "string_decoder": true,
+ "sys": [">= 0.6 && < 0.7", ">= 0.8"],
+ "timers": true,
+ "timers/promises": ">= 15",
+ "_tls_common": ">= 0.11.13",
+ "_tls_legacy": ">= 0.11.3 && < 10",
+ "_tls_wrap": ">= 0.11.3",
+ "tls": true,
+ "trace_events": ">= 10",
+ "tty": true,
+ "url": true,
+ "util": true,
+ "util/types": ">= 15.3",
+ "v8/tools/arguments": ">= 10 && < 12",
+ "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8": ">= 1",
+ "vm": true,
+ "wasi": ">= 13.4 && < 13.5",
+ "worker_threads": ">= 11.7",
+ "zlib": true
+}
diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/index.js b/tools/node_modules/@babel/core/node_modules/is-core-module/index.js
new file mode 100644
index 00000000000..f5a69cf765f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/is-core-module/index.js
@@ -0,0 +1,69 @@
+'use strict';
+
+var has = require('has');
+
+function specifierIncluded(current, specifier) {
+ var nodeParts = current.split('.');
+ var parts = specifier.split(' ');
+ var op = parts.length > 1 ? parts[0] : '=';
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
+
+ for (var i = 0; i < 3; ++i) {
+ var cur = parseInt(nodeParts[i] || 0, 10);
+ var ver = parseInt(versionParts[i] || 0, 10);
+ if (cur === ver) {
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
+ }
+ if (op === '<') {
+ return cur < ver;
+ }
+ if (op === '>=') {
+ return cur >= ver;
+ }
+ return false;
+ }
+ return op === '>=';
+}
+
+function matchesRange(current, range) {
+ var specifiers = range.split(/ ?&& ?/);
+ if (specifiers.length === 0) {
+ return false;
+ }
+ for (var i = 0; i < specifiers.length; ++i) {
+ if (!specifierIncluded(current, specifiers[i])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+function versionIncluded(nodeVersion, specifierValue) {
+ if (typeof specifierValue === 'boolean') {
+ return specifierValue;
+ }
+
+ var current = typeof nodeVersion === 'undefined'
+ ? process.versions && process.versions.node && process.versions.node
+ : nodeVersion;
+
+ if (typeof current !== 'string') {
+ throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
+ }
+
+ if (specifierValue && typeof specifierValue === 'object') {
+ for (var i = 0; i < specifierValue.length; ++i) {
+ if (matchesRange(current, specifierValue[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return matchesRange(current, specifierValue);
+}
+
+var data = require('./core.json');
+
+module.exports = function isCore(x, nodeVersion) {
+ return has(data, x) && versionIncluded(nodeVersion, data[x]);
+};
diff --git a/tools/node_modules/@babel/core/node_modules/is-core-module/package.json b/tools/node_modules/@babel/core/node_modules/is-core-module/package.json
new file mode 100644
index 00000000000..21341cc431a
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/is-core-module/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "is-core-module",
+ "version": "2.2.0",
+ "description": "Is this specifier a node.js core module?",
+ "main": "index.js",
+ "exports": {
+ ".": [
+ {
+ "default": "./index.js"
+ },
+ "./index.js"
+ ],
+ "./package.json": "./package.json"
+ },
+ "scripts": {
+ "prepublish": "safe-publish-latest",
+ "lint": "eslint .",
+ "pretest": "npm run lint",
+ "tests-only": "tape 'test/**/*.js'",
+ "test": "nyc npm run tests-only",
+ "posttest": "aud --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/inspect-js/is-core-module.git"
+ },
+ "keywords": [
+ "core",
+ "modules",
+ "module",
+ "npm",
+ "node",
+ "dependencies"
+ ],
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/inspect-js/is-core-module/issues"
+ },
+ "homepage": "https://github.com/inspect-js/is-core-module",
+ "dependencies": {
+ "has": "^1.0.3"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^17.3.0",
+ "aud": "^1.1.3",
+ "auto-changelog": "^2.2.1",
+ "eslint": "^7.14.0",
+ "nyc": "^10.3.2",
+ "safe-publish-latest": "^1.1.4",
+ "tape": "^5.0.1"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE b/tools/node_modules/@babel/core/node_modules/js-tokens/LICENSE
index 54aef52f3a4..54aef52f3a4 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/js-tokens/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md b/tools/node_modules/@babel/core/node_modules/js-tokens/README.md
index 00cdf1634db..00cdf1634db 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/README.md
+++ b/tools/node_modules/@babel/core/node_modules/js-tokens/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js b/tools/node_modules/@babel/core/node_modules/js-tokens/index.js
index b23a4a0e7f4..b23a4a0e7f4 100644
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/index.js
+++ b/tools/node_modules/@babel/core/node_modules/js-tokens/index.js
diff --git a/tools/node_modules/@babel/core/node_modules/js-tokens/package.json b/tools/node_modules/@babel/core/node_modules/js-tokens/package.json
new file mode 100644
index 00000000000..66752fab275
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/js-tokens/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "js-tokens",
+ "version": "4.0.0",
+ "author": "Simon Lydell",
+ "license": "MIT",
+ "description": "A regex that tokenizes JavaScript.",
+ "keywords": [
+ "JavaScript",
+ "js",
+ "token",
+ "tokenize",
+ "regex"
+ ],
+ "files": [
+ "index.js"
+ ],
+ "repository": "lydell/js-tokens",
+ "scripts": {
+ "test": "mocha --ui tdd",
+ "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
+ "build": "node generate-index.js",
+ "dev": "npm run build && npm test"
+ },
+ "devDependencies": {
+ "coffeescript": "2.1.1",
+ "esprima": "4.0.0",
+ "everything.js": "1.0.3",
+ "mocha": "5.0.0"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt b/tools/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt
index a41e0a7ef97..a41e0a7ef97 100644
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/LICENSE-MIT.txt
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/LICENSE-MIT.txt
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/README.md b/tools/node_modules/@babel/core/node_modules/jsesc/README.md
index aae2b13a19b..aae2b13a19b 100644
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/README.md
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc b/tools/node_modules/@babel/core/node_modules/jsesc/bin/jsesc
index e9a541db322..e9a541db322 100755
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/bin/jsesc
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/bin/jsesc
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js b/tools/node_modules/@babel/core/node_modules/jsesc/jsesc.js
index 7b8b9236144..7b8b9236144 100644
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/jsesc.js
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/jsesc.js
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1 b/tools/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1
index 2655ee7ae79..2655ee7ae79 100644
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/man/jsesc.1
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/man/jsesc.1
diff --git a/tools/node_modules/@babel/core/node_modules/jsesc/package.json b/tools/node_modules/@babel/core/node_modules/jsesc/package.json
new file mode 100644
index 00000000000..f89a7c62a04
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/jsesc/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "jsesc",
+ "version": "2.5.2",
+ "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.",
+ "homepage": "https://mths.be/jsesc",
+ "engines": {
+ "node": ">=4"
+ },
+ "main": "jsesc.js",
+ "bin": "bin/jsesc",
+ "man": "man/jsesc.1",
+ "keywords": [
+ "buffer",
+ "escape",
+ "javascript",
+ "json",
+ "map",
+ "set",
+ "string",
+ "stringify",
+ "tool"
+ ],
+ "license": "MIT",
+ "author": {
+ "name": "Mathias Bynens",
+ "url": "https://mathiasbynens.be/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mathiasbynens/jsesc.git"
+ },
+ "bugs": "https://github.com/mathiasbynens/jsesc/issues",
+ "files": [
+ "LICENSE-MIT.txt",
+ "jsesc.js",
+ "bin/",
+ "man/"
+ ],
+ "scripts": {
+ "build": "grunt template",
+ "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'",
+ "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'",
+ "test": "mocha tests"
+ },
+ "devDependencies": {
+ "coveralls": "^2.11.6",
+ "grunt": "^0.4.5",
+ "grunt-template": "^0.2.3",
+ "istanbul": "^0.4.2",
+ "mocha": "*",
+ "regenerate": "^1.3.0",
+ "requirejs": "^2.1.22"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md b/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md
new file mode 100644
index 00000000000..2171aca5a83
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/LICENSE.md
@@ -0,0 +1,23 @@
+MIT License
+
+Copyright (c) 2012-2018 Aseem Kishore, and [others].
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+[others]: https://github.com/json5/json5/contributors
diff --git a/tools/node_modules/@babel/core/node_modules/json5/README.md b/tools/node_modules/@babel/core/node_modules/json5/README.md
new file mode 100644
index 00000000000..4f803270be0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/README.md
@@ -0,0 +1,234 @@
+# JSON5 – JSON for Humans
+
+[![Build Status](https://travis-ci.org/json5/json5.svg)][Build Status]
+[![Coverage
+Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage
+Status]
+
+The JSON5 Data Interchange Format (JSON5) is a superset of [JSON] that aims to
+alleviate some of the limitations of JSON by expanding its syntax to include
+some productions from [ECMAScript 5.1].
+
+This JavaScript library is the official reference implementation for JSON5
+parsing and serialization libraries.
+
+[Build Status]: https://travis-ci.org/json5/json5
+
+[Coverage Status]: https://coveralls.io/github/json5/json5
+
+[JSON]: https://tools.ietf.org/html/rfc7159
+
+[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/
+
+## Summary of Features
+The following ECMAScript 5.1 features, which are not supported in JSON, have
+been extended to JSON5.
+
+### Objects
+- Object keys may be an ECMAScript 5.1 _[IdentifierName]_.
+- Objects may have a single trailing comma.
+
+### Arrays
+- Arrays may have a single trailing comma.
+
+### Strings
+- Strings may be single quoted.
+- Strings may span multiple lines by escaping new line characters.
+- Strings may include character escapes.
+
+### Numbers
+- Numbers may be hexadecimal.
+- Numbers may have a leading or trailing decimal point.
+- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN.
+- Numbers may begin with an explicit plus sign.
+
+### Comments
+- Single and multi-line comments are allowed.
+
+### White Space
+- Additional white space characters are allowed.
+
+[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6
+
+[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933
+
+## Short Example
+```js
+{
+ // comments
+ unquoted: 'and you can quote me on that',
+ singleQuotes: 'I can use "double quotes" here',
+ lineBreaks: "Look, Mom! \
+No \\n's!",
+ hexadecimal: 0xdecaf,
+ leadingDecimalPoint: .8675309, andTrailing: 8675309.,
+ positiveSign: +1,
+ trailingComma: 'in objects', andIn: ['arrays',],
+ "backwardsCompatible": "with JSON",
+}
+```
+
+## Specification
+For a detailed explanation of the JSON5 format, please read the [official
+specification](https://json5.github.io/json5-spec/).
+
+## Installation
+### Node.js
+```sh
+npm install json5
+```
+
+```js
+const JSON5 = require('json5')
+```
+
+### Browsers
+```html
+<script src="https://unpkg.com/json5@^2.0.0/dist/index.min.js"></script>
+```
+
+This will create a global `JSON5` variable.
+
+## API
+The JSON5 API is compatible with the [JSON API].
+
+[JSON API]:
+https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON
+
+### JSON5.parse()
+Parses a JSON5 string, constructing the JavaScript value or object described by
+the string. An optional reviver function can be provided to perform a
+transformation on the resulting object before it is returned.
+
+#### Syntax
+ JSON5.parse(text[, reviver])
+
+#### Parameters
+- `text`: The string to parse as JSON5.
+- `reviver`: If a function, this prescribes how the value originally produced by
+ parsing is transformed, before being returned.
+
+#### Return value
+The object corresponding to the given JSON5 text.
+
+### JSON5.stringify()
+Converts a JavaScript value to a JSON5 string, optionally replacing values if a
+replacer function is specified, or optionally including only the specified
+properties if a replacer array is specified.
+
+#### Syntax
+ JSON5.stringify(value[, replacer[, space]])
+ JSON5.stringify(value[, options])
+
+#### Parameters
+- `value`: The value to convert to a JSON5 string.
+- `replacer`: A function that alters the behavior of the stringification
+ process, or an array of String and Number objects that serve as a whitelist
+ for selecting/filtering the properties of the value object to be included in
+ the JSON5 string. If this value is null or not provided, all properties of the
+ object are included in the resulting JSON5 string.
+- `space`: A String or Number object that's used to insert white space into the
+ output JSON5 string for readability purposes. If this is a Number, it
+ indicates the number of space characters to use as white space; this number is
+ capped at 10 (if it is greater, the value is just 10). Values less than 1
+ indicate that no space should be used. If this is a String, the string (or the
+ first 10 characters of the string, if it's longer than that) is used as white
+ space. If this parameter is not provided (or is null), no white space is used.
+ If white space is used, trailing commas will be used in objects and arrays.
+- `options`: An object with the following properties:
+ - `replacer`: Same as the `replacer` parameter.
+ - `space`: Same as the `space` parameter.
+ - `quote`: A String representing the quote character to use when serializing
+ strings.
+
+#### Return value
+A JSON5 string representing the value.
+
+### Node.js `require()` JSON5 files
+When using Node.js, you can `require()` JSON5 files by adding the following
+statement.
+
+```js
+require('json5/lib/register')
+```
+
+Then you can load a JSON5 file with a Node.js `require()` statement. For
+example:
+
+```js
+const config = require('./config.json5')
+```
+
+## CLI
+Since JSON is more widely used than JSON5, this package includes a CLI for
+converting JSON5 to JSON and for validating the syntax of JSON5 documents.
+
+### Installation
+```sh
+npm install --global json5
+```
+
+### Usage
+```sh
+json5 [options] <file>
+```
+
+If `<file>` is not provided, then STDIN is used.
+
+#### Options:
+- `-s`, `--space`: The number of spaces to indent or `t` for tabs
+- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT
+- `-v`, `--validate`: Validate JSON5 but do not output JSON
+- `-V`, `--version`: Output the version number
+- `-h`, `--help`: Output usage information
+
+## Contributing
+### Development
+```sh
+git clone https://github.com/json5/json5
+cd json5
+npm install
+```
+
+When contributing code, please write relevant tests and run `npm test` and `npm
+run lint` before submitting pull requests. Please use an editor that supports
+[EditorConfig](http://editorconfig.org/).
+
+### Issues
+To report bugs or request features regarding the JSON5 data format, please
+submit an issue to the [official specification
+repository](https://github.com/json5/json5-spec).
+
+To report bugs or request features regarding the JavaScript implementation of
+JSON5, please submit an issue to this repository.
+
+## License
+MIT. See [LICENSE.md](./LICENSE.md) for details.
+
+## Credits
+[Assem Kishore](https://github.com/aseemk) founded this project.
+
+[Michael Bolin](http://bolinfest.com/) independently arrived at and published
+some of these same ideas with awesome explanations and detail. Recommended
+reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html)
+
+[Douglas Crockford](http://www.crockford.com/) of course designed and built
+JSON, but his state machine diagrams on the [JSON website](http://json.org/), as
+cheesy as it may sound, gave us motivation and confidence that building a new
+parser to implement these ideas was within reach! The original
+implementation of JSON5 was also modeled directly off of Doug’s open-source
+[json_parse.js] parser. We’re grateful for that clean and well-documented
+code.
+
+[json_parse.js]:
+https://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js
+
+[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific
+supporter, contributing multiple patches and ideas.
+
+[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original
+`stringify` method.
+
+[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely
+with ES5, wrote the official JSON5 specification, completely rewrote the
+codebase from the ground up, and is actively maintaining this project.
diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.js b/tools/node_modules/@babel/core/node_modules/json5/dist/index.js
new file mode 100644
index 00000000000..9f98eb39da1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.js
@@ -0,0 +1,1710 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.JSON5 = factory());
+}(this, (function () { 'use strict';
+
+ function createCommonjsModule(fn, module) {
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
+ }
+
+ var _global = createCommonjsModule(function (module) {
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
+ // eslint-disable-next-line no-new-func
+ : Function('return this')();
+ if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef
+ });
+
+ var _core = createCommonjsModule(function (module) {
+ var core = module.exports = { version: '2.6.5' };
+ if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef
+ });
+ var _core_1 = _core.version;
+
+ var _isObject = function (it) {
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+ var _anObject = function (it) {
+ if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); }
+ return it;
+ };
+
+ var _fails = function (exec) {
+ try {
+ return !!exec();
+ } catch (e) {
+ return true;
+ }
+ };
+
+ // Thank's IE8 for his funny defineProperty
+ var _descriptors = !_fails(function () {
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
+ });
+
+ var document = _global.document;
+ // typeof document.createElement is 'object' in old IE
+ var is = _isObject(document) && _isObject(document.createElement);
+ var _domCreate = function (it) {
+ return is ? document.createElement(it) : {};
+ };
+
+ var _ie8DomDefine = !_descriptors && !_fails(function () {
+ return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
+ });
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ var _toPrimitive = function (it, S) {
+ if (!_isObject(it)) { return it; }
+ var fn, val;
+ if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; }
+ if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; }
+ if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; }
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+ var dP = Object.defineProperty;
+
+ var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+ _anObject(O);
+ P = _toPrimitive(P, true);
+ _anObject(Attributes);
+ if (_ie8DomDefine) { try {
+ return dP(O, P, Attributes);
+ } catch (e) { /* empty */ } }
+ if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); }
+ if ('value' in Attributes) { O[P] = Attributes.value; }
+ return O;
+ };
+
+ var _objectDp = {
+ f: f
+ };
+
+ var _propertyDesc = function (bitmap, value) {
+ return {
+ enumerable: !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable: !(bitmap & 4),
+ value: value
+ };
+ };
+
+ var _hide = _descriptors ? function (object, key, value) {
+ return _objectDp.f(object, key, _propertyDesc(1, value));
+ } : function (object, key, value) {
+ object[key] = value;
+ return object;
+ };
+
+ var hasOwnProperty = {}.hasOwnProperty;
+ var _has = function (it, key) {
+ return hasOwnProperty.call(it, key);
+ };
+
+ var id = 0;
+ var px = Math.random();
+ var _uid = function (key) {
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ };
+
+ var _library = false;
+
+ var _shared = createCommonjsModule(function (module) {
+ var SHARED = '__core-js_shared__';
+ var store = _global[SHARED] || (_global[SHARED] = {});
+
+ (module.exports = function (key, value) {
+ return store[key] || (store[key] = value !== undefined ? value : {});
+ })('versions', []).push({
+ version: _core.version,
+ mode: _library ? 'pure' : 'global',
+ copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
+ });
+ });
+
+ var _functionToString = _shared('native-function-to-string', Function.toString);
+
+ var _redefine = createCommonjsModule(function (module) {
+ var SRC = _uid('src');
+
+ var TO_STRING = 'toString';
+ var TPL = ('' + _functionToString).split(TO_STRING);
+
+ _core.inspectSource = function (it) {
+ return _functionToString.call(it);
+ };
+
+ (module.exports = function (O, key, val, safe) {
+ var isFunction = typeof val == 'function';
+ if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); }
+ if (O[key] === val) { return; }
+ if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); }
+ if (O === _global) {
+ O[key] = val;
+ } else if (!safe) {
+ delete O[key];
+ _hide(O, key, val);
+ } else if (O[key]) {
+ O[key] = val;
+ } else {
+ _hide(O, key, val);
+ }
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+ })(Function.prototype, TO_STRING, function toString() {
+ return typeof this == 'function' && this[SRC] || _functionToString.call(this);
+ });
+ });
+
+ var _aFunction = function (it) {
+ if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); }
+ return it;
+ };
+
+ // optional / simple context binding
+
+ var _ctx = function (fn, that, length) {
+ _aFunction(fn);
+ if (that === undefined) { return fn; }
+ switch (length) {
+ case 1: return function (a) {
+ return fn.call(that, a);
+ };
+ case 2: return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3: return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function (/* ...args */) {
+ return fn.apply(that, arguments);
+ };
+ };
+
+ var PROTOTYPE = 'prototype';
+
+ var $export = function (type, name, source) {
+ var IS_FORCED = type & $export.F;
+ var IS_GLOBAL = type & $export.G;
+ var IS_STATIC = type & $export.S;
+ var IS_PROTO = type & $export.P;
+ var IS_BIND = type & $export.B;
+ var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];
+ var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
+ var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
+ var key, own, out, exp;
+ if (IS_GLOBAL) { source = name; }
+ for (key in source) {
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out;
+ // extend global
+ if (target) { _redefine(target, key, out, type & $export.U); }
+ // export
+ if (exports[key] != out) { _hide(exports, key, exp); }
+ if (IS_PROTO && expProto[key] != out) { expProto[key] = out; }
+ }
+ };
+ _global.core = _core;
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ $export.U = 64; // safe
+ $export.R = 128; // real proto method for `library`
+ var _export = $export;
+
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ var _toInteger = function (it) {
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ };
+
+ // 7.2.1 RequireObjectCoercible(argument)
+ var _defined = function (it) {
+ if (it == undefined) { throw TypeError("Can't call method on " + it); }
+ return it;
+ };
+
+ // true -> String#at
+ // false -> String#codePointAt
+ var _stringAt = function (TO_STRING) {
+ return function (that, pos) {
+ var s = String(_defined(that));
+ var i = _toInteger(pos);
+ var l = s.length;
+ var a, b;
+ if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; }
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+ };
+
+ var $at = _stringAt(false);
+ _export(_export.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: function codePointAt(pos) {
+ return $at(this, pos);
+ }
+ });
+
+ var codePointAt = _core.String.codePointAt;
+
+ var max = Math.max;
+ var min = Math.min;
+ var _toAbsoluteIndex = function (index, length) {
+ index = _toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ };
+
+ var fromCharCode = String.fromCharCode;
+ var $fromCodePoint = String.fromCodePoint;
+
+ // length should be 1, old FF problem
+ _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x) {
+ var arguments$1 = arguments;
+ // eslint-disable-line no-unused-vars
+ var res = [];
+ var aLen = arguments.length;
+ var i = 0;
+ var code;
+ while (aLen > i) {
+ code = +arguments$1[i++];
+ if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); }
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+ });
+
+ var fromCodePoint = _core.String.fromCodePoint;
+
+ // This is a generated file. Do not edit.
+ var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
+ var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
+ var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
+
+ var unicode = {
+ Space_Separator: Space_Separator,
+ ID_Start: ID_Start,
+ ID_Continue: ID_Continue
+ };
+
+ var util = {
+ isSpaceSeparator: function isSpaceSeparator (c) {
+ return typeof c === 'string' && unicode.Space_Separator.test(c)
+ },
+
+ isIdStartChar: function isIdStartChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c === '$') || (c === '_') ||
+ unicode.ID_Start.test(c)
+ )
+ },
+
+ isIdContinueChar: function isIdContinueChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ (c === '$') || (c === '_') ||
+ (c === '\u200C') || (c === '\u200D') ||
+ unicode.ID_Continue.test(c)
+ )
+ },
+
+ isDigit: function isDigit (c) {
+ return typeof c === 'string' && /[0-9]/.test(c)
+ },
+
+ isHexDigit: function isHexDigit (c) {
+ return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
+ },
+ };
+
+ var source;
+ var parseState;
+ var stack;
+ var pos;
+ var line;
+ var column;
+ var token;
+ var key;
+ var root;
+
+ var parse = function parse (text, reviver) {
+ source = String(text);
+ parseState = 'start';
+ stack = [];
+ pos = 0;
+ line = 1;
+ column = 0;
+ token = undefined;
+ key = undefined;
+ root = undefined;
+
+ do {
+ token = lex();
+
+ // This code is unreachable.
+ // if (!parseStates[parseState]) {
+ // throw invalidParseState()
+ // }
+
+ parseStates[parseState]();
+ } while (token.type !== 'eof')
+
+ if (typeof reviver === 'function') {
+ return internalize({'': root}, '', reviver)
+ }
+
+ return root
+ };
+
+ function internalize (holder, name, reviver) {
+ var value = holder[name];
+ if (value != null && typeof value === 'object') {
+ for (var key in value) {
+ var replacement = internalize(value, key, reviver);
+ if (replacement === undefined) {
+ delete value[key];
+ } else {
+ value[key] = replacement;
+ }
+ }
+ }
+
+ return reviver.call(holder, name, value)
+ }
+
+ var lexState;
+ var buffer;
+ var doubleQuote;
+ var sign;
+ var c;
+
+ function lex () {
+ lexState = 'default';
+ buffer = '';
+ doubleQuote = false;
+ sign = 1;
+
+ for (;;) {
+ c = peek();
+
+ // This code is unreachable.
+ // if (!lexStates[lexState]) {
+ // throw invalidLexState(lexState)
+ // }
+
+ var token = lexStates[lexState]();
+ if (token) {
+ return token
+ }
+ }
+ }
+
+ function peek () {
+ if (source[pos]) {
+ return String.fromCodePoint(source.codePointAt(pos))
+ }
+ }
+
+ function read () {
+ var c = peek();
+
+ if (c === '\n') {
+ line++;
+ column = 0;
+ } else if (c) {
+ column += c.length;
+ } else {
+ column++;
+ }
+
+ if (c) {
+ pos += c.length;
+ }
+
+ return c
+ }
+
+ var lexStates = {
+ default: function default$1 () {
+ switch (c) {
+ case '\t':
+ case '\v':
+ case '\f':
+ case ' ':
+ case '\u00A0':
+ case '\uFEFF':
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read();
+ return
+
+ case '/':
+ read();
+ lexState = 'comment';
+ return
+
+ case undefined:
+ read();
+ return newToken('eof')
+ }
+
+ if (util.isSpaceSeparator(c)) {
+ read();
+ return
+ }
+
+ // This code is unreachable.
+ // if (!lexStates[parseState]) {
+ // throw invalidLexState(parseState)
+ // }
+
+ return lexStates[parseState]()
+ },
+
+ comment: function comment () {
+ switch (c) {
+ case '*':
+ read();
+ lexState = 'multiLineComment';
+ return
+
+ case '/':
+ read();
+ lexState = 'singleLineComment';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ multiLineComment: function multiLineComment () {
+ switch (c) {
+ case '*':
+ read();
+ lexState = 'multiLineCommentAsterisk';
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read();
+ },
+
+ multiLineCommentAsterisk: function multiLineCommentAsterisk () {
+ switch (c) {
+ case '*':
+ read();
+ return
+
+ case '/':
+ read();
+ lexState = 'default';
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read();
+ lexState = 'multiLineComment';
+ },
+
+ singleLineComment: function singleLineComment () {
+ switch (c) {
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read();
+ lexState = 'default';
+ return
+
+ case undefined:
+ read();
+ return newToken('eof')
+ }
+
+ read();
+ },
+
+ value: function value () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ case 'n':
+ read();
+ literal('ull');
+ return newToken('null', null)
+
+ case 't':
+ read();
+ literal('rue');
+ return newToken('boolean', true)
+
+ case 'f':
+ read();
+ literal('alse');
+ return newToken('boolean', false)
+
+ case '-':
+ case '+':
+ if (read() === '-') {
+ sign = -1;
+ }
+
+ lexState = 'sign';
+ return
+
+ case '.':
+ buffer = read();
+ lexState = 'decimalPointLeading';
+ return
+
+ case '0':
+ buffer = read();
+ lexState = 'zero';
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read();
+ lexState = 'decimalInteger';
+ return
+
+ case 'I':
+ read();
+ literal('nfinity');
+ return newToken('numeric', Infinity)
+
+ case 'N':
+ read();
+ literal('aN');
+ return newToken('numeric', NaN)
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"');
+ buffer = '';
+ lexState = 'string';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ identifierNameStartEscape: function identifierNameStartEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read();
+ var u = unicodeEscape();
+ switch (u) {
+ case '$':
+ case '_':
+ break
+
+ default:
+ if (!util.isIdStartChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u;
+ lexState = 'identifierName';
+ },
+
+ identifierName: function identifierName () {
+ switch (c) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ buffer += read();
+ return
+
+ case '\\':
+ read();
+ lexState = 'identifierNameEscape';
+ return
+ }
+
+ if (util.isIdContinueChar(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('identifier', buffer)
+ },
+
+ identifierNameEscape: function identifierNameEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read();
+ var u = unicodeEscape();
+ switch (u) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ break
+
+ default:
+ if (!util.isIdContinueChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u;
+ lexState = 'identifierName';
+ },
+
+ sign: function sign$1 () {
+ switch (c) {
+ case '.':
+ buffer = read();
+ lexState = 'decimalPointLeading';
+ return
+
+ case '0':
+ buffer = read();
+ lexState = 'zero';
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read();
+ lexState = 'decimalInteger';
+ return
+
+ case 'I':
+ read();
+ literal('nfinity');
+ return newToken('numeric', sign * Infinity)
+
+ case 'N':
+ read();
+ literal('aN');
+ return newToken('numeric', NaN)
+ }
+
+ throw invalidChar(read())
+ },
+
+ zero: function zero () {
+ switch (c) {
+ case '.':
+ buffer += read();
+ lexState = 'decimalPoint';
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+
+ case 'x':
+ case 'X':
+ buffer += read();
+ lexState = 'hexadecimal';
+ return
+ }
+
+ return newToken('numeric', sign * 0)
+ },
+
+ decimalInteger: function decimalInteger () {
+ switch (c) {
+ case '.':
+ buffer += read();
+ lexState = 'decimalPoint';
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalPointLeading: function decimalPointLeading () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalFraction';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalPoint: function decimalPoint () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalFraction';
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalFraction: function decimalFraction () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalExponent: function decimalExponent () {
+ switch (c) {
+ case '+':
+ case '-':
+ buffer += read();
+ lexState = 'decimalExponentSign';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalExponentInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentSign: function decimalExponentSign () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalExponentInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentInteger: function decimalExponentInteger () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ hexadecimal: function hexadecimal () {
+ if (util.isHexDigit(c)) {
+ buffer += read();
+ lexState = 'hexadecimalInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ hexadecimalInteger: function hexadecimalInteger () {
+ if (util.isHexDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ string: function string () {
+ switch (c) {
+ case '\\':
+ read();
+ buffer += escape();
+ return
+
+ case '"':
+ if (doubleQuote) {
+ read();
+ return newToken('string', buffer)
+ }
+
+ buffer += read();
+ return
+
+ case "'":
+ if (!doubleQuote) {
+ read();
+ return newToken('string', buffer)
+ }
+
+ buffer += read();
+ return
+
+ case '\n':
+ case '\r':
+ throw invalidChar(read())
+
+ case '\u2028':
+ case '\u2029':
+ separatorChar(c);
+ break
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+ },
+
+ start: function start () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ // This code is unreachable since the default lexState handles eof.
+ // case undefined:
+ // return newToken('eof')
+ }
+
+ lexState = 'value';
+ },
+
+ beforePropertyName: function beforePropertyName () {
+ switch (c) {
+ case '$':
+ case '_':
+ buffer = read();
+ lexState = 'identifierName';
+ return
+
+ case '\\':
+ read();
+ lexState = 'identifierNameStartEscape';
+ return
+
+ case '}':
+ return newToken('punctuator', read())
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"');
+ lexState = 'string';
+ return
+ }
+
+ if (util.isIdStartChar(c)) {
+ buffer += read();
+ lexState = 'identifierName';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ afterPropertyName: function afterPropertyName () {
+ if (c === ':') {
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforePropertyValue: function beforePropertyValue () {
+ lexState = 'value';
+ },
+
+ afterPropertyValue: function afterPropertyValue () {
+ switch (c) {
+ case ',':
+ case '}':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforeArrayValue: function beforeArrayValue () {
+ if (c === ']') {
+ return newToken('punctuator', read())
+ }
+
+ lexState = 'value';
+ },
+
+ afterArrayValue: function afterArrayValue () {
+ switch (c) {
+ case ',':
+ case ']':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ end: function end () {
+ // This code is unreachable since it's handled by the default lexState.
+ // if (c === undefined) {
+ // read()
+ // return newToken('eof')
+ // }
+
+ throw invalidChar(read())
+ },
+ };
+
+ function newToken (type, value) {
+ return {
+ type: type,
+ value: value,
+ line: line,
+ column: column,
+ }
+ }
+
+ function literal (s) {
+ for (var i = 0, list = s; i < list.length; i += 1) {
+ var c = list[i];
+
+ var p = peek();
+
+ if (p !== c) {
+ throw invalidChar(read())
+ }
+
+ read();
+ }
+ }
+
+ function escape () {
+ var c = peek();
+ switch (c) {
+ case 'b':
+ read();
+ return '\b'
+
+ case 'f':
+ read();
+ return '\f'
+
+ case 'n':
+ read();
+ return '\n'
+
+ case 'r':
+ read();
+ return '\r'
+
+ case 't':
+ read();
+ return '\t'
+
+ case 'v':
+ read();
+ return '\v'
+
+ case '0':
+ read();
+ if (util.isDigit(peek())) {
+ throw invalidChar(read())
+ }
+
+ return '\0'
+
+ case 'x':
+ read();
+ return hexEscape()
+
+ case 'u':
+ read();
+ return unicodeEscape()
+
+ case '\n':
+ case '\u2028':
+ case '\u2029':
+ read();
+ return ''
+
+ case '\r':
+ read();
+ if (peek() === '\n') {
+ read();
+ }
+
+ return ''
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ throw invalidChar(read())
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ return read()
+ }
+
+ function hexEscape () {
+ var buffer = '';
+ var c = peek();
+
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+
+ c = peek();
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+ }
+
+ function unicodeEscape () {
+ var buffer = '';
+ var count = 4;
+
+ while (count-- > 0) {
+ var c = peek();
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+ }
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+ }
+
+ var parseStates = {
+ start: function start () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push();
+ },
+
+ beforePropertyName: function beforePropertyName () {
+ switch (token.type) {
+ case 'identifier':
+ case 'string':
+ key = token.value;
+ parseState = 'afterPropertyName';
+ return
+
+ case 'punctuator':
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.value !== '}') {
+ // throw invalidToken()
+ // }
+
+ pop();
+ return
+
+ case 'eof':
+ throw invalidEOF()
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterPropertyName: function afterPropertyName () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator' || token.value !== ':') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ parseState = 'beforePropertyValue';
+ },
+
+ beforePropertyValue: function beforePropertyValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push();
+ },
+
+ beforeArrayValue: function beforeArrayValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ if (token.type === 'punctuator' && token.value === ']') {
+ pop();
+ return
+ }
+
+ push();
+ },
+
+ afterPropertyValue: function afterPropertyValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforePropertyName';
+ return
+
+ case '}':
+ pop();
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterArrayValue: function afterArrayValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforeArrayValue';
+ return
+
+ case ']':
+ pop();
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ end: function end () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'eof') {
+ // throw invalidToken()
+ // }
+ },
+ };
+
+ function push () {
+ var value;
+
+ switch (token.type) {
+ case 'punctuator':
+ switch (token.value) {
+ case '{':
+ value = {};
+ break
+
+ case '[':
+ value = [];
+ break
+ }
+
+ break
+
+ case 'null':
+ case 'boolean':
+ case 'numeric':
+ case 'string':
+ value = token.value;
+ break
+
+ // This code is unreachable.
+ // default:
+ // throw invalidToken()
+ }
+
+ if (root === undefined) {
+ root = value;
+ } else {
+ var parent = stack[stack.length - 1];
+ if (Array.isArray(parent)) {
+ parent.push(value);
+ } else {
+ parent[key] = value;
+ }
+ }
+
+ if (value !== null && typeof value === 'object') {
+ stack.push(value);
+
+ if (Array.isArray(value)) {
+ parseState = 'beforeArrayValue';
+ } else {
+ parseState = 'beforePropertyName';
+ }
+ } else {
+ var current = stack[stack.length - 1];
+ if (current == null) {
+ parseState = 'end';
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue';
+ } else {
+ parseState = 'afterPropertyValue';
+ }
+ }
+ }
+
+ function pop () {
+ stack.pop();
+
+ var current = stack[stack.length - 1];
+ if (current == null) {
+ parseState = 'end';
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue';
+ } else {
+ parseState = 'afterPropertyValue';
+ }
+ }
+
+ // This code is unreachable.
+ // function invalidParseState () {
+ // return new Error(`JSON5: invalid parse state '${parseState}'`)
+ // }
+
+ // This code is unreachable.
+ // function invalidLexState (state) {
+ // return new Error(`JSON5: invalid lex state '${state}'`)
+ // }
+
+ function invalidChar (c) {
+ if (c === undefined) {
+ return syntaxError(("JSON5: invalid end of input at " + line + ":" + column))
+ }
+
+ return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column))
+ }
+
+ function invalidEOF () {
+ return syntaxError(("JSON5: invalid end of input at " + line + ":" + column))
+ }
+
+ // This code is unreachable.
+ // function invalidToken () {
+ // if (token.type === 'eof') {
+ // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+ // }
+
+ // const c = String.fromCodePoint(token.value.codePointAt(0))
+ // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
+ // }
+
+ function invalidIdentifier () {
+ column -= 5;
+ return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column))
+ }
+
+ function separatorChar (c) {
+ console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping"));
+ }
+
+ function formatChar (c) {
+ var replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ };
+
+ if (replacements[c]) {
+ return replacements[c]
+ }
+
+ if (c < ' ') {
+ var hexString = c.charCodeAt(0).toString(16);
+ return '\\x' + ('00' + hexString).substring(hexString.length)
+ }
+
+ return c
+ }
+
+ function syntaxError (message) {
+ var err = new SyntaxError(message);
+ err.lineNumber = line;
+ err.columnNumber = column;
+ return err
+ }
+
+ var stringify = function stringify (value, replacer, space) {
+ var stack = [];
+ var indent = '';
+ var propertyList;
+ var replacerFunc;
+ var gap = '';
+ var quote;
+
+ if (
+ replacer != null &&
+ typeof replacer === 'object' &&
+ !Array.isArray(replacer)
+ ) {
+ space = replacer.space;
+ quote = replacer.quote;
+ replacer = replacer.replacer;
+ }
+
+ if (typeof replacer === 'function') {
+ replacerFunc = replacer;
+ } else if (Array.isArray(replacer)) {
+ propertyList = [];
+ for (var i = 0, list = replacer; i < list.length; i += 1) {
+ var v = list[i];
+
+ var item = (void 0);
+
+ if (typeof v === 'string') {
+ item = v;
+ } else if (
+ typeof v === 'number' ||
+ v instanceof String ||
+ v instanceof Number
+ ) {
+ item = String(v);
+ }
+
+ if (item !== undefined && propertyList.indexOf(item) < 0) {
+ propertyList.push(item);
+ }
+ }
+ }
+
+ if (space instanceof Number) {
+ space = Number(space);
+ } else if (space instanceof String) {
+ space = String(space);
+ }
+
+ if (typeof space === 'number') {
+ if (space > 0) {
+ space = Math.min(10, Math.floor(space));
+ gap = ' '.substr(0, space);
+ }
+ } else if (typeof space === 'string') {
+ gap = space.substr(0, 10);
+ }
+
+ return serializeProperty('', {'': value})
+
+ function serializeProperty (key, holder) {
+ var value = holder[key];
+ if (value != null) {
+ if (typeof value.toJSON5 === 'function') {
+ value = value.toJSON5(key);
+ } else if (typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+ }
+
+ if (replacerFunc) {
+ value = replacerFunc.call(holder, key, value);
+ }
+
+ if (value instanceof Number) {
+ value = Number(value);
+ } else if (value instanceof String) {
+ value = String(value);
+ } else if (value instanceof Boolean) {
+ value = value.valueOf();
+ }
+
+ switch (value) {
+ case null: return 'null'
+ case true: return 'true'
+ case false: return 'false'
+ }
+
+ if (typeof value === 'string') {
+ return quoteString(value, false)
+ }
+
+ if (typeof value === 'number') {
+ return String(value)
+ }
+
+ if (typeof value === 'object') {
+ return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
+ }
+
+ return undefined
+ }
+
+ function quoteString (value) {
+ var quotes = {
+ "'": 0.1,
+ '"': 0.2,
+ };
+
+ var replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ };
+
+ var product = '';
+
+ for (var i = 0; i < value.length; i++) {
+ var c = value[i];
+ switch (c) {
+ case "'":
+ case '"':
+ quotes[c]++;
+ product += c;
+ continue
+
+ case '\0':
+ if (util.isDigit(value[i + 1])) {
+ product += '\\x00';
+ continue
+ }
+ }
+
+ if (replacements[c]) {
+ product += replacements[c];
+ continue
+ }
+
+ if (c < ' ') {
+ var hexString = c.charCodeAt(0).toString(16);
+ product += '\\x' + ('00' + hexString).substring(hexString.length);
+ continue
+ }
+
+ product += c;
+ }
+
+ var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; });
+
+ product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);
+
+ return quoteChar + product + quoteChar
+ }
+
+ function serializeObject (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value);
+
+ var stepback = indent;
+ indent = indent + gap;
+
+ var keys = propertyList || Object.keys(value);
+ var partial = [];
+ for (var i = 0, list = keys; i < list.length; i += 1) {
+ var key = list[i];
+
+ var propertyString = serializeProperty(key, value);
+ if (propertyString !== undefined) {
+ var member = serializeKey(key) + ':';
+ if (gap !== '') {
+ member += ' ';
+ }
+ member += propertyString;
+ partial.push(member);
+ }
+ }
+
+ var final;
+ if (partial.length === 0) {
+ final = '{}';
+ } else {
+ var properties;
+ if (gap === '') {
+ properties = partial.join(',');
+ final = '{' + properties + '}';
+ } else {
+ var separator = ',\n' + indent;
+ properties = partial.join(separator);
+ final = '{\n' + indent + properties + ',\n' + stepback + '}';
+ }
+ }
+
+ stack.pop();
+ indent = stepback;
+ return final
+ }
+
+ function serializeKey (key) {
+ if (key.length === 0) {
+ return quoteString(key, true)
+ }
+
+ var firstChar = String.fromCodePoint(key.codePointAt(0));
+ if (!util.isIdStartChar(firstChar)) {
+ return quoteString(key, true)
+ }
+
+ for (var i = firstChar.length; i < key.length; i++) {
+ if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
+ return quoteString(key, true)
+ }
+ }
+
+ return key
+ }
+
+ function serializeArray (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value);
+
+ var stepback = indent;
+ indent = indent + gap;
+
+ var partial = [];
+ for (var i = 0; i < value.length; i++) {
+ var propertyString = serializeProperty(String(i), value);
+ partial.push((propertyString !== undefined) ? propertyString : 'null');
+ }
+
+ var final;
+ if (partial.length === 0) {
+ final = '[]';
+ } else {
+ if (gap === '') {
+ var properties = partial.join(',');
+ final = '[' + properties + ']';
+ } else {
+ var separator = ',\n' + indent;
+ var properties$1 = partial.join(separator);
+ final = '[\n' + indent + properties$1 + ',\n' + stepback + ']';
+ }
+ }
+
+ stack.pop();
+ indent = stepback;
+ return final
+ }
+ };
+
+ var JSON5 = {
+ parse: parse,
+ stringify: stringify,
+ };
+
+ var lib = JSON5;
+
+ var es5 = lib;
+
+ return es5;
+
+})));
diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js
new file mode 100644
index 00000000000..da63a9da38f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.js
@@ -0,0 +1 @@
+!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),t=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),r=function(u){if(!t(u))throw TypeError(u+" is not an object!");return u},F=function(u){try{return!!u()}catch(u){return!0}},n=!F(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=t(C)&&t(C.createElement),i=!n&&!F(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:n?Object.defineProperty:function(u,D,e){if(r(u),D=function(u,D){if(!t(u))return u;var e,r;if(D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;if("function"==typeof(e=u.valueOf)&&!t(r=e.call(u)))return r;if(!D&&"function"==typeof(e=u.toString)&&!t(r=e.call(u)))return r;throw TypeError("Can't convert object to primitive value")}(D,!0),r(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=n?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var t=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return t[u]||(t[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var t,r="Symbol(".concat(void 0===(t="src")?"":t,")_",(++s+f).toString(36)),F=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,t,n){var C="function"==typeof t;C&&(B(t,"name")||a(t,"name",e)),u[e]!==t&&(C&&(B(t,r)||a(t,r,u[e]?""+u[e]:F.join(String(e)))),u===D?u[e]=t:n?u[e]?u[e]=t:a(u,e,t):(delete u[e],a(u,e,t)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,t){return u.call(D,e,t)};case 3:return function(e,t,r){return u.call(D,e,t,r)}}return function(){return u.apply(D,arguments)}},p=function(u,t,r){var F,n,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[t]||(D[t]={}):(D[t]||{}).prototype,f=E?e:e[t]||(e[t]={}),l=f.prototype||(f.prototype={});for(F in E&&(r=t),r)C=((n=!i&&s&&void 0!==s[F])?s:r)[F],A=B&&n?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,F,C,u&p.U),f[F]!=C&&a(f,F,A),c&&l[F]!=C&&(l[F]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},S=(h=!1,function(u,D){var e,t,r=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),F=w(D),n=r.length;return F<0||F>=n?h?"":void 0:(e=r.charCodeAt(F))<55296||e>56319||F+1===n||(t=r.charCodeAt(F+1))<56320||t>57343?h?r.charAt(F):e:h?r.slice(F,F+2):t-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return S(this,u)}});e.String.codePointAt;var b=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,t,r=arguments,F=[],n=arguments.length,C=0;n>C;){if(D=+r[C++],t=1114111,((e=w(e=D))<0?b(e+t,0):x(e,t))!==D)throw RangeError(D+" is not a valid code point");F.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return F.join("")}});e.String.fromCodePoint;var _,I,O,j,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[j])return String.fromCodePoint(_.codePointAt(j))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(j+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[I]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw tu(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw tu(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw tu(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw tu(W())},identifierNameStartEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw Fu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw tu(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw Fu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw tu(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw tu(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw tu(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw tu(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw tu(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw tu(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw tu(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw tu(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw tu(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+nu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw tu(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw tu(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw tu(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw tu(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw tu(W())},end:function(){throw tu(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D<e.length;D+=1){var t=e[D];if(q()!==t)throw tu(W());W()}}function Y(){for(var u="",D=4;D-- >0;){var e=q();if(!U.isHexDigit(e))throw tu(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw ru();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(I="afterPropertyName");case"punctuator":return void eu();case"eof":throw ru()}},afterPropertyName:function(){if("eof"===M.type)throw ru();I="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw ru();Du()},beforeArrayValue:function(){if("eof"===M.type)throw ru();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw ru();switch(M.value){case",":return void(I="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=O[O.length-1];Array.isArray(D)?D.push(u):D[k]=u}if(null!==u&&"object"==typeof u)O.push(u),I=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=O[O.length-1];I=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){O.pop();var u=O[O.length-1];I=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function tu(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+nu(u)+"' at "+V+":"+J)}function ru(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function Fu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function nu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),I="start",O=[],j=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[I]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,t){var r=D[e];if(null!=r&&"object"==typeof r)for(var F in r){var n=u(r,F,t);void 0===n?delete r[F]:r[F]=n}return t.call(D,e,r)}({"":L},"",D):L},stringify:function(u,D,e){var t,r,F,n=[],C="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,F=D.quote,D=D.replacer),"function"==typeof D)r=D;else if(Array.isArray(D)){t=[];for(var i=0,E=D;i<E.length;i+=1){var o=E[i],a=void 0;"string"==typeof o?a=o:("number"==typeof o||o instanceof String||o instanceof Number)&&(a=String(o)),void 0!==a&&t.indexOf(a)<0&&t.push(a)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),r&&(e=r.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,t=[],r=0;r<u.length;r++){var F=c(String(r),u);t.push(void 0!==F?F:"null")}if(0===t.length)e="[]";else if(""===A){var i=t.join(",");e="["+i+"]"}else{var E=",\n"+C,o=t.join(E);e="[\n"+C+o+",\n"+D+"]"}return n.pop(),C=D,e}(e):function(u){if(n.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");n.push(u);var D=C;C+=A;for(var e,r,F=t||Object.keys(u),i=[],E=0,o=F;E<o.length;E+=1){var a=o[E],B=c(a,u);if(void 0!==B){var f=s(a)+":";""!==A&&(f+=" "),f+=B,i.push(f)}}if(0===i.length)e="{}";else if(""===A)r=i.join(","),e="{"+r+"}";else{var l=",\n"+C;r=i.join(l),e="{\n"+C+r+",\n"+D+"}"}return n.pop(),C=D,e}(e):void 0}function B(u){for(var D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},t="",r=0;r<u.length;r++){var n=u[r];switch(n){case"'":case'"':D[n]++,t+=n;continue;case"\0":if(U.isDigit(u[r+1])){t+="\\x00";continue}}if(e[n])t+=e[n];else if(n<" "){var C=n.charCodeAt(0).toString(16);t+="\\x"+("00"+C).substring(C.length)}else t+=n}var A=F||Object.keys(D).reduce(function(u,e){return D[u]<D[e]?u:e});return A+(t=t.replace(new RegExp(A,"g"),e[A]))+A}function s(u){if(0===u.length)return B(u);var D=String.fromCodePoint(u.codePointAt(0));if(!U.isIdStartChar(D))return B(u);for(var e=D.length;e<u.length;e++)if(!U.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return B(u);return u}}}});
diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.mjs b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.mjs
new file mode 100644
index 00000000000..3ac68cb11ae
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.min.mjs
@@ -0,0 +1 @@
+var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue},util={isSpaceSeparator:u=>"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)for(const u in r){const D=internalize(r,u,e);void 0===D?delete r[u]:r[u]=D}return e.call(u,D,r)}let lexState,buffer,doubleQuote,sign,c;function lex(){for(lexState="default",buffer="",doubleQuote=!1,sign=1;;){c=peek();const u=lexStates[lexState]();if(u)return u}}function peek(){if(source[pos])return String.fromCodePoint(source.codePointAt(pos))}function read(){const u=peek();return"\n"===u?(line++,column=0):u?column+=u.length:column++,u&&(pos+=u.length),u}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void read();case"/":return read(),void(lexState="comment");case void 0:return read(),newToken("eof")}if(!util.isSpaceSeparator(c))return lexStates[parseState]();read()},comment(){switch(c){case"*":return read(),void(lexState="multiLineComment");case"/":return read(),void(lexState="singleLineComment")}throw invalidChar(read())},multiLineComment(){switch(c){case"*":return read(),void(lexState="multiLineCommentAsterisk");case void 0:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":return void read();case"/":return read(),void(lexState="default");case void 0:throw invalidChar(read())}read(),lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":return read(),void(lexState="default");case void 0:return read(),newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":return read(),literal("ull"),newToken("null",null);case"t":return read(),literal("rue"),newToken("boolean",!0);case"f":return read(),literal("alse"),newToken("boolean",!1);case"-":case"+":return"-"===read()&&(sign=-1),void(lexState="sign");case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",1/0);case"N":return read(),literal("aN"),newToken("numeric",NaN);case'"':case"'":return doubleQuote='"'===read(),buffer="",void(lexState="string")}throw invalidChar(read())},identifierNameStartEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"‌":case"‍":return void(buffer+=read());case"\\":return read(),void(lexState="identifierNameEscape")}if(!util.isIdContinueChar(c))return newToken("identifier",buffer);buffer+=read()},identifierNameEscape(){if("u"!==c)throw invalidChar(read());read();const u=unicodeEscape();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!util.isIdContinueChar(u))throw invalidIdentifier()}buffer+=u,lexState="identifierName"},sign(){switch(c){case".":return buffer=read(),void(lexState="decimalPointLeading");case"0":return buffer=read(),void(lexState="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return buffer=read(),void(lexState="decimalInteger");case"I":return read(),literal("nfinity"),newToken("numeric",sign*(1/0));case"N":return read(),literal("aN"),newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent");case"x":case"X":return buffer+=read(),void(lexState="hexadecimal")}return newToken("numeric",0*sign)},decimalInteger(){switch(c){case".":return buffer+=read(),void(lexState="decimalPoint");case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalPointLeading(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalFraction");throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}return util.isDigit(c)?(buffer+=read(),void(lexState="decimalFraction")):newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":return buffer+=read(),void(lexState="decimalExponent")}if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},decimalExponent(){switch(c){case"+":case"-":return buffer+=read(),void(lexState="decimalExponentSign")}if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c))return buffer+=read(),void(lexState="decimalExponentInteger");throw invalidChar(read())},decimalExponentInteger(){if(!util.isDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},hexadecimal(){if(util.isHexDigit(c))return buffer+=read(),void(lexState="hexadecimalInteger");throw invalidChar(read())},hexadecimalInteger(){if(!util.isHexDigit(c))return newToken("numeric",sign*Number(buffer));buffer+=read()},string(){switch(c){case"\\":return read(),void(buffer+=escape());case'"':return doubleQuote?(read(),newToken("string",buffer)):void(buffer+=read());case"'":return doubleQuote?void(buffer+=read()):(read(),newToken("string",buffer));case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case void 0:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":return buffer=read(),void(lexState="identifierName");case"\\":return read(),void(lexState="identifierNameStartEscape");case"}":return newToken("punctuator",read());case'"':case"'":return doubleQuote='"'===read(),void(lexState="string")}if(util.isIdStartChar(c))return buffer+=read(),void(lexState="identifierName");throw invalidChar(read())},afterPropertyName(){if(":"===c)return newToken("punctuator",read());throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if("]"===c)return newToken("punctuator",read());lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(u,D){return{type:u,value:D,line:line,column:column}}function literal(u){for(const D of u){if(peek()!==D)throw invalidChar(read());read()}}function escape(){switch(peek()){case"b":return read(),"\b";case"f":return read(),"\f";case"n":return read(),"\n";case"r":return read(),"\r";case"t":return read(),"\t";case"v":return read(),"\v";case"0":if(read(),util.isDigit(peek()))throw invalidChar(read());return"\0";case"x":return read(),hexEscape();case"u":return read(),unicodeEscape();case"\n":case"\u2028":case"\u2029":return read(),"";case"\r":return read(),"\n"===peek()&&read(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw invalidChar(read())}return read()}function hexEscape(){let u="",D=peek();if(!util.isHexDigit(D))throw invalidChar(read());if(u+=read(),D=peek(),!util.isHexDigit(D))throw invalidChar(read());return u+=read(),String.fromCodePoint(parseInt(u,16))}function unicodeEscape(){let u="",D=4;for(;D-- >0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):D[key]=u}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),E("",{"":u});function E(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?n(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D<u.length;D++){const e=E(String(D),u);t.push(void 0!==e?e:"null")}if(0===t.length)e="[]";else if(""===A){let u=t.join(",");e="["+u+"]"}else{let u=",\n"+a,r=t.join(u);e="[\n"+a+r+",\n"+D+"]"}return r.pop(),a=D,e}(e):function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=E(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function n(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;t<u.length;t++){const F=u[t];switch(F){case"'":case'"':D[F]++,r+=F;continue;case"\0":if(util.isDigit(u[t+1])){r+="\\x00";continue}}if(e[F])r+=e[F];else if(F<" "){let u=F.charCodeAt(0).toString(16);r+="\\x"+("00"+u).substring(u.length)}else r+=F}const t=C||Object.keys(D).reduce((u,e)=>D[u]<D[e]?u:e);return t+(r=r.replace(new RegExp(t,"g"),e[t]))+t}function i(u){if(0===u.length)return n(u);const D=String.fromCodePoint(u.codePointAt(0));if(!util.isIdStartChar(D))return n(u);for(let e=D.length;e<u.length;e++)if(!util.isIdContinueChar(String.fromCodePoint(u.codePointAt(e))))return n(u);return u}};const JSON5={parse:parse,stringify:stringify};var lib=JSON5;export default lib;
diff --git a/tools/node_modules/@babel/core/node_modules/json5/dist/index.mjs b/tools/node_modules/@babel/core/node_modules/json5/dist/index.mjs
new file mode 100644
index 00000000000..8fe50735cc4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/dist/index.mjs
@@ -0,0 +1,1399 @@
+// This is a generated file. Do not edit.
+var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/;
+var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
+var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
+
+var unicode = {
+ Space_Separator: Space_Separator,
+ ID_Start: ID_Start,
+ ID_Continue: ID_Continue
+};
+
+var util = {
+ isSpaceSeparator (c) {
+ return typeof c === 'string' && unicode.Space_Separator.test(c)
+ },
+
+ isIdStartChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c === '$') || (c === '_') ||
+ unicode.ID_Start.test(c)
+ )
+ },
+
+ isIdContinueChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ (c === '$') || (c === '_') ||
+ (c === '\u200C') || (c === '\u200D') ||
+ unicode.ID_Continue.test(c)
+ )
+ },
+
+ isDigit (c) {
+ return typeof c === 'string' && /[0-9]/.test(c)
+ },
+
+ isHexDigit (c) {
+ return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
+ },
+};
+
+let source;
+let parseState;
+let stack;
+let pos;
+let line;
+let column;
+let token;
+let key;
+let root;
+
+var parse = function parse (text, reviver) {
+ source = String(text);
+ parseState = 'start';
+ stack = [];
+ pos = 0;
+ line = 1;
+ column = 0;
+ token = undefined;
+ key = undefined;
+ root = undefined;
+
+ do {
+ token = lex();
+
+ // This code is unreachable.
+ // if (!parseStates[parseState]) {
+ // throw invalidParseState()
+ // }
+
+ parseStates[parseState]();
+ } while (token.type !== 'eof')
+
+ if (typeof reviver === 'function') {
+ return internalize({'': root}, '', reviver)
+ }
+
+ return root
+};
+
+function internalize (holder, name, reviver) {
+ const value = holder[name];
+ if (value != null && typeof value === 'object') {
+ for (const key in value) {
+ const replacement = internalize(value, key, reviver);
+ if (replacement === undefined) {
+ delete value[key];
+ } else {
+ value[key] = replacement;
+ }
+ }
+ }
+
+ return reviver.call(holder, name, value)
+}
+
+let lexState;
+let buffer;
+let doubleQuote;
+let sign;
+let c;
+
+function lex () {
+ lexState = 'default';
+ buffer = '';
+ doubleQuote = false;
+ sign = 1;
+
+ for (;;) {
+ c = peek();
+
+ // This code is unreachable.
+ // if (!lexStates[lexState]) {
+ // throw invalidLexState(lexState)
+ // }
+
+ const token = lexStates[lexState]();
+ if (token) {
+ return token
+ }
+ }
+}
+
+function peek () {
+ if (source[pos]) {
+ return String.fromCodePoint(source.codePointAt(pos))
+ }
+}
+
+function read () {
+ const c = peek();
+
+ if (c === '\n') {
+ line++;
+ column = 0;
+ } else if (c) {
+ column += c.length;
+ } else {
+ column++;
+ }
+
+ if (c) {
+ pos += c.length;
+ }
+
+ return c
+}
+
+const lexStates = {
+ default () {
+ switch (c) {
+ case '\t':
+ case '\v':
+ case '\f':
+ case ' ':
+ case '\u00A0':
+ case '\uFEFF':
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read();
+ return
+
+ case '/':
+ read();
+ lexState = 'comment';
+ return
+
+ case undefined:
+ read();
+ return newToken('eof')
+ }
+
+ if (util.isSpaceSeparator(c)) {
+ read();
+ return
+ }
+
+ // This code is unreachable.
+ // if (!lexStates[parseState]) {
+ // throw invalidLexState(parseState)
+ // }
+
+ return lexStates[parseState]()
+ },
+
+ comment () {
+ switch (c) {
+ case '*':
+ read();
+ lexState = 'multiLineComment';
+ return
+
+ case '/':
+ read();
+ lexState = 'singleLineComment';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ multiLineComment () {
+ switch (c) {
+ case '*':
+ read();
+ lexState = 'multiLineCommentAsterisk';
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read();
+ },
+
+ multiLineCommentAsterisk () {
+ switch (c) {
+ case '*':
+ read();
+ return
+
+ case '/':
+ read();
+ lexState = 'default';
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read();
+ lexState = 'multiLineComment';
+ },
+
+ singleLineComment () {
+ switch (c) {
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read();
+ lexState = 'default';
+ return
+
+ case undefined:
+ read();
+ return newToken('eof')
+ }
+
+ read();
+ },
+
+ value () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ case 'n':
+ read();
+ literal('ull');
+ return newToken('null', null)
+
+ case 't':
+ read();
+ literal('rue');
+ return newToken('boolean', true)
+
+ case 'f':
+ read();
+ literal('alse');
+ return newToken('boolean', false)
+
+ case '-':
+ case '+':
+ if (read() === '-') {
+ sign = -1;
+ }
+
+ lexState = 'sign';
+ return
+
+ case '.':
+ buffer = read();
+ lexState = 'decimalPointLeading';
+ return
+
+ case '0':
+ buffer = read();
+ lexState = 'zero';
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read();
+ lexState = 'decimalInteger';
+ return
+
+ case 'I':
+ read();
+ literal('nfinity');
+ return newToken('numeric', Infinity)
+
+ case 'N':
+ read();
+ literal('aN');
+ return newToken('numeric', NaN)
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"');
+ buffer = '';
+ lexState = 'string';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ identifierNameStartEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read();
+ const u = unicodeEscape();
+ switch (u) {
+ case '$':
+ case '_':
+ break
+
+ default:
+ if (!util.isIdStartChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u;
+ lexState = 'identifierName';
+ },
+
+ identifierName () {
+ switch (c) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ buffer += read();
+ return
+
+ case '\\':
+ read();
+ lexState = 'identifierNameEscape';
+ return
+ }
+
+ if (util.isIdContinueChar(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('identifier', buffer)
+ },
+
+ identifierNameEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read();
+ const u = unicodeEscape();
+ switch (u) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ break
+
+ default:
+ if (!util.isIdContinueChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u;
+ lexState = 'identifierName';
+ },
+
+ sign () {
+ switch (c) {
+ case '.':
+ buffer = read();
+ lexState = 'decimalPointLeading';
+ return
+
+ case '0':
+ buffer = read();
+ lexState = 'zero';
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read();
+ lexState = 'decimalInteger';
+ return
+
+ case 'I':
+ read();
+ literal('nfinity');
+ return newToken('numeric', sign * Infinity)
+
+ case 'N':
+ read();
+ literal('aN');
+ return newToken('numeric', NaN)
+ }
+
+ throw invalidChar(read())
+ },
+
+ zero () {
+ switch (c) {
+ case '.':
+ buffer += read();
+ lexState = 'decimalPoint';
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+
+ case 'x':
+ case 'X':
+ buffer += read();
+ lexState = 'hexadecimal';
+ return
+ }
+
+ return newToken('numeric', sign * 0)
+ },
+
+ decimalInteger () {
+ switch (c) {
+ case '.':
+ buffer += read();
+ lexState = 'decimalPoint';
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalPointLeading () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalFraction';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalPoint () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalFraction';
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalFraction () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read();
+ lexState = 'decimalExponent';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalExponent () {
+ switch (c) {
+ case '+':
+ case '-':
+ buffer += read();
+ lexState = 'decimalExponentSign';
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalExponentInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentSign () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ lexState = 'decimalExponentInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentInteger () {
+ if (util.isDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ hexadecimal () {
+ if (util.isHexDigit(c)) {
+ buffer += read();
+ lexState = 'hexadecimalInteger';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ hexadecimalInteger () {
+ if (util.isHexDigit(c)) {
+ buffer += read();
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ string () {
+ switch (c) {
+ case '\\':
+ read();
+ buffer += escape();
+ return
+
+ case '"':
+ if (doubleQuote) {
+ read();
+ return newToken('string', buffer)
+ }
+
+ buffer += read();
+ return
+
+ case "'":
+ if (!doubleQuote) {
+ read();
+ return newToken('string', buffer)
+ }
+
+ buffer += read();
+ return
+
+ case '\n':
+ case '\r':
+ throw invalidChar(read())
+
+ case '\u2028':
+ case '\u2029':
+ separatorChar(c);
+ break
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+ },
+
+ start () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ // This code is unreachable since the default lexState handles eof.
+ // case undefined:
+ // return newToken('eof')
+ }
+
+ lexState = 'value';
+ },
+
+ beforePropertyName () {
+ switch (c) {
+ case '$':
+ case '_':
+ buffer = read();
+ lexState = 'identifierName';
+ return
+
+ case '\\':
+ read();
+ lexState = 'identifierNameStartEscape';
+ return
+
+ case '}':
+ return newToken('punctuator', read())
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"');
+ lexState = 'string';
+ return
+ }
+
+ if (util.isIdStartChar(c)) {
+ buffer += read();
+ lexState = 'identifierName';
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ afterPropertyName () {
+ if (c === ':') {
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforePropertyValue () {
+ lexState = 'value';
+ },
+
+ afterPropertyValue () {
+ switch (c) {
+ case ',':
+ case '}':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforeArrayValue () {
+ if (c === ']') {
+ return newToken('punctuator', read())
+ }
+
+ lexState = 'value';
+ },
+
+ afterArrayValue () {
+ switch (c) {
+ case ',':
+ case ']':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ end () {
+ // This code is unreachable since it's handled by the default lexState.
+ // if (c === undefined) {
+ // read()
+ // return newToken('eof')
+ // }
+
+ throw invalidChar(read())
+ },
+};
+
+function newToken (type, value) {
+ return {
+ type,
+ value,
+ line,
+ column,
+ }
+}
+
+function literal (s) {
+ for (const c of s) {
+ const p = peek();
+
+ if (p !== c) {
+ throw invalidChar(read())
+ }
+
+ read();
+ }
+}
+
+function escape () {
+ const c = peek();
+ switch (c) {
+ case 'b':
+ read();
+ return '\b'
+
+ case 'f':
+ read();
+ return '\f'
+
+ case 'n':
+ read();
+ return '\n'
+
+ case 'r':
+ read();
+ return '\r'
+
+ case 't':
+ read();
+ return '\t'
+
+ case 'v':
+ read();
+ return '\v'
+
+ case '0':
+ read();
+ if (util.isDigit(peek())) {
+ throw invalidChar(read())
+ }
+
+ return '\0'
+
+ case 'x':
+ read();
+ return hexEscape()
+
+ case 'u':
+ read();
+ return unicodeEscape()
+
+ case '\n':
+ case '\u2028':
+ case '\u2029':
+ read();
+ return ''
+
+ case '\r':
+ read();
+ if (peek() === '\n') {
+ read();
+ }
+
+ return ''
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ throw invalidChar(read())
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ return read()
+}
+
+function hexEscape () {
+ let buffer = '';
+ let c = peek();
+
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+
+ c = peek();
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+}
+
+function unicodeEscape () {
+ let buffer = '';
+ let count = 4;
+
+ while (count-- > 0) {
+ const c = peek();
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read();
+ }
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+}
+
+const parseStates = {
+ start () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push();
+ },
+
+ beforePropertyName () {
+ switch (token.type) {
+ case 'identifier':
+ case 'string':
+ key = token.value;
+ parseState = 'afterPropertyName';
+ return
+
+ case 'punctuator':
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.value !== '}') {
+ // throw invalidToken()
+ // }
+
+ pop();
+ return
+
+ case 'eof':
+ throw invalidEOF()
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterPropertyName () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator' || token.value !== ':') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ parseState = 'beforePropertyValue';
+ },
+
+ beforePropertyValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push();
+ },
+
+ beforeArrayValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ if (token.type === 'punctuator' && token.value === ']') {
+ pop();
+ return
+ }
+
+ push();
+ },
+
+ afterPropertyValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforePropertyName';
+ return
+
+ case '}':
+ pop();
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterArrayValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforeArrayValue';
+ return
+
+ case ']':
+ pop();
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ end () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'eof') {
+ // throw invalidToken()
+ // }
+ },
+};
+
+function push () {
+ let value;
+
+ switch (token.type) {
+ case 'punctuator':
+ switch (token.value) {
+ case '{':
+ value = {};
+ break
+
+ case '[':
+ value = [];
+ break
+ }
+
+ break
+
+ case 'null':
+ case 'boolean':
+ case 'numeric':
+ case 'string':
+ value = token.value;
+ break
+
+ // This code is unreachable.
+ // default:
+ // throw invalidToken()
+ }
+
+ if (root === undefined) {
+ root = value;
+ } else {
+ const parent = stack[stack.length - 1];
+ if (Array.isArray(parent)) {
+ parent.push(value);
+ } else {
+ parent[key] = value;
+ }
+ }
+
+ if (value !== null && typeof value === 'object') {
+ stack.push(value);
+
+ if (Array.isArray(value)) {
+ parseState = 'beforeArrayValue';
+ } else {
+ parseState = 'beforePropertyName';
+ }
+ } else {
+ const current = stack[stack.length - 1];
+ if (current == null) {
+ parseState = 'end';
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue';
+ } else {
+ parseState = 'afterPropertyValue';
+ }
+ }
+}
+
+function pop () {
+ stack.pop();
+
+ const current = stack[stack.length - 1];
+ if (current == null) {
+ parseState = 'end';
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue';
+ } else {
+ parseState = 'afterPropertyValue';
+ }
+}
+
+// This code is unreachable.
+// function invalidParseState () {
+// return new Error(`JSON5: invalid parse state '${parseState}'`)
+// }
+
+// This code is unreachable.
+// function invalidLexState (state) {
+// return new Error(`JSON5: invalid lex state '${state}'`)
+// }
+
+function invalidChar (c) {
+ if (c === undefined) {
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+ }
+
+ return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
+}
+
+function invalidEOF () {
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+}
+
+// This code is unreachable.
+// function invalidToken () {
+// if (token.type === 'eof') {
+// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+// }
+
+// const c = String.fromCodePoint(token.value.codePointAt(0))
+// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
+// }
+
+function invalidIdentifier () {
+ column -= 5;
+ return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)
+}
+
+function separatorChar (c) {
+ console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);
+}
+
+function formatChar (c) {
+ const replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ };
+
+ if (replacements[c]) {
+ return replacements[c]
+ }
+
+ if (c < ' ') {
+ const hexString = c.charCodeAt(0).toString(16);
+ return '\\x' + ('00' + hexString).substring(hexString.length)
+ }
+
+ return c
+}
+
+function syntaxError (message) {
+ const err = new SyntaxError(message);
+ err.lineNumber = line;
+ err.columnNumber = column;
+ return err
+}
+
+var stringify = function stringify (value, replacer, space) {
+ const stack = [];
+ let indent = '';
+ let propertyList;
+ let replacerFunc;
+ let gap = '';
+ let quote;
+
+ if (
+ replacer != null &&
+ typeof replacer === 'object' &&
+ !Array.isArray(replacer)
+ ) {
+ space = replacer.space;
+ quote = replacer.quote;
+ replacer = replacer.replacer;
+ }
+
+ if (typeof replacer === 'function') {
+ replacerFunc = replacer;
+ } else if (Array.isArray(replacer)) {
+ propertyList = [];
+ for (const v of replacer) {
+ let item;
+
+ if (typeof v === 'string') {
+ item = v;
+ } else if (
+ typeof v === 'number' ||
+ v instanceof String ||
+ v instanceof Number
+ ) {
+ item = String(v);
+ }
+
+ if (item !== undefined && propertyList.indexOf(item) < 0) {
+ propertyList.push(item);
+ }
+ }
+ }
+
+ if (space instanceof Number) {
+ space = Number(space);
+ } else if (space instanceof String) {
+ space = String(space);
+ }
+
+ if (typeof space === 'number') {
+ if (space > 0) {
+ space = Math.min(10, Math.floor(space));
+ gap = ' '.substr(0, space);
+ }
+ } else if (typeof space === 'string') {
+ gap = space.substr(0, 10);
+ }
+
+ return serializeProperty('', {'': value})
+
+ function serializeProperty (key, holder) {
+ let value = holder[key];
+ if (value != null) {
+ if (typeof value.toJSON5 === 'function') {
+ value = value.toJSON5(key);
+ } else if (typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+ }
+
+ if (replacerFunc) {
+ value = replacerFunc.call(holder, key, value);
+ }
+
+ if (value instanceof Number) {
+ value = Number(value);
+ } else if (value instanceof String) {
+ value = String(value);
+ } else if (value instanceof Boolean) {
+ value = value.valueOf();
+ }
+
+ switch (value) {
+ case null: return 'null'
+ case true: return 'true'
+ case false: return 'false'
+ }
+
+ if (typeof value === 'string') {
+ return quoteString(value, false)
+ }
+
+ if (typeof value === 'number') {
+ return String(value)
+ }
+
+ if (typeof value === 'object') {
+ return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
+ }
+
+ return undefined
+ }
+
+ function quoteString (value) {
+ const quotes = {
+ "'": 0.1,
+ '"': 0.2,
+ };
+
+ const replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ };
+
+ let product = '';
+
+ for (let i = 0; i < value.length; i++) {
+ const c = value[i];
+ switch (c) {
+ case "'":
+ case '"':
+ quotes[c]++;
+ product += c;
+ continue
+
+ case '\0':
+ if (util.isDigit(value[i + 1])) {
+ product += '\\x00';
+ continue
+ }
+ }
+
+ if (replacements[c]) {
+ product += replacements[c];
+ continue
+ }
+
+ if (c < ' ') {
+ let hexString = c.charCodeAt(0).toString(16);
+ product += '\\x' + ('00' + hexString).substring(hexString.length);
+ continue
+ }
+
+ product += c;
+ }
+
+ const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b);
+
+ product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);
+
+ return quoteChar + product + quoteChar
+ }
+
+ function serializeObject (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value);
+
+ let stepback = indent;
+ indent = indent + gap;
+
+ let keys = propertyList || Object.keys(value);
+ let partial = [];
+ for (const key of keys) {
+ const propertyString = serializeProperty(key, value);
+ if (propertyString !== undefined) {
+ let member = serializeKey(key) + ':';
+ if (gap !== '') {
+ member += ' ';
+ }
+ member += propertyString;
+ partial.push(member);
+ }
+ }
+
+ let final;
+ if (partial.length === 0) {
+ final = '{}';
+ } else {
+ let properties;
+ if (gap === '') {
+ properties = partial.join(',');
+ final = '{' + properties + '}';
+ } else {
+ let separator = ',\n' + indent;
+ properties = partial.join(separator);
+ final = '{\n' + indent + properties + ',\n' + stepback + '}';
+ }
+ }
+
+ stack.pop();
+ indent = stepback;
+ return final
+ }
+
+ function serializeKey (key) {
+ if (key.length === 0) {
+ return quoteString(key, true)
+ }
+
+ const firstChar = String.fromCodePoint(key.codePointAt(0));
+ if (!util.isIdStartChar(firstChar)) {
+ return quoteString(key, true)
+ }
+
+ for (let i = firstChar.length; i < key.length; i++) {
+ if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
+ return quoteString(key, true)
+ }
+ }
+
+ return key
+ }
+
+ function serializeArray (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value);
+
+ let stepback = indent;
+ indent = indent + gap;
+
+ let partial = [];
+ for (let i = 0; i < value.length; i++) {
+ const propertyString = serializeProperty(String(i), value);
+ partial.push((propertyString !== undefined) ? propertyString : 'null');
+ }
+
+ let final;
+ if (partial.length === 0) {
+ final = '[]';
+ } else {
+ if (gap === '') {
+ let properties = partial.join(',');
+ final = '[' + properties + ']';
+ } else {
+ let separator = ',\n' + indent;
+ let properties = partial.join(separator);
+ final = '[\n' + indent + properties + ',\n' + stepback + ']';
+ }
+ }
+
+ stack.pop();
+ indent = stepback;
+ return final
+ }
+};
+
+const JSON5 = {
+ parse,
+ stringify,
+};
+
+var lib = JSON5;
+
+export default lib;
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js b/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js
new file mode 100644
index 00000000000..de852f15e47
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/cli.js
@@ -0,0 +1,112 @@
+#!/usr/bin/env node
+
+const fs = require('fs')
+const path = require('path')
+const minimist = require('minimist')
+const pkg = require('../package.json')
+const JSON5 = require('./')
+
+const argv = minimist(process.argv.slice(2), {
+ alias: {
+ 'convert': 'c',
+ 'space': 's',
+ 'validate': 'v',
+ 'out-file': 'o',
+ 'version': 'V',
+ 'help': 'h',
+ },
+ boolean: [
+ 'convert',
+ 'validate',
+ 'version',
+ 'help',
+ ],
+ string: [
+ 'space',
+ 'out-file',
+ ],
+})
+
+if (argv.version) {
+ version()
+} else if (argv.help) {
+ usage()
+} else {
+ const inFilename = argv._[0]
+
+ let readStream
+ if (inFilename) {
+ readStream = fs.createReadStream(inFilename)
+ } else {
+ readStream = process.stdin
+ }
+
+ let json5 = ''
+ readStream.on('data', data => {
+ json5 += data
+ })
+
+ readStream.on('end', () => {
+ let space
+ if (argv.space === 't' || argv.space === 'tab') {
+ space = '\t'
+ } else {
+ space = Number(argv.space)
+ }
+
+ let value
+ try {
+ value = JSON5.parse(json5)
+ if (!argv.validate) {
+ const json = JSON.stringify(value, null, space)
+
+ let writeStream
+
+ // --convert is for backward compatibility with v0.5.1. If
+ // specified with <file> and not --out-file, then a file with
+ // the same name but with a .json extension will be written.
+ if (argv.convert && inFilename && !argv.o) {
+ const parsedFilename = path.parse(inFilename)
+ const outFilename = path.format(
+ Object.assign(
+ parsedFilename,
+ {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'}
+ )
+ )
+
+ writeStream = fs.createWriteStream(outFilename)
+ } else if (argv.o) {
+ writeStream = fs.createWriteStream(argv.o)
+ } else {
+ writeStream = process.stdout
+ }
+
+ writeStream.write(json)
+ }
+ } catch (err) {
+ console.error(err.message)
+ process.exit(1)
+ }
+ })
+}
+
+function version () {
+ console.log(pkg.version)
+}
+
+function usage () {
+ console.log(
+ `
+ Usage: json5 [options] <file>
+
+ If <file> is not provided, then STDIN is used.
+
+ Options:
+
+ -s, --space The number of spaces to indent or 't' for tabs
+ -o, --out-file [file] Output to the specified file, otherwise STDOUT
+ -v, --validate Validate JSON5 but do not output JSON
+ -V, --version Output the version number
+ -h, --help Output usage information`
+ )
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/index.js b/tools/node_modules/@babel/core/node_modules/json5/lib/index.js
new file mode 100644
index 00000000000..36796388892
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/index.js
@@ -0,0 +1,9 @@
+const parse = require('./parse')
+const stringify = require('./stringify')
+
+const JSON5 = {
+ parse,
+ stringify,
+}
+
+module.exports = JSON5
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js b/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js
new file mode 100644
index 00000000000..c01646fc3a9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/parse.js
@@ -0,0 +1,1087 @@
+const util = require('./util')
+
+let source
+let parseState
+let stack
+let pos
+let line
+let column
+let token
+let key
+let root
+
+module.exports = function parse (text, reviver) {
+ source = String(text)
+ parseState = 'start'
+ stack = []
+ pos = 0
+ line = 1
+ column = 0
+ token = undefined
+ key = undefined
+ root = undefined
+
+ do {
+ token = lex()
+
+ // This code is unreachable.
+ // if (!parseStates[parseState]) {
+ // throw invalidParseState()
+ // }
+
+ parseStates[parseState]()
+ } while (token.type !== 'eof')
+
+ if (typeof reviver === 'function') {
+ return internalize({'': root}, '', reviver)
+ }
+
+ return root
+}
+
+function internalize (holder, name, reviver) {
+ const value = holder[name]
+ if (value != null && typeof value === 'object') {
+ for (const key in value) {
+ const replacement = internalize(value, key, reviver)
+ if (replacement === undefined) {
+ delete value[key]
+ } else {
+ value[key] = replacement
+ }
+ }
+ }
+
+ return reviver.call(holder, name, value)
+}
+
+let lexState
+let buffer
+let doubleQuote
+let sign
+let c
+
+function lex () {
+ lexState = 'default'
+ buffer = ''
+ doubleQuote = false
+ sign = 1
+
+ for (;;) {
+ c = peek()
+
+ // This code is unreachable.
+ // if (!lexStates[lexState]) {
+ // throw invalidLexState(lexState)
+ // }
+
+ const token = lexStates[lexState]()
+ if (token) {
+ return token
+ }
+ }
+}
+
+function peek () {
+ if (source[pos]) {
+ return String.fromCodePoint(source.codePointAt(pos))
+ }
+}
+
+function read () {
+ const c = peek()
+
+ if (c === '\n') {
+ line++
+ column = 0
+ } else if (c) {
+ column += c.length
+ } else {
+ column++
+ }
+
+ if (c) {
+ pos += c.length
+ }
+
+ return c
+}
+
+const lexStates = {
+ default () {
+ switch (c) {
+ case '\t':
+ case '\v':
+ case '\f':
+ case ' ':
+ case '\u00A0':
+ case '\uFEFF':
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read()
+ return
+
+ case '/':
+ read()
+ lexState = 'comment'
+ return
+
+ case undefined:
+ read()
+ return newToken('eof')
+ }
+
+ if (util.isSpaceSeparator(c)) {
+ read()
+ return
+ }
+
+ // This code is unreachable.
+ // if (!lexStates[parseState]) {
+ // throw invalidLexState(parseState)
+ // }
+
+ return lexStates[parseState]()
+ },
+
+ comment () {
+ switch (c) {
+ case '*':
+ read()
+ lexState = 'multiLineComment'
+ return
+
+ case '/':
+ read()
+ lexState = 'singleLineComment'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ multiLineComment () {
+ switch (c) {
+ case '*':
+ read()
+ lexState = 'multiLineCommentAsterisk'
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read()
+ },
+
+ multiLineCommentAsterisk () {
+ switch (c) {
+ case '*':
+ read()
+ return
+
+ case '/':
+ read()
+ lexState = 'default'
+ return
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ read()
+ lexState = 'multiLineComment'
+ },
+
+ singleLineComment () {
+ switch (c) {
+ case '\n':
+ case '\r':
+ case '\u2028':
+ case '\u2029':
+ read()
+ lexState = 'default'
+ return
+
+ case undefined:
+ read()
+ return newToken('eof')
+ }
+
+ read()
+ },
+
+ value () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ case 'n':
+ read()
+ literal('ull')
+ return newToken('null', null)
+
+ case 't':
+ read()
+ literal('rue')
+ return newToken('boolean', true)
+
+ case 'f':
+ read()
+ literal('alse')
+ return newToken('boolean', false)
+
+ case '-':
+ case '+':
+ if (read() === '-') {
+ sign = -1
+ }
+
+ lexState = 'sign'
+ return
+
+ case '.':
+ buffer = read()
+ lexState = 'decimalPointLeading'
+ return
+
+ case '0':
+ buffer = read()
+ lexState = 'zero'
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read()
+ lexState = 'decimalInteger'
+ return
+
+ case 'I':
+ read()
+ literal('nfinity')
+ return newToken('numeric', Infinity)
+
+ case 'N':
+ read()
+ literal('aN')
+ return newToken('numeric', NaN)
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"')
+ buffer = ''
+ lexState = 'string'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ identifierNameStartEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read()
+ const u = unicodeEscape()
+ switch (u) {
+ case '$':
+ case '_':
+ break
+
+ default:
+ if (!util.isIdStartChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u
+ lexState = 'identifierName'
+ },
+
+ identifierName () {
+ switch (c) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ buffer += read()
+ return
+
+ case '\\':
+ read()
+ lexState = 'identifierNameEscape'
+ return
+ }
+
+ if (util.isIdContinueChar(c)) {
+ buffer += read()
+ return
+ }
+
+ return newToken('identifier', buffer)
+ },
+
+ identifierNameEscape () {
+ if (c !== 'u') {
+ throw invalidChar(read())
+ }
+
+ read()
+ const u = unicodeEscape()
+ switch (u) {
+ case '$':
+ case '_':
+ case '\u200C':
+ case '\u200D':
+ break
+
+ default:
+ if (!util.isIdContinueChar(u)) {
+ throw invalidIdentifier()
+ }
+
+ break
+ }
+
+ buffer += u
+ lexState = 'identifierName'
+ },
+
+ sign () {
+ switch (c) {
+ case '.':
+ buffer = read()
+ lexState = 'decimalPointLeading'
+ return
+
+ case '0':
+ buffer = read()
+ lexState = 'zero'
+ return
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ buffer = read()
+ lexState = 'decimalInteger'
+ return
+
+ case 'I':
+ read()
+ literal('nfinity')
+ return newToken('numeric', sign * Infinity)
+
+ case 'N':
+ read()
+ literal('aN')
+ return newToken('numeric', NaN)
+ }
+
+ throw invalidChar(read())
+ },
+
+ zero () {
+ switch (c) {
+ case '.':
+ buffer += read()
+ lexState = 'decimalPoint'
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read()
+ lexState = 'decimalExponent'
+ return
+
+ case 'x':
+ case 'X':
+ buffer += read()
+ lexState = 'hexadecimal'
+ return
+ }
+
+ return newToken('numeric', sign * 0)
+ },
+
+ decimalInteger () {
+ switch (c) {
+ case '.':
+ buffer += read()
+ lexState = 'decimalPoint'
+ return
+
+ case 'e':
+ case 'E':
+ buffer += read()
+ lexState = 'decimalExponent'
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read()
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalPointLeading () {
+ if (util.isDigit(c)) {
+ buffer += read()
+ lexState = 'decimalFraction'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalPoint () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read()
+ lexState = 'decimalExponent'
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read()
+ lexState = 'decimalFraction'
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalFraction () {
+ switch (c) {
+ case 'e':
+ case 'E':
+ buffer += read()
+ lexState = 'decimalExponent'
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read()
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ decimalExponent () {
+ switch (c) {
+ case '+':
+ case '-':
+ buffer += read()
+ lexState = 'decimalExponentSign'
+ return
+ }
+
+ if (util.isDigit(c)) {
+ buffer += read()
+ lexState = 'decimalExponentInteger'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentSign () {
+ if (util.isDigit(c)) {
+ buffer += read()
+ lexState = 'decimalExponentInteger'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ decimalExponentInteger () {
+ if (util.isDigit(c)) {
+ buffer += read()
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ hexadecimal () {
+ if (util.isHexDigit(c)) {
+ buffer += read()
+ lexState = 'hexadecimalInteger'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ hexadecimalInteger () {
+ if (util.isHexDigit(c)) {
+ buffer += read()
+ return
+ }
+
+ return newToken('numeric', sign * Number(buffer))
+ },
+
+ string () {
+ switch (c) {
+ case '\\':
+ read()
+ buffer += escape()
+ return
+
+ case '"':
+ if (doubleQuote) {
+ read()
+ return newToken('string', buffer)
+ }
+
+ buffer += read()
+ return
+
+ case "'":
+ if (!doubleQuote) {
+ read()
+ return newToken('string', buffer)
+ }
+
+ buffer += read()
+ return
+
+ case '\n':
+ case '\r':
+ throw invalidChar(read())
+
+ case '\u2028':
+ case '\u2029':
+ separatorChar(c)
+ break
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ buffer += read()
+ },
+
+ start () {
+ switch (c) {
+ case '{':
+ case '[':
+ return newToken('punctuator', read())
+
+ // This code is unreachable since the default lexState handles eof.
+ // case undefined:
+ // return newToken('eof')
+ }
+
+ lexState = 'value'
+ },
+
+ beforePropertyName () {
+ switch (c) {
+ case '$':
+ case '_':
+ buffer = read()
+ lexState = 'identifierName'
+ return
+
+ case '\\':
+ read()
+ lexState = 'identifierNameStartEscape'
+ return
+
+ case '}':
+ return newToken('punctuator', read())
+
+ case '"':
+ case "'":
+ doubleQuote = (read() === '"')
+ lexState = 'string'
+ return
+ }
+
+ if (util.isIdStartChar(c)) {
+ buffer += read()
+ lexState = 'identifierName'
+ return
+ }
+
+ throw invalidChar(read())
+ },
+
+ afterPropertyName () {
+ if (c === ':') {
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforePropertyValue () {
+ lexState = 'value'
+ },
+
+ afterPropertyValue () {
+ switch (c) {
+ case ',':
+ case '}':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ beforeArrayValue () {
+ if (c === ']') {
+ return newToken('punctuator', read())
+ }
+
+ lexState = 'value'
+ },
+
+ afterArrayValue () {
+ switch (c) {
+ case ',':
+ case ']':
+ return newToken('punctuator', read())
+ }
+
+ throw invalidChar(read())
+ },
+
+ end () {
+ // This code is unreachable since it's handled by the default lexState.
+ // if (c === undefined) {
+ // read()
+ // return newToken('eof')
+ // }
+
+ throw invalidChar(read())
+ },
+}
+
+function newToken (type, value) {
+ return {
+ type,
+ value,
+ line,
+ column,
+ }
+}
+
+function literal (s) {
+ for (const c of s) {
+ const p = peek()
+
+ if (p !== c) {
+ throw invalidChar(read())
+ }
+
+ read()
+ }
+}
+
+function escape () {
+ const c = peek()
+ switch (c) {
+ case 'b':
+ read()
+ return '\b'
+
+ case 'f':
+ read()
+ return '\f'
+
+ case 'n':
+ read()
+ return '\n'
+
+ case 'r':
+ read()
+ return '\r'
+
+ case 't':
+ read()
+ return '\t'
+
+ case 'v':
+ read()
+ return '\v'
+
+ case '0':
+ read()
+ if (util.isDigit(peek())) {
+ throw invalidChar(read())
+ }
+
+ return '\0'
+
+ case 'x':
+ read()
+ return hexEscape()
+
+ case 'u':
+ read()
+ return unicodeEscape()
+
+ case '\n':
+ case '\u2028':
+ case '\u2029':
+ read()
+ return ''
+
+ case '\r':
+ read()
+ if (peek() === '\n') {
+ read()
+ }
+
+ return ''
+
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ throw invalidChar(read())
+
+ case undefined:
+ throw invalidChar(read())
+ }
+
+ return read()
+}
+
+function hexEscape () {
+ let buffer = ''
+ let c = peek()
+
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read()
+
+ c = peek()
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read()
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+}
+
+function unicodeEscape () {
+ let buffer = ''
+ let count = 4
+
+ while (count-- > 0) {
+ const c = peek()
+ if (!util.isHexDigit(c)) {
+ throw invalidChar(read())
+ }
+
+ buffer += read()
+ }
+
+ return String.fromCodePoint(parseInt(buffer, 16))
+}
+
+const parseStates = {
+ start () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push()
+ },
+
+ beforePropertyName () {
+ switch (token.type) {
+ case 'identifier':
+ case 'string':
+ key = token.value
+ parseState = 'afterPropertyName'
+ return
+
+ case 'punctuator':
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.value !== '}') {
+ // throw invalidToken()
+ // }
+
+ pop()
+ return
+
+ case 'eof':
+ throw invalidEOF()
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterPropertyName () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator' || token.value !== ':') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ parseState = 'beforePropertyValue'
+ },
+
+ beforePropertyValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ push()
+ },
+
+ beforeArrayValue () {
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ if (token.type === 'punctuator' && token.value === ']') {
+ pop()
+ return
+ }
+
+ push()
+ },
+
+ afterPropertyValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforePropertyName'
+ return
+
+ case '}':
+ pop()
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ afterArrayValue () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'punctuator') {
+ // throw invalidToken()
+ // }
+
+ if (token.type === 'eof') {
+ throw invalidEOF()
+ }
+
+ switch (token.value) {
+ case ',':
+ parseState = 'beforeArrayValue'
+ return
+
+ case ']':
+ pop()
+ }
+
+ // This code is unreachable since it's handled by the lexState.
+ // throw invalidToken()
+ },
+
+ end () {
+ // This code is unreachable since it's handled by the lexState.
+ // if (token.type !== 'eof') {
+ // throw invalidToken()
+ // }
+ },
+}
+
+function push () {
+ let value
+
+ switch (token.type) {
+ case 'punctuator':
+ switch (token.value) {
+ case '{':
+ value = {}
+ break
+
+ case '[':
+ value = []
+ break
+ }
+
+ break
+
+ case 'null':
+ case 'boolean':
+ case 'numeric':
+ case 'string':
+ value = token.value
+ break
+
+ // This code is unreachable.
+ // default:
+ // throw invalidToken()
+ }
+
+ if (root === undefined) {
+ root = value
+ } else {
+ const parent = stack[stack.length - 1]
+ if (Array.isArray(parent)) {
+ parent.push(value)
+ } else {
+ parent[key] = value
+ }
+ }
+
+ if (value !== null && typeof value === 'object') {
+ stack.push(value)
+
+ if (Array.isArray(value)) {
+ parseState = 'beforeArrayValue'
+ } else {
+ parseState = 'beforePropertyName'
+ }
+ } else {
+ const current = stack[stack.length - 1]
+ if (current == null) {
+ parseState = 'end'
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue'
+ } else {
+ parseState = 'afterPropertyValue'
+ }
+ }
+}
+
+function pop () {
+ stack.pop()
+
+ const current = stack[stack.length - 1]
+ if (current == null) {
+ parseState = 'end'
+ } else if (Array.isArray(current)) {
+ parseState = 'afterArrayValue'
+ } else {
+ parseState = 'afterPropertyValue'
+ }
+}
+
+// This code is unreachable.
+// function invalidParseState () {
+// return new Error(`JSON5: invalid parse state '${parseState}'`)
+// }
+
+// This code is unreachable.
+// function invalidLexState (state) {
+// return new Error(`JSON5: invalid lex state '${state}'`)
+// }
+
+function invalidChar (c) {
+ if (c === undefined) {
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+ }
+
+ return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
+}
+
+function invalidEOF () {
+ return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+}
+
+// This code is unreachable.
+// function invalidToken () {
+// if (token.type === 'eof') {
+// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)
+// }
+
+// const c = String.fromCodePoint(token.value.codePointAt(0))
+// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)
+// }
+
+function invalidIdentifier () {
+ column -= 5
+ return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)
+}
+
+function separatorChar (c) {
+ console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)
+}
+
+function formatChar (c) {
+ const replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ }
+
+ if (replacements[c]) {
+ return replacements[c]
+ }
+
+ if (c < ' ') {
+ const hexString = c.charCodeAt(0).toString(16)
+ return '\\x' + ('00' + hexString).substring(hexString.length)
+ }
+
+ return c
+}
+
+function syntaxError (message) {
+ const err = new SyntaxError(message)
+ err.lineNumber = line
+ err.columnNumber = column
+ return err
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/register.js b/tools/node_modules/@babel/core/node_modules/json5/lib/register.js
new file mode 100644
index 00000000000..935cdbafb32
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/register.js
@@ -0,0 +1,13 @@
+const fs = require('fs')
+const JSON5 = require('./')
+
+// eslint-disable-next-line node/no-deprecated-api
+require.extensions['.json5'] = function (module, filename) {
+ const content = fs.readFileSync(filename, 'utf8')
+ try {
+ module.exports = JSON5.parse(content)
+ } catch (err) {
+ err.message = filename + ': ' + err.message
+ throw err
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/require.js b/tools/node_modules/@babel/core/node_modules/json5/lib/require.js
new file mode 100644
index 00000000000..3aa29bee034
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/require.js
@@ -0,0 +1,4 @@
+// This file is for backward compatibility with v0.5.1.
+require('./register')
+
+console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.")
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js b/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js
new file mode 100644
index 00000000000..7cb3b0e1018
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/stringify.js
@@ -0,0 +1,261 @@
+const util = require('./util')
+
+module.exports = function stringify (value, replacer, space) {
+ const stack = []
+ let indent = ''
+ let propertyList
+ let replacerFunc
+ let gap = ''
+ let quote
+
+ if (
+ replacer != null &&
+ typeof replacer === 'object' &&
+ !Array.isArray(replacer)
+ ) {
+ space = replacer.space
+ quote = replacer.quote
+ replacer = replacer.replacer
+ }
+
+ if (typeof replacer === 'function') {
+ replacerFunc = replacer
+ } else if (Array.isArray(replacer)) {
+ propertyList = []
+ for (const v of replacer) {
+ let item
+
+ if (typeof v === 'string') {
+ item = v
+ } else if (
+ typeof v === 'number' ||
+ v instanceof String ||
+ v instanceof Number
+ ) {
+ item = String(v)
+ }
+
+ if (item !== undefined && propertyList.indexOf(item) < 0) {
+ propertyList.push(item)
+ }
+ }
+ }
+
+ if (space instanceof Number) {
+ space = Number(space)
+ } else if (space instanceof String) {
+ space = String(space)
+ }
+
+ if (typeof space === 'number') {
+ if (space > 0) {
+ space = Math.min(10, Math.floor(space))
+ gap = ' '.substr(0, space)
+ }
+ } else if (typeof space === 'string') {
+ gap = space.substr(0, 10)
+ }
+
+ return serializeProperty('', {'': value})
+
+ function serializeProperty (key, holder) {
+ let value = holder[key]
+ if (value != null) {
+ if (typeof value.toJSON5 === 'function') {
+ value = value.toJSON5(key)
+ } else if (typeof value.toJSON === 'function') {
+ value = value.toJSON(key)
+ }
+ }
+
+ if (replacerFunc) {
+ value = replacerFunc.call(holder, key, value)
+ }
+
+ if (value instanceof Number) {
+ value = Number(value)
+ } else if (value instanceof String) {
+ value = String(value)
+ } else if (value instanceof Boolean) {
+ value = value.valueOf()
+ }
+
+ switch (value) {
+ case null: return 'null'
+ case true: return 'true'
+ case false: return 'false'
+ }
+
+ if (typeof value === 'string') {
+ return quoteString(value, false)
+ }
+
+ if (typeof value === 'number') {
+ return String(value)
+ }
+
+ if (typeof value === 'object') {
+ return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
+ }
+
+ return undefined
+ }
+
+ function quoteString (value) {
+ const quotes = {
+ "'": 0.1,
+ '"': 0.2,
+ }
+
+ const replacements = {
+ "'": "\\'",
+ '"': '\\"',
+ '\\': '\\\\',
+ '\b': '\\b',
+ '\f': '\\f',
+ '\n': '\\n',
+ '\r': '\\r',
+ '\t': '\\t',
+ '\v': '\\v',
+ '\0': '\\0',
+ '\u2028': '\\u2028',
+ '\u2029': '\\u2029',
+ }
+
+ let product = ''
+
+ for (let i = 0; i < value.length; i++) {
+ const c = value[i]
+ switch (c) {
+ case "'":
+ case '"':
+ quotes[c]++
+ product += c
+ continue
+
+ case '\0':
+ if (util.isDigit(value[i + 1])) {
+ product += '\\x00'
+ continue
+ }
+ }
+
+ if (replacements[c]) {
+ product += replacements[c]
+ continue
+ }
+
+ if (c < ' ') {
+ let hexString = c.charCodeAt(0).toString(16)
+ product += '\\x' + ('00' + hexString).substring(hexString.length)
+ continue
+ }
+
+ product += c
+ }
+
+ const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)
+
+ product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])
+
+ return quoteChar + product + quoteChar
+ }
+
+ function serializeObject (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value)
+
+ let stepback = indent
+ indent = indent + gap
+
+ let keys = propertyList || Object.keys(value)
+ let partial = []
+ for (const key of keys) {
+ const propertyString = serializeProperty(key, value)
+ if (propertyString !== undefined) {
+ let member = serializeKey(key) + ':'
+ if (gap !== '') {
+ member += ' '
+ }
+ member += propertyString
+ partial.push(member)
+ }
+ }
+
+ let final
+ if (partial.length === 0) {
+ final = '{}'
+ } else {
+ let properties
+ if (gap === '') {
+ properties = partial.join(',')
+ final = '{' + properties + '}'
+ } else {
+ let separator = ',\n' + indent
+ properties = partial.join(separator)
+ final = '{\n' + indent + properties + ',\n' + stepback + '}'
+ }
+ }
+
+ stack.pop()
+ indent = stepback
+ return final
+ }
+
+ function serializeKey (key) {
+ if (key.length === 0) {
+ return quoteString(key, true)
+ }
+
+ const firstChar = String.fromCodePoint(key.codePointAt(0))
+ if (!util.isIdStartChar(firstChar)) {
+ return quoteString(key, true)
+ }
+
+ for (let i = firstChar.length; i < key.length; i++) {
+ if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
+ return quoteString(key, true)
+ }
+ }
+
+ return key
+ }
+
+ function serializeArray (value) {
+ if (stack.indexOf(value) >= 0) {
+ throw TypeError('Converting circular structure to JSON5')
+ }
+
+ stack.push(value)
+
+ let stepback = indent
+ indent = indent + gap
+
+ let partial = []
+ for (let i = 0; i < value.length; i++) {
+ const propertyString = serializeProperty(String(i), value)
+ partial.push((propertyString !== undefined) ? propertyString : 'null')
+ }
+
+ let final
+ if (partial.length === 0) {
+ final = '[]'
+ } else {
+ if (gap === '') {
+ let properties = partial.join(',')
+ final = '[' + properties + ']'
+ } else {
+ let separator = ',\n' + indent
+ let properties = partial.join(separator)
+ final = '[\n' + indent + properties + ',\n' + stepback + ']'
+ }
+ }
+
+ stack.pop()
+ indent = stepback
+ return final
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js b/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js
new file mode 100644
index 00000000000..215ccd843ab
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/unicode.js
@@ -0,0 +1,4 @@
+// This is a generated file. Do not edit.
+module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/
+module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/
+module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
diff --git a/tools/node_modules/@babel/core/node_modules/json5/lib/util.js b/tools/node_modules/@babel/core/node_modules/json5/lib/util.js
new file mode 100644
index 00000000000..40bfe2fa6a6
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/lib/util.js
@@ -0,0 +1,35 @@
+const unicode = require('../lib/unicode')
+
+module.exports = {
+ isSpaceSeparator (c) {
+ return typeof c === 'string' && unicode.Space_Separator.test(c)
+ },
+
+ isIdStartChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c === '$') || (c === '_') ||
+ unicode.ID_Start.test(c)
+ )
+ },
+
+ isIdContinueChar (c) {
+ return typeof c === 'string' && (
+ (c >= 'a' && c <= 'z') ||
+ (c >= 'A' && c <= 'Z') ||
+ (c >= '0' && c <= '9') ||
+ (c === '$') || (c === '_') ||
+ (c === '\u200C') || (c === '\u200D') ||
+ unicode.ID_Continue.test(c)
+ )
+ },
+
+ isDigit (c) {
+ return typeof c === 'string' && /[0-9]/.test(c)
+ },
+
+ isHexDigit (c) {
+ return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
+ },
+}
diff --git a/tools/node_modules/@babel/core/node_modules/json5/package.json b/tools/node_modules/@babel/core/node_modules/json5/package.json
new file mode 100644
index 00000000000..9c5b82eae81
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/json5/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "json5",
+ "version": "2.1.3",
+ "description": "JSON for humans.",
+ "main": "lib/index.js",
+ "module": "dist/index.mjs",
+ "bin": "lib/cli.js",
+ "browser": "dist/index.js",
+ "files": [
+ "lib/",
+ "dist/"
+ ],
+ "engines": {
+ "node": ">=6"
+ },
+ "scripts": {
+ "build": "rollup -c",
+ "build-package": "node build/package.js",
+ "build-unicode": "node build/unicode.js",
+ "coverage": "tap --coverage-report html test",
+ "lint": "eslint --fix .",
+ "prepublishOnly": "npm run production",
+ "preversion": "npm run production",
+ "production": "npm run lint && npm test && npm run build",
+ "test": "tap -Rspec --100 test",
+ "version": "npm run build-package && git add package.json5"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/json5/json5.git"
+ },
+ "keywords": [
+ "json",
+ "json5",
+ "es5",
+ "es2015",
+ "ecmascript"
+ ],
+ "author": "Aseem Kishore <aseem.kishore@gmail.com>",
+ "contributors": [
+ "Max Nanasy <max.nanasy@gmail.com>",
+ "Andrew Eisenberg <andrew@eisenberg.as>",
+ "Jordan Tucker <jordanbtucker@gmail.com>"
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/json5/json5/issues"
+ },
+ "homepage": "http://json5.org/",
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "devDependencies": {
+ "core-js": "^2.6.5",
+ "eslint": "^5.15.3",
+ "eslint-config-standard": "^12.0.0",
+ "eslint-plugin-import": "^2.16.0",
+ "eslint-plugin-node": "^8.0.1",
+ "eslint-plugin-promise": "^4.0.1",
+ "eslint-plugin-standard": "^4.0.0",
+ "regenerate": "^1.4.0",
+ "rollup": "^0.64.1",
+ "rollup-plugin-buble": "^0.19.6",
+ "rollup-plugin-commonjs": "^9.2.1",
+ "rollup-plugin-node-resolve": "^3.4.0",
+ "rollup-plugin-terser": "^1.0.1",
+ "sinon": "^6.3.5",
+ "tap": "^12.6.0",
+ "unicode-10.0.0": "^0.7.5"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/LICENSE b/tools/node_modules/@babel/core/node_modules/lodash/LICENSE
index 77c42f1408a..77c42f1408a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/lodash/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/README.md b/tools/node_modules/@babel/core/node_modules/lodash/README.md
new file mode 100644
index 00000000000..e1c99503300
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/README.md
@@ -0,0 +1,39 @@
+# lodash v4.17.20
+
+The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
+
+## Installation
+
+Using npm:
+```shell
+$ npm i -g npm
+$ npm i --save lodash
+```
+
+In Node.js:
+```js
+// Load the full build.
+var _ = require('lodash');
+// Load the core build.
+var _ = require('lodash/core');
+// Load the FP build for immutable auto-curried iteratee-first data-last methods.
+var fp = require('lodash/fp');
+
+// Load method categories.
+var array = require('lodash/array');
+var object = require('lodash/fp/object');
+
+// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
+var at = require('lodash/at');
+var curryN = require('lodash/fp/curryN');
+```
+
+See the [package source](https://github.com/lodash/lodash/tree/4.17.20-npm) for more details.
+
+**Note:**<br>
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
+
+## Support
+
+Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_DataView.js b/tools/node_modules/@babel/core/node_modules/lodash/_DataView.js
index ac2d57ca67c..ac2d57ca67c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_DataView.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_DataView.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Hash.js b/tools/node_modules/@babel/core/node_modules/lodash/_Hash.js
index b504fe34078..b504fe34078 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Hash.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Hash.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_LazyWrapper.js b/tools/node_modules/@babel/core/node_modules/lodash/_LazyWrapper.js
index 81786c7f1e4..81786c7f1e4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_LazyWrapper.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_LazyWrapper.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_ListCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_ListCache.js
index 26895c3a8d2..26895c3a8d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_ListCache.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_ListCache.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_LodashWrapper.js b/tools/node_modules/@babel/core/node_modules/lodash/_LodashWrapper.js
index c1e4d9df762..c1e4d9df762 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_LodashWrapper.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_LodashWrapper.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Map.js b/tools/node_modules/@babel/core/node_modules/lodash/_Map.js
index b73f29a0f9d..b73f29a0f9d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Map.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Map.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_MapCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_MapCache.js
index 4a4eea7bf93..4a4eea7bf93 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_MapCache.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_MapCache.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Promise.js b/tools/node_modules/@babel/core/node_modules/lodash/_Promise.js
index 247b9e1baca..247b9e1baca 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Promise.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Promise.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Set.js b/tools/node_modules/@babel/core/node_modules/lodash/_Set.js
index b3c8dcbf036..b3c8dcbf036 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Set.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Set.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_SetCache.js b/tools/node_modules/@babel/core/node_modules/lodash/_SetCache.js
index 6468b0647f7..6468b0647f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_SetCache.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_SetCache.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Stack.js b/tools/node_modules/@babel/core/node_modules/lodash/_Stack.js
index 80b2cf1b0cc..80b2cf1b0cc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Stack.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Stack.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Symbol.js b/tools/node_modules/@babel/core/node_modules/lodash/_Symbol.js
index a013f7c5b76..a013f7c5b76 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Symbol.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Symbol.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_Uint8Array.js b/tools/node_modules/@babel/core/node_modules/lodash/_Uint8Array.js
index 2fb30e15737..2fb30e15737 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_Uint8Array.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_Uint8Array.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_WeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_WeakMap.js
index 567f86c61e0..567f86c61e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_WeakMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_WeakMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_apply.js b/tools/node_modules/@babel/core/node_modules/lodash/_apply.js
index 36436dda505..36436dda505 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_apply.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_apply.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayAggregator.js
index d96c3ca47c4..d96c3ca47c4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayAggregator.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayAggregator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEach.js
index 2c5f5796885..2c5f5796885 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEach.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEach.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEachRight.js
index 976ca5c29bc..976ca5c29bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEvery.js
index e26a9184507..e26a9184507 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayEvery.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayEvery.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayFilter.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayFilter.js
index 75ea2544592..75ea2544592 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayFilter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayFilter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludes.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludes.js
index 3737a6d9eb0..3737a6d9eb0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludes.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludes.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludesWith.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludesWith.js
index 235fd975807..235fd975807 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayIncludesWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayIncludesWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayLikeKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayLikeKeys.js
index b2ec9ce7863..b2ec9ce7863 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayLikeKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayLikeKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayMap.js
index 22b22464e21..22b22464e21 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayPush.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayPush.js
index 7d742b383e5..7d742b383e5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayPush.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayPush.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduce.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduce.js
index de8b79b2879..de8b79b2879 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduceRight.js
index 22d8976deb7..22d8976deb7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayReduceRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayReduceRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySample.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySample.js
index fcab0105e8e..fcab0105e8e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySample.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arraySample.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySampleSize.js
index 8c7e364f51a..8c7e364f51a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySampleSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arraySampleSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayShuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/_arrayShuffle.js
index 46313a39b7e..46313a39b7e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arrayShuffle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arrayShuffle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySome.js b/tools/node_modules/@babel/core/node_modules/lodash/_arraySome.js
index 6fd02fd4ae9..6fd02fd4ae9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_arraySome.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_arraySome.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiSize.js
index 11d29c33ada..11d29c33ada 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_asciiSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiToArray.js
index 8e3dd5b47fe..8e3dd5b47fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_asciiToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiWords.js b/tools/node_modules/@babel/core/node_modules/lodash/_asciiWords.js
index d765f0f763a..d765f0f763a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_asciiWords.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_asciiWords.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assignMergeValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_assignMergeValue.js
index cb1185e9923..cb1185e9923 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_assignMergeValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_assignMergeValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assignValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_assignValue.js
index 40839575b5c..40839575b5c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_assignValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_assignValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_assocIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_assocIndexOf.js
index 5b77a2bdd36..5b77a2bdd36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_assocIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_assocIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAggregator.js
index 4bc9e91f418..4bc9e91f418 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAggregator.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseAggregator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssign.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssign.js
index e5c4a1a5b05..e5c4a1a5b05 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssign.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssign.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignIn.js
index 6624f900672..6624f900672 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignValue.js
index d6f66ef3a54..d6f66ef3a54 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAssignValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseAssignValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseAt.js
index 90e4237a067..90e4237a067 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClamp.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseClamp.js
index a1c56929277..a1c56929277 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClamp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseClamp.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js
new file mode 100644
index 00000000000..69f87054c56
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseClone.js
@@ -0,0 +1,166 @@
+var Stack = require('./_Stack'),
+ arrayEach = require('./_arrayEach'),
+ assignValue = require('./_assignValue'),
+ baseAssign = require('./_baseAssign'),
+ baseAssignIn = require('./_baseAssignIn'),
+ cloneBuffer = require('./_cloneBuffer'),
+ copyArray = require('./_copyArray'),
+ copySymbols = require('./_copySymbols'),
+ copySymbolsIn = require('./_copySymbolsIn'),
+ getAllKeys = require('./_getAllKeys'),
+ getAllKeysIn = require('./_getAllKeysIn'),
+ getTag = require('./_getTag'),
+ initCloneArray = require('./_initCloneArray'),
+ initCloneByTag = require('./_initCloneByTag'),
+ initCloneObject = require('./_initCloneObject'),
+ isArray = require('./isArray'),
+ isBuffer = require('./isBuffer'),
+ isMap = require('./isMap'),
+ isObject = require('./isObject'),
+ isSet = require('./isSet'),
+ keys = require('./keys'),
+ keysIn = require('./keysIn');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+cloneableTags[boolTag] = cloneableTags[dateTag] =
+cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+cloneableTags[int32Tag] = cloneableTags[mapTag] =
+cloneableTags[numberTag] = cloneableTags[objectTag] =
+cloneableTags[regexpTag] = cloneableTags[setTag] =
+cloneableTags[stringTag] = cloneableTags[symbolTag] =
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+}
+
+module.exports = baseClone;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConforms.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseConforms.js
index 947e20d409b..947e20d409b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConforms.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseConforms.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseConformsTo.js
index e449cb84bd5..e449cb84bd5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseConformsTo.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseConformsTo.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseCreate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseCreate.js
index ffa6a52acd8..ffa6a52acd8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseCreate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseCreate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDelay.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseDelay.js
index 1486d697e31..1486d697e31 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDelay.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseDelay.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDifference.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseDifference.js
index 343ac19f022..343ac19f022 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseDifference.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseDifference.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEach.js
index 512c0676827..512c0676827 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEach.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseEach.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEachRight.js
index 0a8feeca446..0a8feeca446 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseEachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseEvery.js
index fa52f7bc7d6..fa52f7bc7d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseEvery.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseEvery.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseExtremum.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseExtremum.js
index 9d6aa77edba..9d6aa77edba 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseExtremum.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseExtremum.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFill.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFill.js
index 46ef9c761a6..46ef9c761a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFill.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFill.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFilter.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFilter.js
index 467847736a6..467847736a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFilter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFilter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindIndex.js
index e3f5d8aa2b8..e3f5d8aa2b8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindKey.js
index 2e430f3a215..2e430f3a215 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFindKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFindKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFlatten.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFlatten.js
index 4b1e009b150..4b1e009b150 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFlatten.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFlatten.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFor.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFor.js
index d946590f8ad..d946590f8ad 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwn.js
index 503d5234410..503d5234410 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwnRight.js
index a4b10e6c593..a4b10e6c593 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForOwnRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseForOwnRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseForRight.js
index 32842cd8179..32842cd8179 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseForRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseForRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFunctions.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseFunctions.js
index d23bc9b4752..d23bc9b4752 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseFunctions.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseFunctions.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGet.js
index a194913d217..a194913d217 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetAllKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetAllKeys.js
index 8ad204ea41a..8ad204ea41a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetAllKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetAllKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetTag.js
index b927ccc172f..b927ccc172f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGetTag.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseGetTag.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseGt.js
index 502d273ca85..502d273ca85 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseGt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseGt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseHas.js
index 1b730321c21..1b730321c21 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseHasIn.js
index 2e0d04269f1..2e0d04269f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseHasIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseHasIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInRange.js
index ec956661875..ec956661875 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInRange.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseInRange.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOf.js
index 167e706e793..167e706e793 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOfWith.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOfWith.js
index f815fe0ddae..f815fe0ddae 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIndexOfWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIndexOfWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIntersection.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIntersection.js
index c1d250c2aa2..c1d250c2aa2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIntersection.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIntersection.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInverter.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInverter.js
index fbc337f01e7..fbc337f01e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInverter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseInverter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInvoke.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseInvoke.js
index 49bcf3c3532..49bcf3c3532 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseInvoke.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseInvoke.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArguments.js
index b3562cca2c6..b3562cca2c6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArguments.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArguments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArrayBuffer.js
index a2c4f30a828..a2c4f30a828 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsArrayBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsArrayBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsDate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsDate.js
index ba67c7857fa..ba67c7857fa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsDate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsDate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqual.js
index 00a68a4f51e..00a68a4f51e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqual.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqual.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqualDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqualDeep.js
index e3cfd6a8d0a..e3cfd6a8d0a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsEqualDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsEqualDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMap.js
index 02a4021cab1..02a4021cab1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMatch.js
index 72494bed408..72494bed408 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsMatch.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsMatch.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNaN.js
index 316f1eb1ef0..316f1eb1ef0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNaN.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNaN.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNative.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNative.js
index 87023304952..87023304952 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsNative.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsNative.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsRegExp.js
index 6cd7c1aee73..6cd7c1aee73 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsSet.js
index 6dee36716e7..6dee36716e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsTypedArray.js
index 1edb32ff3f2..1edb32ff3f2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIsTypedArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIsTypedArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseIteratee.js
index 995c2575672..995c2575672 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseIteratee.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseIteratee.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeys.js
index 45e9e6f39f5..45e9e6f39f5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeysIn.js
index ea8a0a17422..ea8a0a17422 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseKeysIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseKeysIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseLodash.js
index f76c790e2e1..f76c790e2e1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLodash.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseLodash.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLt.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseLt.js
index 8674d2946a5..8674d2946a5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseLt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseLt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMap.js
index 0bf5cead5c6..0bf5cead5c6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatches.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatches.js
index e56582ad887..e56582ad887 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatches.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatches.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatchesProperty.js
index 24afd893d2c..24afd893d2c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMatchesProperty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMatchesProperty.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMean.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMean.js
index fa9e00a0a24..fa9e00a0a24 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMean.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMean.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMerge.js
index c98b5eb0b6a..c98b5eb0b6a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMerge.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMerge.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseMergeDeep.js
index 4679e8dce4b..4679e8dce4b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseMergeDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseMergeDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseNth.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseNth.js
index 0403c2a3684..0403c2a3684 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseNth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseNth.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js
new file mode 100644
index 00000000000..775a01741ed
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseOrderBy.js
@@ -0,0 +1,49 @@
+var arrayMap = require('./_arrayMap'),
+ baseGet = require('./_baseGet'),
+ baseIteratee = require('./_baseIteratee'),
+ baseMap = require('./_baseMap'),
+ baseSortBy = require('./_baseSortBy'),
+ baseUnary = require('./_baseUnary'),
+ compareMultiple = require('./_compareMultiple'),
+ identity = require('./identity'),
+ isArray = require('./isArray');
+
+/**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+}
+
+module.exports = baseOrderBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePick.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePick.js
index 09b458a600d..09b458a600d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePick.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePick.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePickBy.js
index 85be68c84f6..85be68c84f6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePickBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePickBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseProperty.js
index 496281ec408..496281ec408 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseProperty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseProperty.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyDeep.js
index 1e5aae50c4b..1e5aae50c4b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyOf.js
index 46173999082..46173999082 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePropertyOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePropertyOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAll.js
index 305720edea3..305720edea3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAt.js
index c3e9e710239..c3e9e710239 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_basePullAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_basePullAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRandom.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRandom.js
index 94f76a76636..94f76a76636 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRandom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseRandom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRange.js
index 0fb8e419fbc..0fb8e419fbc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRange.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseRange.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseReduce.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseReduce.js
index 5a1f8b57f1f..5a1f8b57f1f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseReduce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseReduce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRepeat.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRepeat.js
index ee44c31ab0c..ee44c31ab0c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRepeat.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseRepeat.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseRest.js
index d0dc4bdd1f9..d0dc4bdd1f9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseRest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseRest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSample.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSample.js
index 58582b91127..58582b91127 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSample.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSample.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSampleSize.js
index 5c90ec51816..5c90ec51816 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSampleSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSampleSize.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js
new file mode 100644
index 00000000000..99f4fbf9c34
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSet.js
@@ -0,0 +1,51 @@
+var assignValue = require('./_assignValue'),
+ castPath = require('./_castPath'),
+ isIndex = require('./_isIndex'),
+ isObject = require('./isObject'),
+ toKey = require('./_toKey');
+
+/**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+}
+
+module.exports = baseSet;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetData.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetData.js
index c409947ddb7..c409947ddb7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetToString.js
index 89eaca38dfe..89eaca38dfe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSetToString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSetToString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseShuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseShuffle.js
index 023077ac4e8..023077ac4e8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseShuffle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseShuffle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSlice.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSlice.js
index 786f6c99e90..786f6c99e90 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSlice.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSlice.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSome.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSome.js
index 58f3f447a34..58f3f447a34 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSome.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSome.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortBy.js
index a25c92eda6e..a25c92eda6e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndex.js
index 638c366c772..638c366c772 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndex.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js
new file mode 100644
index 00000000000..c247b377ff5
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedIndexBy.js
@@ -0,0 +1,67 @@
+var isSymbol = require('./isSymbol');
+
+/** Used as references for the maximum length and index of an array. */
+var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeFloor = Math.floor,
+ nativeMin = Math.min;
+
+/**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+}
+
+module.exports = baseSortedIndexBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedUniq.js
index 802159a3dbd..802159a3dbd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedUniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSortedUniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSum.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseSum.js
index a9e84c13c90..a9e84c13c90 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSum.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseSum.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseTimes.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseTimes.js
index 0603fc37eab..0603fc37eab 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseTimes.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseTimes.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToNumber.js
index 04859f391f9..04859f391f9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToNumber.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseToNumber.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToPairs.js
index bff199128f8..bff199128f8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseToPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseToString.js
index ada6ad298cc..ada6ad298cc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseToString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseToString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnary.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnary.js
index 98639e92f64..98639e92f64 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnary.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnary.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUniq.js
index aea459dc712..aea459dc712 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseUniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnset.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnset.js
index eefc6e37d38..eefc6e37d38 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUnset.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseUnset.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUpdate.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseUpdate.js
index 92a623777cf..92a623777cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseUpdate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseUpdate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseValues.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseValues.js
index b95faadcfea..b95faadcfea 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseValues.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseValues.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseWhile.js
index 07eac61b989..07eac61b989 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseWrapperValue.js
index 443e0df5e0d..443e0df5e0d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseWrapperValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseWrapperValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseXor.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseXor.js
index 8e69338bf92..8e69338bf92 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseXor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseXor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseZipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_baseZipObject.js
index 401f85be20b..401f85be20b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseZipObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_baseZipObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_cacheHas.js
index 2dec8926892..2dec8926892 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cacheHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cacheHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_castArrayLikeObject.js
index 92c75fa1a91..92c75fa1a91 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_castArrayLikeObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_castArrayLikeObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/_castFunction.js
index 98c91ae6378..98c91ae6378 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_castFunction.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_castFunction.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_castPath.js
index 017e4c1b45d..017e4c1b45d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_castPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_castPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_castRest.js
index 213c66f19f3..213c66f19f3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_castRest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_castRest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_castSlice.js b/tools/node_modules/@babel/core/node_modules/lodash/_castSlice.js
index 071faeba525..071faeba525 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_castSlice.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_castSlice.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_charsEndIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_charsEndIndex.js
index 07908ff3aa1..07908ff3aa1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_charsEndIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_charsEndIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_charsStartIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_charsStartIndex.js
index b17afd25471..b17afd25471 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_charsStartIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_charsStartIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneArrayBuffer.js
index c3d8f6e39a6..c3d8f6e39a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneArrayBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneArrayBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneBuffer.js
index 27c48109b4f..27c48109b4f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneDataView.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneDataView.js
index 9c9b7b054d5..9c9b7b054d5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneDataView.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneDataView.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneRegExp.js
index 64a30dfb4ac..64a30dfb4ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneSymbol.js
index bede39f50a6..bede39f50a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneSymbol.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneSymbol.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_cloneTypedArray.js
index 7aad84d4fec..7aad84d4fec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_cloneTypedArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_cloneTypedArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_compareAscending.js b/tools/node_modules/@babel/core/node_modules/lodash/_compareAscending.js
index 8dc27910882..8dc27910882 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_compareAscending.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_compareAscending.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_compareMultiple.js b/tools/node_modules/@babel/core/node_modules/lodash/_compareMultiple.js
index ad61f0fbcaa..ad61f0fbcaa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_compareMultiple.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_compareMultiple.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgs.js
index 1ce40f4f93b..1ce40f4f93b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgsRight.js b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgsRight.js
index 8dc588d0a92..8dc588d0a92 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_composeArgsRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_composeArgsRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copyArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_copyArray.js
index cd94d5d09a1..cd94d5d09a1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_copyArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_copyArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copyObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_copyObject.js
index 2f2a5c23b76..2f2a5c23b76 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_copyObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_copyObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbols.js b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbols.js
index c35944ab5e7..c35944ab5e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbols.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbols.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbolsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbolsIn.js
index fdf20a73c2b..fdf20a73c2b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_copySymbolsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_copySymbolsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_coreJsData.js b/tools/node_modules/@babel/core/node_modules/lodash/_coreJsData.js
index f8e5b4e3490..f8e5b4e3490 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_coreJsData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_coreJsData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_countHolders.js b/tools/node_modules/@babel/core/node_modules/lodash/_countHolders.js
index 718fcdaa8d9..718fcdaa8d9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_countHolders.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_countHolders.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createAggregator.js b/tools/node_modules/@babel/core/node_modules/lodash/_createAggregator.js
index 0be42c41cde..0be42c41cde 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createAggregator.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createAggregator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createAssigner.js b/tools/node_modules/@babel/core/node_modules/lodash/_createAssigner.js
index 1f904c51bd2..1f904c51bd2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createAssigner.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createAssigner.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseEach.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseEach.js
index d24fdd1bbcb..d24fdd1bbcb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseEach.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseEach.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseFor.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseFor.js
index 94cbf297aa2..94cbf297aa2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createBaseFor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createBaseFor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createBind.js b/tools/node_modules/@babel/core/node_modules/lodash/_createBind.js
index 07cb99f4db2..07cb99f4db2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createBind.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createBind.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCaseFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCaseFirst.js
index fe8ea483031..fe8ea483031 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createCaseFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createCaseFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCompounder.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCompounder.js
index 8d4cee2cd3e..8d4cee2cd3e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createCompounder.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createCompounder.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCtor.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCtor.js
index 9047aa5fac6..9047aa5fac6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createCtor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createCtor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createCurry.js b/tools/node_modules/@babel/core/node_modules/lodash/_createCurry.js
index f06c2cdd85e..f06c2cdd85e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createCurry.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createCurry.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createFind.js b/tools/node_modules/@babel/core/node_modules/lodash/_createFind.js
index 8859ff89f46..8859ff89f46 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createFind.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createFind.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createFlow.js b/tools/node_modules/@babel/core/node_modules/lodash/_createFlow.js
index baaddbf5e88..baaddbf5e88 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createFlow.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createFlow.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createHybrid.js b/tools/node_modules/@babel/core/node_modules/lodash/_createHybrid.js
index b671bd11f65..b671bd11f65 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createHybrid.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createHybrid.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createInverter.js b/tools/node_modules/@babel/core/node_modules/lodash/_createInverter.js
index 6c0c56299bd..6c0c56299bd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createInverter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createInverter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createMathOperation.js b/tools/node_modules/@babel/core/node_modules/lodash/_createMathOperation.js
index f1e238ac0af..f1e238ac0af 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createMathOperation.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createMathOperation.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createOver.js b/tools/node_modules/@babel/core/node_modules/lodash/_createOver.js
index 3b9455161bb..3b9455161bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createOver.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createOver.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createPadding.js b/tools/node_modules/@babel/core/node_modules/lodash/_createPadding.js
index 2124612b810..2124612b810 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createPadding.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createPadding.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createPartial.js b/tools/node_modules/@babel/core/node_modules/lodash/_createPartial.js
index e16c248b5e8..e16c248b5e8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createPartial.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createPartial.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRange.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRange.js
index 9f52c77932c..9f52c77932c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createRange.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createRange.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRecurry.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRecurry.js
index eb29fb24c0a..eb29fb24c0a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createRecurry.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createRecurry.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRelationalOperation.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRelationalOperation.js
index a17c6b5e72f..a17c6b5e72f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createRelationalOperation.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createRelationalOperation.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createRound.js b/tools/node_modules/@babel/core/node_modules/lodash/_createRound.js
index 88be5df396b..88be5df396b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createRound.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createRound.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_createSet.js
index 0f644eeae67..0f644eeae67 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_createToPairs.js
index 568417afda9..568417afda9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createToPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createToPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_createWrap.js b/tools/node_modules/@babel/core/node_modules/lodash/_createWrap.js
index 33f0633e40e..33f0633e40e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_createWrap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_createWrap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsAssignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsAssignIn.js
index 1f49e6fc4f1..1f49e6fc4f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsAssignIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsAssignIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsMerge.js b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsMerge.js
index 4cab31751bf..4cab31751bf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_customDefaultsMerge.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_customDefaultsMerge.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_customOmitClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_customOmitClone.js
index 968db2ef3e3..968db2ef3e3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_customOmitClone.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_customOmitClone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_deburrLetter.js b/tools/node_modules/@babel/core/node_modules/lodash/_deburrLetter.js
index 3e531edcf3b..3e531edcf3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_deburrLetter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_deburrLetter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_defineProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/_defineProperty.js
index b6116d92abe..b6116d92abe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_defineProperty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_defineProperty.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js
new file mode 100644
index 00000000000..824228c78cb
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_equalArrays.js
@@ -0,0 +1,84 @@
+var SetCache = require('./_SetCache'),
+ arraySome = require('./_arraySome'),
+ cacheHas = require('./_cacheHas');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalArrays;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalByTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalByTag.js
index 71919e8673b..71919e8673b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_equalByTag.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_equalByTag.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js b/tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js
new file mode 100644
index 00000000000..cdaacd2dfd8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_equalObjects.js
@@ -0,0 +1,90 @@
+var getAllKeys = require('./_getAllKeys');
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalObjects;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeHtmlChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_escapeHtmlChar.js
index 7ca68ee6257..7ca68ee6257 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeHtmlChar.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_escapeHtmlChar.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeStringChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_escapeStringChar.js
index 44eca96ca8c..44eca96ca8c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_escapeStringChar.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_escapeStringChar.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_flatRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_flatRest.js
index 94ab6cca775..94ab6cca775 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_flatRest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_flatRest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_freeGlobal.js b/tools/node_modules/@babel/core/node_modules/lodash/_freeGlobal.js
index bbec998fc8c..bbec998fc8c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_freeGlobal.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_freeGlobal.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeys.js
index a9ce6995a6a..a9ce6995a6a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeysIn.js
index 1b4667841db..1b4667841db 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getAllKeysIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getAllKeysIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getData.js
index a1fe7b7790d..a1fe7b7790d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getFuncName.js b/tools/node_modules/@babel/core/node_modules/lodash/_getFuncName.js
index 21e15b3377d..21e15b3377d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getFuncName.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getFuncName.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getHolder.js b/tools/node_modules/@babel/core/node_modules/lodash/_getHolder.js
index 65e94b5c249..65e94b5c249 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getHolder.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getHolder.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getMapData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getMapData.js
index 17f63032e1a..17f63032e1a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getMapData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getMapData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getMatchData.js b/tools/node_modules/@babel/core/node_modules/lodash/_getMatchData.js
index 2cc70f917f2..2cc70f917f2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getMatchData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getMatchData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getNative.js b/tools/node_modules/@babel/core/node_modules/lodash/_getNative.js
index 97a622b83ae..97a622b83ae 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getNative.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getNative.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getPrototype.js b/tools/node_modules/@babel/core/node_modules/lodash/_getPrototype.js
index e8086121294..e8086121294 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getPrototype.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getPrototype.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getRawTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_getRawTag.js
index 49a95c9c65a..49a95c9c65a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getRawTag.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getRawTag.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbols.js b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbols.js
index 7d6eafebb35..7d6eafebb35 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbols.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbols.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbolsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbolsIn.js
index cec0855a4a4..cec0855a4a4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getSymbolsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getSymbolsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_getTag.js
index deaf89d582d..deaf89d582d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getTag.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getTag.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_getValue.js
index 5f7d773673b..5f7d773673b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getView.js b/tools/node_modules/@babel/core/node_modules/lodash/_getView.js
index df1e5d44b5e..df1e5d44b5e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getView.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getView.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_getWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_getWrapDetails.js
index 3bcc6e48a37..3bcc6e48a37 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_getWrapDetails.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_getWrapDetails.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasPath.js
index 93dbde152e6..93dbde152e6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hasPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hasPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicode.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicode.js
index cb6ca15f666..cb6ca15f666 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicode.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicode.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicodeWord.js
index 95d52c444ce..95d52c444ce 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hasUnicodeWord.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hasUnicodeWord.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashClear.js
index 5d4b70cc46c..5d4b70cc46c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hashClear.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hashClear.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashDelete.js
index ea9dabf131e..ea9dabf131e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hashDelete.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hashDelete.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashGet.js
index 1fc2f34b100..1fc2f34b100 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hashGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hashGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashHas.js
index 281a5517c6d..281a5517c6d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hashHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hashHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_hashSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_hashSet.js
index e1055283e4d..e1055283e4d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_hashSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_hashSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneArray.js
index 078c15af98f..078c15af98f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneByTag.js
index f69a008ca3d..f69a008ca3d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneByTag.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneByTag.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneObject.js b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneObject.js
index 5a13e64a526..5a13e64a526 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_initCloneObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_initCloneObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_insertWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_insertWrapDetails.js
index e790808646d..e790808646d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_insertWrapDetails.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_insertWrapDetails.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isFlattenable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isFlattenable.js
index 4cc2c249ccb..4cc2c249ccb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isFlattenable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isFlattenable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/_isIndex.js
index 061cd390c3e..061cd390c3e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isIterateeCall.js b/tools/node_modules/@babel/core/node_modules/lodash/_isIterateeCall.js
index a0bb5a9cf60..a0bb5a9cf60 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isIterateeCall.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isIterateeCall.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_isKey.js
index ff08b068083..ff08b068083 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isKeyable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isKeyable.js
index 39f1828d4ae..39f1828d4ae 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isKeyable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isKeyable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isLaziable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isLaziable.js
index a57c4f2dc72..a57c4f2dc72 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isLaziable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isLaziable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isMaskable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isMaskable.js
index eb98d09f313..eb98d09f313 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isMaskable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isMaskable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isMasked.js b/tools/node_modules/@babel/core/node_modules/lodash/_isMasked.js
index 4b0f21ba898..4b0f21ba898 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isMasked.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isMasked.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isPrototype.js b/tools/node_modules/@babel/core/node_modules/lodash/_isPrototype.js
index 0f29498d473..0f29498d473 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isPrototype.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isPrototype.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_isStrictComparable.js b/tools/node_modules/@babel/core/node_modules/lodash/_isStrictComparable.js
index b59f40b8574..b59f40b8574 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_isStrictComparable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_isStrictComparable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_iteratorToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_iteratorToArray.js
index 476856647c6..476856647c6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_iteratorToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_iteratorToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyClone.js
index d8a51f87032..d8a51f87032 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyClone.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_lazyClone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyReverse.js
index c5b52190f4d..c5b52190f4d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyReverse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_lazyReverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyValue.js b/tools/node_modules/@babel/core/node_modules/lodash/_lazyValue.js
index 371ca8d2232..371ca8d2232 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_lazyValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_lazyValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheClear.js
index acbe39a597c..acbe39a597c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheClear.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheClear.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheDelete.js
index b1384ade97e..b1384ade97e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheDelete.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheDelete.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheGet.js
index f8192fc3841..f8192fc3841 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheHas.js
index 2adf67146fb..2adf67146fb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheSet.js
index 5855c95e409..5855c95e409 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_listCacheSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_listCacheSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheClear.js
index bc9ca204aeb..bc9ca204aeb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheClear.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheClear.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheDelete.js
index 946ca3c9395..946ca3c9395 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheDelete.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheDelete.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheGet.js
index f29f55cfdd5..f29f55cfdd5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheHas.js
index a1214c028bd..a1214c028bd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheSet.js
index 73468492733..73468492733 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapCacheSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapCacheSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mapToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_mapToArray.js
index fe3dd531a34..fe3dd531a34 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mapToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mapToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_matchesStrictComparable.js b/tools/node_modules/@babel/core/node_modules/lodash/_matchesStrictComparable.js
index f608af9ec49..f608af9ec49 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_matchesStrictComparable.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_matchesStrictComparable.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_memoizeCapped.js b/tools/node_modules/@babel/core/node_modules/lodash/_memoizeCapped.js
index 7f71c8fbae3..7f71c8fbae3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_memoizeCapped.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_memoizeCapped.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_mergeData.js b/tools/node_modules/@babel/core/node_modules/lodash/_mergeData.js
index cb570f97677..cb570f97677 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_mergeData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_mergeData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_metaMap.js b/tools/node_modules/@babel/core/node_modules/lodash/_metaMap.js
index 0157a0b0956..0157a0b0956 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_metaMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_metaMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeCreate.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeCreate.js
index c7aede85b3f..c7aede85b3f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeCreate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_nativeCreate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeys.js
index 479a104a1c5..479a104a1c5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeysIn.js
index 00ee5059474..00ee5059474 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_nativeKeysIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_nativeKeysIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js b/tools/node_modules/@babel/core/node_modules/lodash/_nodeUtil.js
index 983d78f75b4..983d78f75b4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_nodeUtil.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_nodeUtil.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_objectToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_objectToString.js
index c614ec09b38..c614ec09b38 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_objectToString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_objectToString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_overArg.js b/tools/node_modules/@babel/core/node_modules/lodash/_overArg.js
index 651c5c55f27..651c5c55f27 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_overArg.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_overArg.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_overRest.js b/tools/node_modules/@babel/core/node_modules/lodash/_overRest.js
index c7cdef3399b..c7cdef3399b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_overRest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_overRest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_parent.js b/tools/node_modules/@babel/core/node_modules/lodash/_parent.js
index f174328fcfb..f174328fcfb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_parent.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_parent.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reEscape.js b/tools/node_modules/@babel/core/node_modules/lodash/_reEscape.js
index 7f47eda68f4..7f47eda68f4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_reEscape.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_reEscape.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reEvaluate.js b/tools/node_modules/@babel/core/node_modules/lodash/_reEvaluate.js
index 6adfc312c8f..6adfc312c8f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_reEvaluate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_reEvaluate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reInterpolate.js b/tools/node_modules/@babel/core/node_modules/lodash/_reInterpolate.js
index d02ff0b29a3..d02ff0b29a3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_reInterpolate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_reInterpolate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_realNames.js b/tools/node_modules/@babel/core/node_modules/lodash/_realNames.js
index aa0d5292612..aa0d5292612 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_realNames.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_realNames.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_reorder.js b/tools/node_modules/@babel/core/node_modules/lodash/_reorder.js
index a3502b05179..a3502b05179 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_reorder.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_reorder.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_replaceHolders.js b/tools/node_modules/@babel/core/node_modules/lodash/_replaceHolders.js
index 74360ec4d3b..74360ec4d3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_replaceHolders.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_replaceHolders.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_root.js b/tools/node_modules/@babel/core/node_modules/lodash/_root.js
index d2852bed4d2..d2852bed4d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_root.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_root.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_safeGet.js
index b070897db29..b070897db29 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_safeGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_safeGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheAdd.js b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheAdd.js
index 1081a744263..1081a744263 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheAdd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheAdd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheHas.js
index 9a492556e0a..9a492556e0a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setCacheHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setCacheHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setData.js b/tools/node_modules/@babel/core/node_modules/lodash/_setData.js
index e5cf3eb96ac..e5cf3eb96ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setData.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setData.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToArray.js
index b87f07418c3..b87f07418c3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToPairs.js
index 36ad37a0583..36ad37a0583 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setToPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setToPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_setToString.js
index 6ca8419678f..6ca8419678f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setToString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setToString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_setWrapToString.js b/tools/node_modules/@babel/core/node_modules/lodash/_setWrapToString.js
index decdc449989..decdc449989 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_setWrapToString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_setWrapToString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_shortOut.js b/tools/node_modules/@babel/core/node_modules/lodash/_shortOut.js
index 3300a079691..3300a079691 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_shortOut.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_shortOut.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_shuffleSelf.js b/tools/node_modules/@babel/core/node_modules/lodash/_shuffleSelf.js
index 8bcc4f5c32c..8bcc4f5c32c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_shuffleSelf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_shuffleSelf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackClear.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackClear.js
index ce8e5a92fff..ce8e5a92fff 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stackClear.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stackClear.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackDelete.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackDelete.js
index ff9887ab640..ff9887ab640 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stackDelete.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stackDelete.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackGet.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackGet.js
index 1cdf004091b..1cdf004091b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stackGet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stackGet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackHas.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackHas.js
index 16a3ad11b96..16a3ad11b96 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stackHas.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stackHas.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stackSet.js b/tools/node_modules/@babel/core/node_modules/lodash/_stackSet.js
index b790ac5f418..b790ac5f418 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stackSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stackSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_strictIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_strictIndexOf.js
index 0486a4956b7..0486a4956b7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_strictIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_strictIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_strictLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/_strictLastIndexOf.js
index d7310dcc236..d7310dcc236 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_strictLastIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_strictLastIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringSize.js
index 17ef462a682..17ef462a682 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stringSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stringSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringToArray.js
index d161158c6f4..d161158c6f4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stringToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js b/tools/node_modules/@babel/core/node_modules/lodash/_stringToPath.js
index 8f39f8a29b2..8f39f8a29b2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_stringToPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_stringToPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_toKey.js b/tools/node_modules/@babel/core/node_modules/lodash/_toKey.js
index c6d645c4d00..c6d645c4d00 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_toKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_toKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_toSource.js b/tools/node_modules/@babel/core/node_modules/lodash/_toSource.js
index a020b386ca3..a020b386ca3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_toSource.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_toSource.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unescapeHtmlChar.js b/tools/node_modules/@babel/core/node_modules/lodash/_unescapeHtmlChar.js
index a71fecb3f65..a71fecb3f65 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_unescapeHtmlChar.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_unescapeHtmlChar.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeSize.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeSize.js
index 68137ec2c54..68137ec2c54 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeToArray.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeToArray.js
index 2a725c062ec..2a725c062ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeToArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeToArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeWords.js
index e72e6e0f93f..e72e6e0f93f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_unicodeWords.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_unicodeWords.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_updateWrapDetails.js b/tools/node_modules/@babel/core/node_modules/lodash/_updateWrapDetails.js
index 8759fbdf79b..8759fbdf79b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_updateWrapDetails.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_updateWrapDetails.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_wrapperClone.js b/tools/node_modules/@babel/core/node_modules/lodash/_wrapperClone.js
index 7bb58a2e88b..7bb58a2e88b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_wrapperClone.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/_wrapperClone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/add.js b/tools/node_modules/@babel/core/node_modules/lodash/add.js
index f0695156472..f0695156472 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/add.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/add.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/after.js b/tools/node_modules/@babel/core/node_modules/lodash/after.js
index 3900c979a11..3900c979a11 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/after.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/after.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/array.js b/tools/node_modules/@babel/core/node_modules/lodash/array.js
index af688d3ee6f..af688d3ee6f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/array.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/array.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/ary.js b/tools/node_modules/@babel/core/node_modules/lodash/ary.js
index 70c87d094c0..70c87d094c0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/ary.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/ary.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assign.js b/tools/node_modules/@babel/core/node_modules/lodash/assign.js
index 909db26a344..909db26a344 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/assign.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/assign.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/assignIn.js
index e663473a0cf..e663473a0cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/assignIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/assignIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignInWith.js b/tools/node_modules/@babel/core/node_modules/lodash/assignInWith.js
index 68fcc0b03a0..68fcc0b03a0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/assignInWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/assignInWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/assignWith.js b/tools/node_modules/@babel/core/node_modules/lodash/assignWith.js
index 7dc6c761b8f..7dc6c761b8f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/assignWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/assignWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/at.js b/tools/node_modules/@babel/core/node_modules/lodash/at.js
index 781ee9e5f18..781ee9e5f18 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/at.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/at.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/attempt.js b/tools/node_modules/@babel/core/node_modules/lodash/attempt.js
index 624d01524d2..624d01524d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/attempt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/attempt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/before.js b/tools/node_modules/@babel/core/node_modules/lodash/before.js
index a3e0a16c7a7..a3e0a16c7a7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/before.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/before.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bind.js b/tools/node_modules/@babel/core/node_modules/lodash/bind.js
index b1076e93e62..b1076e93e62 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/bind.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/bind.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bindAll.js b/tools/node_modules/@babel/core/node_modules/lodash/bindAll.js
index a35706deed1..a35706deed1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/bindAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/bindAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/bindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/bindKey.js
index f7fd64cd4e0..f7fd64cd4e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/bindKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/bindKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/camelCase.js b/tools/node_modules/@babel/core/node_modules/lodash/camelCase.js
index d7390def558..d7390def558 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/camelCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/camelCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/capitalize.js b/tools/node_modules/@babel/core/node_modules/lodash/capitalize.js
index 3e1600e7d9e..3e1600e7d9e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/capitalize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/capitalize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/castArray.js b/tools/node_modules/@babel/core/node_modules/lodash/castArray.js
index e470bdb9b91..e470bdb9b91 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/castArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/castArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/ceil.js b/tools/node_modules/@babel/core/node_modules/lodash/ceil.js
index 56c8722cfc7..56c8722cfc7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/ceil.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/ceil.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/chain.js b/tools/node_modules/@babel/core/node_modules/lodash/chain.js
index f6cd6475ffd..f6cd6475ffd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/chain.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/chain.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/chunk.js b/tools/node_modules/@babel/core/node_modules/lodash/chunk.js
index 5b562fef3ce..5b562fef3ce 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/chunk.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/chunk.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/clamp.js b/tools/node_modules/@babel/core/node_modules/lodash/clamp.js
index 91a72c9782d..91a72c9782d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/clamp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/clamp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/clone.js b/tools/node_modules/@babel/core/node_modules/lodash/clone.js
index dd439d63967..dd439d63967 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/clone.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/clone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeep.js
index 4425fbe8b9b..4425fbe8b9b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeepWith.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeepWith.js
index fd9c6c050cd..fd9c6c050cd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/cloneDeepWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/cloneDeepWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cloneWith.js b/tools/node_modules/@babel/core/node_modules/lodash/cloneWith.js
index d2f4e756d52..d2f4e756d52 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/cloneWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/cloneWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/collection.js b/tools/node_modules/@babel/core/node_modules/lodash/collection.js
index 77fe837f320..77fe837f320 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/collection.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/collection.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/commit.js b/tools/node_modules/@babel/core/node_modules/lodash/commit.js
index fe4db71783b..fe4db71783b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/commit.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/commit.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/compact.js b/tools/node_modules/@babel/core/node_modules/lodash/compact.js
index 031fab4e6d5..031fab4e6d5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/compact.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/compact.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/concat.js b/tools/node_modules/@babel/core/node_modules/lodash/concat.js
index 1da48a4fc78..1da48a4fc78 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/concat.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/concat.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/cond.js b/tools/node_modules/@babel/core/node_modules/lodash/cond.js
index 64555986aad..64555986aad 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/cond.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/cond.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/conforms.js b/tools/node_modules/@babel/core/node_modules/lodash/conforms.js
index 5501a949a96..5501a949a96 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/conforms.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/conforms.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/conformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/conformsTo.js
index b8a93ebf451..b8a93ebf451 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/conformsTo.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/conformsTo.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/constant.js b/tools/node_modules/@babel/core/node_modules/lodash/constant.js
index 655ece3fb30..655ece3fb30 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/constant.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/constant.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/core.js b/tools/node_modules/@babel/core/node_modules/lodash/core.js
new file mode 100644
index 00000000000..6d70dcaf870
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/core.js
@@ -0,0 +1,3877 @@
+/**
+ * @license
+ * Lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.20';
+
+ /** Error message constants. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_PARTIAL_FLAG = 32;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+ /** Used to match HTML entities and HTML characters. */
+ var reUnescapedHtml = /[&<>"']/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ array.push.apply(array, values);
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return baseMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Built-in value references. */
+ var objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeIsFinite = root.isFinite,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ return value instanceof LodashWrapper
+ ? value
+ : new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ }
+
+ LodashWrapper.prototype = baseCreate(lodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ object[key] = value;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !false)
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return baseFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ var baseIsArguments = noop;
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : baseGetTag(object),
+ othTag = othIsArr ? arrayTag : baseGetTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ stack || (stack = []);
+ var objStack = find(stack, function(entry) {
+ return entry[0] == object;
+ });
+ var othStack = find(stack, function(entry) {
+ return entry[0] == other;
+ });
+ if (objStack && othStack) {
+ return objStack[1] == other;
+ }
+ stack.push([object, other]);
+ stack.push([other, object]);
+ if (isSameTag && !objIsObj) {
+ var result = (objIsArr)
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ stack.pop();
+ return result;
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ stack.pop();
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(func) {
+ if (typeof func == 'function') {
+ return func;
+ }
+ if (func == null) {
+ return identity;
+ }
+ return (typeof func == 'object' ? baseMatches : baseProperty)(func);
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var props = nativeKeys(source);
+ return function(object) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length];
+ if (!(key in object &&
+ baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG)
+ )) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return reduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source) {
+ return baseSlice(source, 0, source.length);
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ return reduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = false;
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = false;
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = baseIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ var compared;
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!baseSome(other, function(othValue, othIndex) {
+ if (!indexOf(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ var compared;
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = identity;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ return baseFilter(array, Boolean);
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, baseIteratee(predicate, 3), index);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else {
+ fromIndex = 0;
+ }
+ var index = (fromIndex || 0) - 1,
+ isReflexive = value === value;
+
+ while (++index < length) {
+ var other = array[index];
+ if ((isReflexive ? other === value : other !== other)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ start = start == null ? 0 : +start;
+ end = end === undefined ? length : +end;
+ return length ? baseSlice(array, start, end) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseEvery(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ return baseFilter(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return baseEach(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ return baseMap(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ collection = isArrayLike(collection) ? collection : nativeKeys(collection);
+ return collection.length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseSome(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ function sortBy(collection, iteratee) {
+ var index = 0;
+ iteratee = baseIteratee(iteratee);
+
+ return baseMap(baseMap(collection, function(value, key, collection) {
+ return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
+ }).sort(function(object, other) {
+ return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }), baseProperty('value'));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials);
+ });
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ if (!isObject(value)) {
+ return value;
+ }
+ return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = baseIsDate;
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) ||
+ isFunction(value.splice) || isArguments(value))) {
+ return !value.length;
+ }
+ return !nativeKeys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = baseIsRegExp;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return value.length ? copyArray(value) : [];
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ var toInteger = Number;
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ var toNumber = Number;
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ copyObject(source, nativeKeys(source), object);
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, nativeKeysIn(source), object);
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : assign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasOwnProperty.call(object, path);
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ var keys = nativeKeys;
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ var keysIn = nativeKeysIn;
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var value = object == null ? undefined : object[path];
+ if (value === undefined) {
+ value = defaultValue;
+ }
+ return isFunction(value) ? value.call(object) : value;
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ var iteratee = baseIteratee;
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(assign({}, source));
+ }
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ baseEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.assignIn = assignIn;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.chain = chain;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.create = create;
+ lodash.defaults = defaults;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.iteratee = iteratee;
+ lodash.keys = keys;
+ lodash.map = map;
+ lodash.matches = matches;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.once = once;
+ lodash.pick = pick;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.tap = tap;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.values = values;
+
+ // Add aliases.
+ lodash.extend = assignIn;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.clone = clone;
+ lodash.escape = escape;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.forEach = forEach;
+ lodash.has = has;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isNaN = isNaN;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isUndefined = isUndefined;
+ lodash.last = last;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.reduce = reduce;
+ lodash.result = result;
+ lodash.size = size;
+ lodash.some = some;
+ lodash.uniqueId = uniqueId;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Add `Array` methods to `lodash.prototype`.
+ baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = lodash;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return lodash;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = lodash)._ = lodash;
+ // Export for CommonJS support.
+ freeExports._ = lodash;
+ }
+ else {
+ // Export to the global object.
+ root._ = lodash;
+ }
+}.call(this));
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/core.min.js b/tools/node_modules/@babel/core/node_modules/lodash/core.min.js
new file mode 100644
index 00000000000..f40952565b2
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/core.min.js
@@ -0,0 +1,30 @@
+/**
+ * @license
+ * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ */
+;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r,e){for(var u=n.length,o=r+(e?1:-1);e?o--:++o<u;)if(t(n[o],o,n))return o;return-1}function r(n){return function(t){return null==t?nt:t[n]}}function e(n){return function(t){return null==n?nt:n[t]}}function u(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function o(n,t){return E(t,function(t){return n[t]})}function i(n,t){return function(r){return n(t(r))}}function c(n){return n instanceof f?n:new f(n)}function f(n,t){
+this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r){var e=n[t];Rt.call(n,t)&&wn(e,r)&&(r!==nt||t in n)||l(n,t,r)}function l(n,t,r){n[t]=r}function p(n,t,r){if(typeof n!="function")throw new TypeError(rt);return setTimeout(function(){n.apply(nt,r)},t)}function s(n,t){var r=true;return Ut(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nt?i===i&&true:r(i,c)))var c=i,f=o}return f}function v(n,t){var r=[];
+return Ut(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=H),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Vt(n,t,cr)}function _(n,t){return v(t,function(t){return Tn(n[t])})}function b(n){return W(n)}function j(n,t){return n>t}function d(n){return In(n)&&b(n)==ht}function m(n,t,r,e,u){return n===t||(null==n||null==t||!In(n)&&!In(t)?n!==n&&t!==t:O(n,t,r,e,m,u))}function O(n,t,r,e,u,o){
+var i=Zt(n),c=Zt(t),f=i?lt:b(n),a=c?lt:b(t);f=f==at?bt:f,a=a==at?bt:a;var l=f==bt,p=a==bt,s=f==a;o||(o=[]);var h=Lt(o,function(t){return t[0]==n}),v=Lt(o,function(n){return n[0]==t});if(h&&v)return h[1]==t;if(o.push([n,t]),o.push([t,n]),s&&!l){var y=i?J(n,t,r,e,u,o):M(n,t,f,r,e,u,o);return o.pop(),y}if(!(r&et)){var g=l&&Rt.call(n,"__wrapped__"),_=p&&Rt.call(t,"__wrapped__");if(g||_){var j=g?n.value():n,d=_?t.value():t,y=u(j,d,r,e,o);return o.pop(),y}}if(!s)return false;var y=U(n,t,r,e,u,o);return o.pop(),
+y}function x(n){return In(n)&&b(n)==dt}function w(n){return typeof n=="function"?n:null==n?Hn:(typeof n=="object"?N:r)(n)}function A(n,t){return n<t}function E(n,t){var r=-1,e=An(n)?Array(n.length):[];return Ut(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function N(n){var t=Gt(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&m(n[u],r[u],et|ut)))return false}return true}}function k(n,t){return n=Object(n),gn(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}
+function F(n,t){return Kt(X(n,t,Hn),n+"")}function T(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(u);++e<u;)o[e]=n[e+t];return o}function S(n){return T(n,0,n.length)}function B(n,t){var r;return Ut(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function I(t,r){var e=t;return gn(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},e)}function R(n,t){if(n!==t){var r=n!==nt,e=null===n,u=n===n,o=false,i=t!==nt,c=null===t,f=t===t,a=false;if(!c&&!a&&!o&&n>t||o&&i&&f&&!c&&!a||e&&i&&f||!r&&f||!u)return 1;
+if(!e&&!o&&!a&&n<t||a&&r&&u&&!e&&!o||c&&r&&u||!i&&u||!f)return-1}return 0}function $(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nt;f===nt&&(f=n[c]),u?l(r,c,f):a(r,c,f)}return r}function q(n){return F(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:nt;for(o=n.length>3&&typeof o=="function"?(u--,o):nt,t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function D(n,t){return function(r,e){if(null==r)return r;if(!An(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&e(i[o],o,i)!==false;);
+return r}}function P(n){return function(t,r,e){for(var u=-1,o=Object(t),i=e(t),c=i.length;c--;){var f=i[n?c:++u];if(r(o[f],f,o)===false)break}return t}}function z(n){return function(){var t=arguments,r=Mt(n.prototype),e=n.apply(r,t);return Bn(e)?e:r}}function C(n){return function(t,r,e){var u=Object(t);if(!An(t)){var o=w(r,3);t=cr(t),r=function(n){return o(u[n],n,u)}}var i=n(t,r,e);return i>-1?u[o?t[i]:i]:nt}}function G(n,t,r,e){function u(){for(var t=-1,c=arguments.length,f=-1,a=e.length,l=Array(a+c),p=this&&this!==kt&&this instanceof u?i:n;++f<a;)l[f]=e[f];
+for(;c--;)l[f++]=arguments[++t];return p.apply(o?r:this,l)}if(typeof n!="function")throw new TypeError(rt);var o=t&ot,i=z(n);return u}function J(n,t,r,e,u,o){var i=r&et,c=n.length,f=t.length;if(c!=f&&!(i&&f>c))return false;var a=o.get(n),l=o.get(t);if(a&&l)return a==t&&l==n;for(var p=-1,s=true,h=r&ut?[]:nt;++p<c;){var v,y=n[p],g=t[p];if(v!==nt){if(v)continue;s=false;break}if(h){if(!B(t,function(n,t){if(!un(h,t)&&(y===n||u(y,n,r,e,o)))return h.push(t)})){s=false;break}}else if(y!==g&&!u(y,g,r,e,o)){s=false;break;
+}}return s}function M(n,t,r,e,u,o,i){switch(r){case st:case ht:case _t:return wn(+n,+t);case vt:return n.name==t.name&&n.message==t.message;case dt:case mt:return n==t+""}return false}function U(n,t,r,e,u,o){var i=r&et,c=cr(n),f=c.length;if(f!=cr(t).length&&!i)return false;for(var a=f;a--;){var l=c[a];if(!(i?l in t:Rt.call(t,l)))return false}var p=o.get(n),s=o.get(t);if(p&&s)return p==t&&s==n;for(var h=true,v=i;++a<f;){l=c[a];var y,g=n[l],_=t[l];if(!(y===nt?g===_||u(g,_,r,e,o):y)){h=false;break}v||(v="constructor"==l);
+}if(h&&!v){var b=n.constructor,j=t.constructor;b!=j&&"constructor"in n&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof j=="function"&&j instanceof j)&&(h=false)}return h}function V(n){return Kt(X(n,nt,tn),n+"")}function H(n){return Zt(n)||Yt(n)}function K(n,t){var r=typeof n;return t=null==t?ft:t,!!t&&("number"==r||"symbol"!=r&&wt.test(n))&&n>-1&&n%1==0&&n<t}function L(n,t,r){if(!Bn(r))return false;var e=typeof t;return!!("number"==e?An(r)&&K(t,r.length):"string"==e&&t in r)&&wn(r[t],n);
+}function Q(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function W(n){return qt.call(n)}function X(n,t,r){return t=Jt(t===nt?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=Jt(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];u=-1;for(var c=Array(t+1);++u<t;)c[u]=e[u];return c[t]=r(i),n.apply(this,c)}}function Y(n){return v(n,Boolean)}function Z(){var t=arguments.length;if(!t)return[];for(var r=Array(t-1),e=arguments[0],u=t;u--;)r[u-1]=arguments[u];return n(Zt(e)?S(e):[e],y(r,1));
+}function nn(n,r,e){var u=null==n?0:n.length;if(!u)return-1;var o=null==e?0:rr(e);return o<0&&(o=Jt(u+o,0)),t(n,w(r,3),o)}function tn(n){return(null==n?0:n.length)?y(n,1):[]}function rn(n){return(null==n?0:n.length)?y(n,ct):[]}function en(n){return n&&n.length?n[0]:nt}function un(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?r<0?Jt(e+r,0):r:0;for(var u=(r||0)-1,o=t===t;++u<e;){var i=n[u];if(o?i===t:i!==i)return u}return-1}function on(n){var t=null==n?0:n.length;return t?n[t-1]:nt}function cn(n,t,r){
+var e=null==n?0:n.length;return t=null==t?0:+t,r=r===nt?e:+r,e?T(n,t,r):[]}function fn(n){var t=c(n);return t.__chain__=true,t}function an(n,t){return t(n),n}function ln(n,t){return t(n)}function pn(){return I(this.__wrapped__,this.__actions__)}function sn(n,t,r){return t=r?nt:t,s(n,w(t))}function hn(n,t){return v(n,w(t))}function vn(n,t){return Ut(n,w(t))}function yn(n,t){return E(n,w(t))}function gn(n,t,r){return u(n,w(t),r,arguments.length<3,Ut)}function _n(n){return null==n?0:(n=An(n)?n:Gt(n),n.length);
+}function bn(n,t,r){return t=r?nt:t,B(n,w(t))}function jn(n,t){var e=0;return t=w(t),E(E(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){return R(n.criteria,t.criteria)||n.index-t.index}),r("value"))}function dn(n,t){var r;if(typeof t!="function")throw new TypeError(rt);return n=rr(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=nt),r}}function mn(n){if(typeof n!="function")throw new TypeError(rt);return function(){return!n.apply(this,arguments)};
+}function On(n){return dn(2,n)}function xn(n){return Bn(n)?Zt(n)?S(n):$(n,Gt(n)):n}function wn(n,t){return n===t||n!==n&&t!==t}function An(n){return null!=n&&Sn(n.length)&&!Tn(n)}function En(n){return n===true||n===false||In(n)&&b(n)==st}function Nn(n){return An(n)&&(Zt(n)||Dn(n)||Tn(n.splice)||Yt(n))?!n.length:!Gt(n).length}function kn(n,t){return m(n,t)}function Fn(n){return typeof n=="number"&&Ct(n)}function Tn(n){if(!Bn(n))return false;var t=b(n);return t==yt||t==gt||t==pt||t==jt}function Sn(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ft;
+}function Bn(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function In(n){return null!=n&&typeof n=="object"}function Rn(n){return qn(n)&&n!=+n}function $n(n){return null===n}function qn(n){return typeof n=="number"||In(n)&&b(n)==_t}function Dn(n){return typeof n=="string"||!Zt(n)&&In(n)&&b(n)==mt}function Pn(n){return n===nt}function zn(n){return An(n)?n.length?S(n):[]:Un(n)}function Cn(n){return typeof n=="string"?n:null==n?"":n+""}function Gn(n,t){var r=Mt(n);return null==t?r:ur(r,t);
+}function Jn(n,t){return null!=n&&Rt.call(n,t)}function Mn(n,t,r){var e=null==n?nt:n[t];return e===nt&&(e=r),Tn(e)?e.call(n):e}function Un(n){return null==n?[]:o(n,cr(n))}function Vn(n){return n=Cn(n),n&&xt.test(n)?n.replace(Ot,St):n}function Hn(n){return n}function Kn(n){return N(ur({},n))}function Ln(t,r,e){var u=cr(r),o=_(r,u);null!=e||Bn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,cr(r)));var i=!(Bn(e)&&"chain"in e&&!e.chain),c=Tn(t);return Ut(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){
+var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=S(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}function Qn(){return kt._===this&&(kt._=Dt),this}function Wn(){}function Xn(n){var t=++$t;return Cn(n)+t}function Yn(n){return n&&n.length?h(n,Hn,j):nt}function Zn(n){return n&&n.length?h(n,Hn,A):nt}var nt,tt="4.17.20",rt="Expected a function",et=1,ut=2,ot=1,it=32,ct=1/0,ft=9007199254740991,at="[object Arguments]",lt="[object Array]",pt="[object AsyncFunction]",st="[object Boolean]",ht="[object Date]",vt="[object Error]",yt="[object Function]",gt="[object GeneratorFunction]",_t="[object Number]",bt="[object Object]",jt="[object Proxy]",dt="[object RegExp]",mt="[object String]",Ot=/[&<>"']/g,xt=RegExp(Ot.source),wt=/^(?:0|[1-9]\d*)$/,At={
+"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Et=typeof global=="object"&&global&&global.Object===Object&&global,Nt=typeof self=="object"&&self&&self.Object===Object&&self,kt=Et||Nt||Function("return this")(),Ft=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tt=Ft&&typeof module=="object"&&module&&!module.nodeType&&module,St=e(At),Bt=Array.prototype,It=Object.prototype,Rt=It.hasOwnProperty,$t=0,qt=It.toString,Dt=kt._,Pt=Object.create,zt=It.propertyIsEnumerable,Ct=kt.isFinite,Gt=i(Object.keys,Object),Jt=Math.max,Mt=function(){
+function n(){}return function(t){if(!Bn(t))return{};if(Pt)return Pt(t);n.prototype=t;var r=new n;return n.prototype=nt,r}}();f.prototype=Mt(c.prototype),f.prototype.constructor=f;var Ut=D(g),Vt=P(),Ht=Wn,Kt=Hn,Lt=C(nn),Qt=F(function(n,t,r){return G(n,ot|it,t,r)}),Wt=F(function(n,t){return p(n,1,t)}),Xt=F(function(n,t,r){return p(n,er(t)||0,r)}),Yt=Ht(function(){return arguments}())?Ht:function(n){return In(n)&&Rt.call(n,"callee")&&!zt.call(n,"callee")},Zt=Array.isArray,nr=d,tr=x,rr=Number,er=Number,ur=q(function(n,t){
+$(t,Gt(t),n)}),or=q(function(n,t){$(t,Q(t),n)}),ir=F(function(n,t){n=Object(n);var r=-1,e=t.length,u=e>2?t[2]:nt;for(u&&L(t[0],t[1],u)&&(e=1);++r<e;)for(var o=t[r],i=fr(o),c=-1,f=i.length;++c<f;){var a=i[c],l=n[a];(l===nt||wn(l,It[a])&&!Rt.call(n,a))&&(n[a]=o[a])}return n}),cr=Gt,fr=Q,ar=V(function(n,t){return null==n?{}:k(n,t)}),lr=w;c.assignIn=or,c.before=dn,c.bind=Qt,c.chain=fn,c.compact=Y,c.concat=Z,c.create=Gn,c.defaults=ir,c.defer=Wt,c.delay=Xt,c.filter=hn,c.flatten=tn,c.flattenDeep=rn,c.iteratee=lr,
+c.keys=cr,c.map=yn,c.matches=Kn,c.mixin=Ln,c.negate=mn,c.once=On,c.pick=ar,c.slice=cn,c.sortBy=jn,c.tap=an,c.thru=ln,c.toArray=zn,c.values=Un,c.extend=or,Ln(c,c),c.clone=xn,c.escape=Vn,c.every=sn,c.find=Lt,c.forEach=vn,c.has=Jn,c.head=en,c.identity=Hn,c.indexOf=un,c.isArguments=Yt,c.isArray=Zt,c.isBoolean=En,c.isDate=nr,c.isEmpty=Nn,c.isEqual=kn,c.isFinite=Fn,c.isFunction=Tn,c.isNaN=Rn,c.isNull=$n,c.isNumber=qn,c.isObject=Bn,c.isRegExp=tr,c.isString=Dn,c.isUndefined=Pn,c.last=on,c.max=Yn,c.min=Zn,
+c.noConflict=Qn,c.noop=Wn,c.reduce=gn,c.result=Mn,c.size=_n,c.some=bn,c.uniqueId=Xn,c.each=vn,c.first=en,Ln(c,function(){var n={};return g(c,function(t,r){Rt.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION=tt,Ut(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:Bt)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;
+if(e&&!this.__chain__){var u=this.value();return t.apply(Zt(u)?u:[],n)}return this[r](function(r){return t.apply(Zt(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=pn,typeof define=="function"&&typeof define.amd=="object"&&define.amd?(kt._=c, define(function(){return c})):Tt?((Tt.exports=c)._=c,Ft._=c):kt._=c}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/countBy.js b/tools/node_modules/@babel/core/node_modules/lodash/countBy.js
index 0e88abc276b..0e88abc276b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/countBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/countBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/create.js b/tools/node_modules/@babel/core/node_modules/lodash/create.js
index 919edb850f1..919edb850f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/create.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/create.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/curry.js b/tools/node_modules/@babel/core/node_modules/lodash/curry.js
index 918db1a4a75..918db1a4a75 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/curry.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/curry.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/curryRight.js b/tools/node_modules/@babel/core/node_modules/lodash/curryRight.js
index c85b6f339ba..c85b6f339ba 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/curryRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/curryRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/date.js b/tools/node_modules/@babel/core/node_modules/lodash/date.js
index cbf5b41098f..cbf5b41098f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/date.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/date.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/debounce.js b/tools/node_modules/@babel/core/node_modules/lodash/debounce.js
index 8f751d53d11..8f751d53d11 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/debounce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/debounce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/deburr.js b/tools/node_modules/@babel/core/node_modules/lodash/deburr.js
index f85e314a0c1..f85e314a0c1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/deburr.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/deburr.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/defaultTo.js b/tools/node_modules/@babel/core/node_modules/lodash/defaultTo.js
index 5b333592e93..5b333592e93 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/defaultTo.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/defaultTo.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js b/tools/node_modules/@babel/core/node_modules/lodash/defaults.js
index c74df044c41..c74df044c41 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/defaults.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/defaults.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/defaultsDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/defaultsDeep.js
index 9b5fa3ee220..9b5fa3ee220 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/defaultsDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/defaultsDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/defer.js b/tools/node_modules/@babel/core/node_modules/lodash/defer.js
index f6d6c6fa678..f6d6c6fa678 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/defer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/defer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/delay.js b/tools/node_modules/@babel/core/node_modules/lodash/delay.js
index bd554796fd0..bd554796fd0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/delay.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/delay.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/difference.js b/tools/node_modules/@babel/core/node_modules/lodash/difference.js
index fa28bb301f7..fa28bb301f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/difference.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/difference.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/differenceBy.js b/tools/node_modules/@babel/core/node_modules/lodash/differenceBy.js
index 2cd63e7ec01..2cd63e7ec01 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/differenceBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/differenceBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/differenceWith.js b/tools/node_modules/@babel/core/node_modules/lodash/differenceWith.js
index c0233f4b9c9..c0233f4b9c9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/differenceWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/differenceWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/divide.js b/tools/node_modules/@babel/core/node_modules/lodash/divide.js
index 8cae0cd1b02..8cae0cd1b02 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/divide.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/divide.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/drop.js b/tools/node_modules/@babel/core/node_modules/lodash/drop.js
index d5c3cbaa4e0..d5c3cbaa4e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/drop.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/drop.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/dropRight.js b/tools/node_modules/@babel/core/node_modules/lodash/dropRight.js
index 441fe996811..441fe996811 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/dropRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/dropRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/dropRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/dropRightWhile.js
index 9ad36a04450..9ad36a04450 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/dropRightWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/dropRightWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/dropWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/dropWhile.js
index 903ef568c95..903ef568c95 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/dropWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/dropWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/each.js b/tools/node_modules/@babel/core/node_modules/lodash/each.js
index 8800f42046e..8800f42046e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/each.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/each.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/eachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/eachRight.js
index 3252b2aba32..3252b2aba32 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/eachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/eachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/endsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/endsWith.js
index 76fc866e3ef..76fc866e3ef 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/endsWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/endsWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/entries.js b/tools/node_modules/@babel/core/node_modules/lodash/entries.js
index 7a88df20446..7a88df20446 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/entries.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/entries.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/entriesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/entriesIn.js
index f6c6331c1de..f6c6331c1de 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/entriesIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/entriesIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/eq.js b/tools/node_modules/@babel/core/node_modules/lodash/eq.js
index a940688053d..a940688053d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/eq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/eq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/escape.js b/tools/node_modules/@babel/core/node_modules/lodash/escape.js
index 9247e0029bb..9247e0029bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/escape.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/escape.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/escapeRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/escapeRegExp.js
index 0a58c69fc8e..0a58c69fc8e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/escapeRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/escapeRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/every.js b/tools/node_modules/@babel/core/node_modules/lodash/every.js
index 25080dac498..25080dac498 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/every.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/every.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/extend.js b/tools/node_modules/@babel/core/node_modules/lodash/extend.js
index e00166c206c..e00166c206c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/extend.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/extend.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/extendWith.js b/tools/node_modules/@babel/core/node_modules/lodash/extendWith.js
index dbdcb3b4e45..dbdcb3b4e45 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/extendWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/extendWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fill.js b/tools/node_modules/@babel/core/node_modules/lodash/fill.js
index ae13aa1c996..ae13aa1c996 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fill.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fill.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/filter.js b/tools/node_modules/@babel/core/node_modules/lodash/filter.js
new file mode 100644
index 00000000000..89e0c8c481b
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/filter.js
@@ -0,0 +1,52 @@
+var arrayFilter = require('./_arrayFilter'),
+ baseFilter = require('./_baseFilter'),
+ baseIteratee = require('./_baseIteratee'),
+ isArray = require('./isArray');
+
+/**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, baseIteratee(predicate, 3));
+}
+
+module.exports = filter;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/find.js b/tools/node_modules/@babel/core/node_modules/lodash/find.js
index de732ccb49c..de732ccb49c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/find.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/find.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/findIndex.js
index 4689069f81e..4689069f81e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/findIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/findIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findKey.js b/tools/node_modules/@babel/core/node_modules/lodash/findKey.js
index cac0248a9d2..cac0248a9d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/findKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/findKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLast.js b/tools/node_modules/@babel/core/node_modules/lodash/findLast.js
index 70b4271dc36..70b4271dc36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/findLast.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/findLast.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/findLastIndex.js
index 7da3431f6d2..7da3431f6d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/findLastIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/findLastIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/findLastKey.js b/tools/node_modules/@babel/core/node_modules/lodash/findLastKey.js
index 66fb9fbcece..66fb9fbcece 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/findLastKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/findLastKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/first.js b/tools/node_modules/@babel/core/node_modules/lodash/first.js
index 53f4ad13eee..53f4ad13eee 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/first.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/first.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMap.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMap.js
index e6685068f52..e6685068f52 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flatMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flatMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDeep.js
index 4653d603330..4653d603330 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDepth.js
index 6d72005c970..6d72005c970 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flatMapDepth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flatMapDepth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flatten.js b/tools/node_modules/@babel/core/node_modules/lodash/flatten.js
index 3f09f7f770e..3f09f7f770e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flatten.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flatten.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/flattenDeep.js
index 8ad585cf49d..8ad585cf49d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flattenDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/flattenDepth.js
index 441fdcc2243..441fdcc2243 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flattenDepth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flattenDepth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flip.js b/tools/node_modules/@babel/core/node_modules/lodash/flip.js
index c28dd7896fb..c28dd7896fb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/floor.js b/tools/node_modules/@babel/core/node_modules/lodash/floor.js
index ab6dfa28a4c..ab6dfa28a4c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/floor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/floor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flow.js b/tools/node_modules/@babel/core/node_modules/lodash/flow.js
index 74b6b62d401..74b6b62d401 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flow.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flow.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/flowRight.js b/tools/node_modules/@babel/core/node_modules/lodash/flowRight.js
index 1146141059c..1146141059c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/flowRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/flowRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forEach.js b/tools/node_modules/@babel/core/node_modules/lodash/forEach.js
index c64eaa73f17..c64eaa73f17 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forEach.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forEach.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forEachRight.js
index 7390ebaf855..7390ebaf855 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forEachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forEachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forIn.js b/tools/node_modules/@babel/core/node_modules/lodash/forIn.js
index 583a59638f8..583a59638f8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forInRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forInRight.js
index 4aedf58af56..4aedf58af56 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forInRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forInRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/forOwn.js
index 94eed8402a4..94eed8402a4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forOwn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forOwn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/forOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/forOwnRight.js
index 86f338f0329..86f338f0329 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/forOwnRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/forOwnRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp.js
index e372dbbdf6d..e372dbbdf6d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/F.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/F.js
index a05a63ad9cf..a05a63ad9cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/F.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/F.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/T.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/T.js
index e2ba8ea5690..e2ba8ea5690 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/T.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/T.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/__.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/__.js
index 4af98deb4e9..4af98deb4e9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/__.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/__.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_baseConvert.js
index 9baf8e19022..9baf8e19022 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_baseConvert.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/_baseConvert.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_convertBrowser.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_convertBrowser.js
index bde030dc084..bde030dc084 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_convertBrowser.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/_convertBrowser.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_falseOptions.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_falseOptions.js
index 773235e3437..773235e3437 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_falseOptions.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/_falseOptions.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_mapping.js
index a642ec05846..a642ec05846 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_mapping.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/_mapping.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/_util.js
index 1dbf36f5d2d..1dbf36f5d2d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/_util.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/_util.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/add.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/add.js
index 816eeece34b..816eeece34b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/add.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/add.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/after.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/after.js
index 21a0167ab2d..21a0167ab2d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/after.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/after.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/all.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/all.js
index d0839f77ed7..d0839f77ed7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/all.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/all.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/allPass.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/allPass.js
index 79b73ef8457..79b73ef8457 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/allPass.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/allPass.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/always.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/always.js
index 988770307bc..988770307bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/always.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/always.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/any.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/any.js
index 900ac25e836..900ac25e836 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/any.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/any.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/anyPass.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/anyPass.js
index 2774ab37a40..2774ab37a40 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/anyPass.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/anyPass.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/apply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/apply.js
index 2b757129620..2b757129620 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/apply.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/apply.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/array.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/array.js
index fe939c2c26a..fe939c2c26a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/array.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/array.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ary.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/ary.js
index 8edf18778da..8edf18778da 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ary.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/ary.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assign.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assign.js
index 23f47af17e1..23f47af17e1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assign.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assign.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAll.js
index b1d36c7ef8b..b1d36c7ef8b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAllWith.js
index 21e836e6f0f..21e836e6f0f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignIn.js
index 6e7c65fad8e..6e7c65fad8e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAll.js
index 7ba75dba111..7ba75dba111 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAllWith.js
index e766903d4cf..e766903d4cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInWith.js
index acb5923675e..acb5923675e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignInWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignInWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignWith.js
index eb925212d52..eb925212d52 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assignWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assignWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assoc.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assoc.js
index 7648820c991..7648820c991 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assoc.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assoc.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assocPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/assocPath.js
index 7648820c991..7648820c991 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/assocPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/assocPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/at.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/at.js
index cc39d257c6b..cc39d257c6b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/at.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/at.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/attempt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/attempt.js
index 26ca42ea04d..26ca42ea04d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/attempt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/attempt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/before.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/before.js
index 7a2de65d27e..7a2de65d27e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/before.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/before.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bind.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bind.js
index 5cbe4f302fe..5cbe4f302fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bind.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/bind.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindAll.js
index 6b4a4a0f270..6b4a4a0f270 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindKey.js
index 6a46c6b19c5..6a46c6b19c5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/bindKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/bindKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/camelCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/camelCase.js
index 87b77b49376..87b77b49376 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/camelCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/camelCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/capitalize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/capitalize.js
index cac74e14f8a..cac74e14f8a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/capitalize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/capitalize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/castArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/castArray.js
index 8681c099ead..8681c099ead 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/castArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/castArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ceil.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/ceil.js
index f416b7294c4..f416b7294c4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/ceil.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/ceil.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chain.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/chain.js
index 604fe398b10..604fe398b10 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chain.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/chain.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chunk.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/chunk.js
index 871ab08580b..871ab08580b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/chunk.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/chunk.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clamp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/clamp.js
index 3b06c01ce13..3b06c01ce13 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clamp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/clamp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clone.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/clone.js
index cadb59c917f..cadb59c917f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/clone.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/clone.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeep.js
index a6107aac948..a6107aac948 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeepWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeepWith.js
index 6f01e44a346..6f01e44a346 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneDeepWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneDeepWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneWith.js
index aa8857810e7..aa8857810e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cloneWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/cloneWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/collection.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/collection.js
index fc8b328a0db..fc8b328a0db 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/collection.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/collection.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/commit.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/commit.js
index 130a894f894..130a894f894 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/commit.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/commit.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compact.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/compact.js
index ce8f7a1ac3e..ce8f7a1ac3e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compact.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/compact.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/complement.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/complement.js
index 93eb462b353..93eb462b353 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/complement.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/complement.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compose.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/compose.js
index 1954e942397..1954e942397 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/compose.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/compose.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/concat.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/concat.js
index e59346ad983..e59346ad983 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/concat.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/concat.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cond.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/cond.js
index 6a0120efd40..6a0120efd40 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/cond.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/cond.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conforms.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/conforms.js
index 3247f64a8c2..3247f64a8c2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conforms.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/conforms.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conformsTo.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/conformsTo.js
index aa7f41ec095..aa7f41ec095 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/conformsTo.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/conformsTo.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/constant.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/constant.js
index 9e406fc09c1..9e406fc09c1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/constant.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/constant.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/contains.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/contains.js
index 594722af59a..594722af59a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/contains.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/contains.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/convert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/convert.js
index 4795dc42460..4795dc42460 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/convert.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/convert.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/countBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/countBy.js
index dfa464326fe..dfa464326fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/countBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/countBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/create.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/create.js
index 752025fb83b..752025fb83b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/create.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/create.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curry.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curry.js
index b0b4168c500..b0b4168c500 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curry.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/curry.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryN.js
index 2ae7d00a62a..2ae7d00a62a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryN.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryN.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRight.js
index cb619eb5d98..cb619eb5d98 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRightN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRightN.js
index 2495afc89c3..2495afc89c3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/curryRightN.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/curryRightN.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/date.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/date.js
index 82cb952bc4c..82cb952bc4c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/date.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/date.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/debounce.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/debounce.js
index 26122293af3..26122293af3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/debounce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/debounce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/deburr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/deburr.js
index 96463ab88e7..96463ab88e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/deburr.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/deburr.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultTo.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultTo.js
index d6b52a44479..d6b52a44479 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultTo.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultTo.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaults.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaults.js
index e1a8e6e7dbe..e1a8e6e7dbe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaults.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaults.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsAll.js
index 238fcc3c2f5..238fcc3c2f5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeep.js
index 1f172ff9442..1f172ff9442 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeepAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeepAll.js
index 6835f2f079a..6835f2f079a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defaultsDeepAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defaultsDeepAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/defer.js
index ec7990fe224..ec7990fe224 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/defer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/defer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/delay.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/delay.js
index 556dbd568ee..556dbd568ee 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/delay.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/delay.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/difference.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/difference.js
index 2d0376542a7..2d0376542a7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/difference.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/difference.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceBy.js
index 2f914910a98..2f914910a98 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceWith.js
index bcf5ad2e119..bcf5ad2e119 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/differenceWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/differenceWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissoc.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissoc.js
index 7ec7be190bc..7ec7be190bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissoc.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissoc.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissocPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissocPath.js
index 7ec7be190bc..7ec7be190bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dissocPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dissocPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/divide.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/divide.js
index 82048c5e02a..82048c5e02a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/divide.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/divide.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/drop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/drop.js
index 2fa9b4faa58..2fa9b4faa58 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/drop.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/drop.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLast.js
index 174e5255124..174e5255124 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLast.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLast.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLastWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLastWhile.js
index be2a9d24aed..be2a9d24aed 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropLastWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropLastWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRight.js
index e98881fcd44..e98881fcd44 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRightWhile.js
index cacaa701910..cacaa701910 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropRightWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropRightWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropWhile.js
index 285f864d127..285f864d127 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/dropWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/dropWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/each.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/each.js
index 8800f42046e..8800f42046e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/each.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/each.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/eachRight.js
index 3252b2aba32..3252b2aba32 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/eachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/endsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/endsWith.js
index 17dc2a49511..17dc2a49511 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/endsWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/endsWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entries.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/entries.js
index 7a88df20446..7a88df20446 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entries.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/entries.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entriesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/entriesIn.js
index f6c6331c1de..f6c6331c1de 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/entriesIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/entriesIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/eq.js
index 9a3d21bf1d1..9a3d21bf1d1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/eq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/eq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/equals.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/equals.js
index e6a5ce0caf7..e6a5ce0caf7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/equals.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/equals.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escape.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/escape.js
index 52c1fbba609..52c1fbba609 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escape.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/escape.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escapeRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/escapeRegExp.js
index 369b2eff6e1..369b2eff6e1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/escapeRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/escapeRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/every.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/every.js
index 95c2776c33e..95c2776c33e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/every.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/every.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extend.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extend.js
index e00166c206c..e00166c206c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extend.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/extend.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAll.js
index cc55b64fcc0..cc55b64fcc0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAllWith.js
index 6679d208bc7..6679d208bc7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendWith.js
index dbdcb3b4e45..dbdcb3b4e45 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/extendWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/extendWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fill.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/fill.js
index b2d47e84eb1..b2d47e84eb1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fill.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/fill.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/filter.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/filter.js
index 796d501ce82..796d501ce82 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/filter.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/filter.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/find.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/find.js
index f805d336aa1..f805d336aa1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/find.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/find.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findFrom.js
index da8275e8407..da8275e8407 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndex.js
index 8c15fd11606..8c15fd11606 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndexFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndexFrom.js
index 32e98cb9530..32e98cb9530 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findIndexFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findIndexFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findKey.js
index 475bcfa8a5b..475bcfa8a5b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLast.js
index 093fe94e745..093fe94e745 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLast.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLast.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastFrom.js
index 76c38fbad2a..76c38fbad2a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndex.js
index 36986df0b8a..36986df0b8a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndexFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndexFrom.js
index 34c8176cf19..34c8176cf19 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastIndexFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastIndexFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastKey.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastKey.js
index 5f81b604e81..5f81b604e81 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/findLastKey.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/findLastKey.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/first.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/first.js
index 53f4ad13eee..53f4ad13eee 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/first.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/first.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMap.js
index d01dc4d0481..d01dc4d0481 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDeep.js
index 569c42eb9fa..569c42eb9fa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDepth.js
index 6eb68fdeed8..6eb68fdeed8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatMapDepth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatMapDepth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatten.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatten.js
index 30425d89623..30425d89623 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flatten.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flatten.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDeep.js
index aed5db27c09..aed5db27c09 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDepth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDepth.js
index ad65e378eff..ad65e378eff 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flattenDepth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flattenDepth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flip.js
index 0547e7b4ead..0547e7b4ead 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/floor.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/floor.js
index a6cf3358ed3..a6cf3358ed3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/floor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/floor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flow.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flow.js
index cd83677a62c..cd83677a62c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flow.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flow.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flowRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/flowRight.js
index 972a5b9b1c2..972a5b9b1c2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/flowRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/flowRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEach.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEach.js
index 2f494521c86..2f494521c86 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEach.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEach.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEachRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEachRight.js
index 3ff97336bbf..3ff97336bbf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forEachRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forEachRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forIn.js
index 9341749b1f7..9341749b1f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forInRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forInRight.js
index cecf8bbfa6c..cecf8bbfa6c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forInRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forInRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwn.js
index 246449e9a83..246449e9a83 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwnRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwnRight.js
index c5e826e0d7d..c5e826e0d7d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/forOwnRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/forOwnRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fromPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/fromPairs.js
index f8cc5968cd2..f8cc5968cd2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/fromPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/fromPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/function.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/function.js
index dfe69b1fa03..dfe69b1fa03 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/function.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/function.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functions.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/functions.js
index 09d1bb1baae..09d1bb1baae 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functions.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/functions.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functionsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/functionsIn.js
index 2cfeb83ebbc..2cfeb83ebbc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/functionsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/functionsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/get.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/get.js
index 6d3a32863e7..6d3a32863e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/get.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/get.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/getOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/getOr.js
index 7dbf771f0c6..7dbf771f0c6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/getOr.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/getOr.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/groupBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/groupBy.js
index fc0bc78a57b..fc0bc78a57b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/groupBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/groupBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/gt.js
index 9e57c8085a0..9e57c8085a0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/gt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gte.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/gte.js
index 45847863894..45847863894 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/gte.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/gte.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/has.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/has.js
index b901298398e..b901298398e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/has.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/has.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/hasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/hasIn.js
index b3c3d1a3f3b..b3c3d1a3f3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/hasIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/hasIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/head.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/head.js
index 2694f0a21d6..2694f0a21d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/head.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/head.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identical.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/identical.js
index 85563f4a469..85563f4a469 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identical.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/identical.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identity.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/identity.js
index 096415a5dec..096415a5dec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/identity.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/identity.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/inRange.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/inRange.js
index 202d940bae8..202d940bae8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/inRange.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/inRange.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includes.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/includes.js
index 11467805ce1..11467805ce1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includes.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/includes.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includesFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/includesFrom.js
index 683afdb463a..683afdb463a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/includesFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/includesFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexBy.js
index 7e64bc0fcdb..7e64bc0fcdb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOf.js
index 524658eb95f..524658eb95f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOfFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOfFrom.js
index d99c822f461..d99c822f461 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/indexOfFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/indexOfFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/init.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/init.js
index 2f88d8b0e10..2f88d8b0e10 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/init.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/init.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/initial.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/initial.js
index b732ba0bd69..b732ba0bd69 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/initial.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/initial.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersection.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersection.js
index 52936d560c7..52936d560c7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersection.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersection.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionBy.js
index 72629f277d7..72629f277d7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionWith.js
index e064f400f88..e064f400f88 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/intersectionWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/intersectionWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invert.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invert.js
index 2d5d1f0d45b..2d5d1f0d45b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invert.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invert.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertBy.js
index 63ca97ecb28..63ca97ecb28 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertObj.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertObj.js
index f1d842e49b8..f1d842e49b8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invertObj.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invertObj.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invoke.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invoke.js
index fcf17f0d572..fcf17f0d572 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invoke.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invoke.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgs.js
index d3f2953fa3b..d3f2953fa3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgsMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgsMap.js
index eaa9f84ffbb..eaa9f84ffbb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeArgsMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeArgsMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeMap.js
index 6515fd73f16..6515fd73f16 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/invokeMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/invokeMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArguments.js
index 1d93c9e5994..1d93c9e5994 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArguments.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArguments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArray.js
index ba7ade8ddc0..ba7ade8ddc0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayBuffer.js
index 5088513faf3..5088513faf3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLike.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLike.js
index 8f1856bf6f6..8f1856bf6f6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLike.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLike.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLikeObject.js
index 21084984bce..21084984bce 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isArrayLikeObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isArrayLikeObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBoolean.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBoolean.js
index 9339f75b1f1..9339f75b1f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBoolean.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBoolean.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBuffer.js
index e60b123818d..e60b123818d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isDate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isDate.js
index dc41d089ec8..dc41d089ec8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isDate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isDate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isElement.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isElement.js
index 18ee039a2da..18ee039a2da 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isElement.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isElement.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEmpty.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEmpty.js
index 0f4ae841e21..0f4ae841e21 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEmpty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEmpty.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqual.js
index 41383865f28..41383865f28 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqual.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqual.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqualWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqualWith.js
index 029ff5cdaa0..029ff5cdaa0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isEqualWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isEqualWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isError.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isError.js
index 3dfd81ccc21..3dfd81ccc21 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isError.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isError.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFinite.js
index 0b647b841ec..0b647b841ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFinite.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFinite.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFunction.js
index ff8e5c45853..ff8e5c45853 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isFunction.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isFunction.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isInteger.js
index 67af4ff6dbb..67af4ff6dbb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isLength.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isLength.js
index fc101c5a64b..fc101c5a64b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isLength.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isLength.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMap.js
index a209aa66fcb..a209aa66fcb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatch.js
index 6264ca17fac..6264ca17fac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatch.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatch.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatchWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatchWith.js
index d95f319353f..d95f319353f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isMatchWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isMatchWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNaN.js
index 66a978f1119..66a978f1119 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNaN.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNaN.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNative.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNative.js
index 3d775ba9531..3d775ba9531 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNative.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNative.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNil.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNil.js
index 5952c028a9b..5952c028a9b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNil.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNil.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNull.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNull.js
index f201a354b43..f201a354b43 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNull.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNull.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNumber.js
index a2b5fa049fe..a2b5fa049fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isNumber.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isNumber.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObject.js
index 231ace03bc5..231ace03bc5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObjectLike.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObjectLike.js
index f16082e6fee..f16082e6fee 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isObjectLike.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isObjectLike.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isPlainObject.js
index b5bea90d3a7..b5bea90d3a7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isPlainObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isPlainObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isRegExp.js
index 12a1a3d7185..12a1a3d7185 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSafeInteger.js
index 7230f5520aa..7230f5520aa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSafeInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSafeInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSet.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSet.js
index 35c01f6fa19..35c01f6fa19 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isString.js
index 1fd0679ef86..1fd0679ef86 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSymbol.js
index 38676956dac..38676956dac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isSymbol.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isSymbol.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isTypedArray.js
index 8567953875f..8567953875f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isTypedArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isTypedArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isUndefined.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isUndefined.js
index ddbca31ca70..ddbca31ca70 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isUndefined.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isUndefined.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakMap.js
index ef60c613c4b..ef60c613c4b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakSet.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakSet.js
index c99bfaa6d9d..c99bfaa6d9d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/isWeakSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/isWeakSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/iteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/iteratee.js
index 9f0f71738a0..9f0f71738a0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/iteratee.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/iteratee.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/join.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/join.js
index a220e003c40..a220e003c40 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/join.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/join.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/juxt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/juxt.js
index f71e04e0002..f71e04e0002 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/juxt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/juxt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/kebabCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/kebabCase.js
index 60737f17cdb..60737f17cdb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/kebabCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/kebabCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keyBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keyBy.js
index 9a6a85d4226..9a6a85d4226 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keyBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/keyBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keys.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keys.js
index e12bb07f130..e12bb07f130 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/keys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/keysIn.js
index f3eb36a8d20..f3eb36a8d20 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/keysIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/keysIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lang.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lang.js
index 08cc9c14bdd..08cc9c14bdd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lang.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lang.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/last.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/last.js
index 0f716993fc8..0f716993fc8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/last.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/last.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOf.js
index ddf39c30135..ddf39c30135 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOfFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOfFrom.js
index 1ff6a0b5ad5..1ff6a0b5ad5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lastIndexOfFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lastIndexOfFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerCase.js
index ea64bc15d6f..ea64bc15d6f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerFirst.js
index 539720a3da3..539720a3da3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lowerFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lowerFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lt.js
index a31d21ecc66..a31d21ecc66 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lte.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/lte.js
index d795d10ee7c..d795d10ee7c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/lte.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/lte.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/map.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/map.js
index cf987943628..cf987943628 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/map.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/map.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapKeys.js
index 1684587099e..1684587099e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapValues.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapValues.js
index 4004972751d..4004972751d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mapValues.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mapValues.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matches.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/matches.js
index 29d1e1e4f13..29d1e1e4f13 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matches.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/matches.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/matchesProperty.js
index 4575bd2431b..4575bd2431b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/matchesProperty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/matchesProperty.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/math.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/math.js
index e8f50f79271..e8f50f79271 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/math.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/math.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/max.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/max.js
index a66acac2207..a66acac2207 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/max.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/max.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/maxBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/maxBy.js
index d083fd64fd2..d083fd64fd2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/maxBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/maxBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mean.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mean.js
index 31172460c3b..31172460c3b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mean.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mean.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/meanBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/meanBy.js
index 556f25edfe9..556f25edfe9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/meanBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/meanBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/memoize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/memoize.js
index 638eec63bad..638eec63bad 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/memoize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/memoize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/merge.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/merge.js
index ac66adde122..ac66adde122 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/merge.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/merge.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAll.js
index a3674d67165..a3674d67165 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAllWith.js
index 4bd4206dc7d..4bd4206dc7d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeWith.js
index 00d44d5e1a2..00d44d5e1a2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mergeWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mergeWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/method.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/method.js
index f4060c6878e..f4060c6878e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/method.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/method.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/methodOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/methodOf.js
index 61399056f36..61399056f36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/methodOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/methodOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/min.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/min.js
index d12c6b40d38..d12c6b40d38 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/min.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/min.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/minBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/minBy.js
index fdb9e24d8ad..fdb9e24d8ad 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/minBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/minBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mixin.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/mixin.js
index 332e6fbfdda..332e6fbfdda 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/mixin.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/mixin.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/multiply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/multiply.js
index 4dcf0b0d4af..4dcf0b0d4af 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/multiply.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/multiply.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nAry.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nAry.js
index f262a76ccdc..f262a76ccdc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nAry.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/nAry.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/negate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/negate.js
index 8b6dc7c5b88..8b6dc7c5b88 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/negate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/negate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/next.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/next.js
index 140155e2321..140155e2321 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/next.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/next.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/noop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/noop.js
index b9e32cc8cd8..b9e32cc8cd8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/noop.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/noop.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/now.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/now.js
index 6de2068aacc..6de2068aacc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/now.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/now.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nth.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nth.js
index da4fda74092..da4fda74092 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/nth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nthArg.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/nthArg.js
index fce31659429..fce31659429 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/nthArg.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/nthArg.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/number.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/number.js
index 5c10b8842d2..5c10b8842d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/number.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/number.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/object.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/object.js
index ae39a1346c9..ae39a1346c9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/object.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/object.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omit.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omit.js
index fd685291e64..fd685291e64 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omit.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/omit.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitAll.js
index 144cf4b96e8..144cf4b96e8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitBy.js
index 90df7380269..90df7380269 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/omitBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/omitBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/once.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/once.js
index f8f0a5c73ec..f8f0a5c73ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/once.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/once.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/orderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/orderBy.js
index 848e2107546..848e2107546 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/orderBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/orderBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/over.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/over.js
index 01eba7b9847..01eba7b9847 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/over.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/over.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overArgs.js
index 738556f0c0d..738556f0c0d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overArgs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/overArgs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overEvery.js
index 9f5a032dc77..9f5a032dc77 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overEvery.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/overEvery.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overSome.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/overSome.js
index 15939d5865a..15939d5865a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/overSome.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/overSome.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pad.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pad.js
index f1dea4a98f6..f1dea4a98f6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pad.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pad.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padChars.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padChars.js
index d6e0804cd6c..d6e0804cd6c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padChars.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/padChars.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsEnd.js
index d4ab79ad305..d4ab79ad305 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsStart.js
index a08a30000a6..a08a30000a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padCharsStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/padCharsStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padEnd.js
index a8522ec36a5..a8522ec36a5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/padEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/padStart.js
index f4ca79d4af8..f4ca79d4af8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/padStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/padStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/parseInt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/parseInt.js
index 27314ccbca6..27314ccbca6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/parseInt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/parseInt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partial.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partial.js
index 5d4601598bf..5d4601598bf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partial.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/partial.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partialRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partialRight.js
index 7f05fed0ab3..7f05fed0ab3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partialRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/partialRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partition.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/partition.js
index 2ebcacc1f4d..2ebcacc1f4d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/partition.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/partition.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/path.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/path.js
index b29cfb2139c..b29cfb2139c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/path.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/path.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathEq.js
index 36c027a3834..36c027a3834 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathEq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathEq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathOr.js
index 4ab582091bc..4ab582091bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pathOr.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pathOr.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/paths.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/paths.js
index 1eb7950ac0a..1eb7950ac0a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/paths.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/paths.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pick.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pick.js
index 197393de1d2..197393de1d2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pick.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pick.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickAll.js
index a8ecd461311..a8ecd461311 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickBy.js
index d832d16b6c2..d832d16b6c2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pickBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pickBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pipe.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pipe.js
index b2e1e2cc8dc..b2e1e2cc8dc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pipe.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pipe.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/placeholder.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/placeholder.js
index 1ce17393b99..1ce17393b99 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/placeholder.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/placeholder.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/plant.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/plant.js
index eca8f32b4af..eca8f32b4af 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/plant.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/plant.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pluck.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pluck.js
index 0d1e1abfaf9..0d1e1abfaf9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pluck.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pluck.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/prop.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/prop.js
index b29cfb2139c..b29cfb2139c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/prop.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/prop.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propEq.js
index 36c027a3834..36c027a3834 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propEq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/propEq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propOr.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propOr.js
index 4ab582091bc..4ab582091bc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propOr.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/propOr.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/property.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/property.js
index b29cfb2139c..b29cfb2139c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/property.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/property.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/propertyOf.js
index f6273ee47a1..f6273ee47a1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/propertyOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/propertyOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/props.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/props.js
index 1eb7950ac0a..1eb7950ac0a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/props.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/props.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pull.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pull.js
index 8d7084f0795..8d7084f0795 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pull.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pull.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAll.js
index 98d5c9a73a9..98d5c9a73a9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllBy.js
index 876bc3bf1cd..876bc3bf1cd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllWith.js
index f71ba4d73db..f71ba4d73db 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAt.js
index e8b3bb61259..e8b3bb61259 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/pullAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/pullAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/random.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/random.js
index 99d852e4ab2..99d852e4ab2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/random.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/random.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/range.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/range.js
index a6bb59118b4..a6bb59118b4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/range.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/range.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeRight.js
index fdb712f94e1..fdb712f94e1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStep.js
index d72dfc200c9..d72dfc200c9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStepRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStepRight.js
index 8b2a67bc65d..8b2a67bc65d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rangeStepRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/rangeStepRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rearg.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rearg.js
index 678e02a32a8..678e02a32a8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rearg.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/rearg.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduce.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduce.js
index 4cef0a0083c..4cef0a0083c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduceRight.js
index caf5bb5155d..caf5bb5155d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reduceRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/reduceRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reject.js
index c1632738619..c1632738619 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/reject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/remove.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/remove.js
index e9d13273680..e9d13273680 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/remove.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/remove.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/repeat.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/repeat.js
index 08470f247a3..08470f247a3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/repeat.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/repeat.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/replace.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/replace.js
index 2227db62571..2227db62571 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/replace.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/replace.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rest.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/rest.js
index c1f3d64bdce..c1f3d64bdce 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/rest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/rest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/restFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/restFrom.js
index 714e42b5d66..714e42b5d66 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/restFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/restFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/result.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/result.js
index f86ce071264..f86ce071264 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/result.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/result.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reverse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/reverse.js
index 07c9f5e4933..07c9f5e4933 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/reverse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/reverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/round.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/round.js
index 4c0e5c82998..4c0e5c82998 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/round.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/round.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sample.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sample.js
index 6bea1254de6..6bea1254de6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sample.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sample.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sampleSize.js
index 359ed6fcda1..359ed6fcda1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sampleSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sampleSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/seq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/seq.js
index d8f42b0a4da..d8f42b0a4da 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/seq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/seq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/set.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/set.js
index 0b56a56c8a8..0b56a56c8a8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/set.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/set.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/setWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/setWith.js
index 0b584952b6c..0b584952b6c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/setWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/setWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/shuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/shuffle.js
index aa3a1ca5be9..aa3a1ca5be9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/shuffle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/shuffle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/size.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/size.js
index 7490136e1cb..7490136e1cb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/size.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/size.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/slice.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/slice.js
index 15945d321f7..15945d321f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/slice.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/slice.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/snakeCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/snakeCase.js
index a0ff7808eb9..a0ff7808eb9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/snakeCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/snakeCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/some.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/some.js
index a4fa2d00602..a4fa2d00602 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/some.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/some.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortBy.js
index e0790ad5b70..e0790ad5b70 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndex.js
index 364a05435e7..364a05435e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexBy.js
index 9593dbd13d6..9593dbd13d6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexOf.js
index c9084cab6a0..c9084cab6a0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndex.js
index 47fe241af7d..47fe241af7d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexBy.js
index 0f9a3473267..0f9a3473267 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexOf.js
index 0d4d93278f9..0d4d93278f9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedLastIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedLastIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniq.js
index 882d283702c..882d283702c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniqBy.js
index 033db91ca9d..033db91ca9d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sortedUniqBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sortedUniqBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/split.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/split.js
index 14de1a7efda..14de1a7efda 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/split.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/split.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spread.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/spread.js
index 2d11b70722d..2d11b70722d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spread.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/spread.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spreadFrom.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/spreadFrom.js
index 0b630df1b38..0b630df1b38 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/spreadFrom.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/spreadFrom.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/startCase.js
index ada98c943de..ada98c943de 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/startCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/startsWith.js
index 985e2f2948c..985e2f2948c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/startsWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/startsWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/string.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/string.js
index 773b037048e..773b037048e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/string.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/string.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubArray.js
index cd604cb4930..cd604cb4930 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubFalse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubFalse.js
index 3296664544b..3296664544b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubFalse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubFalse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubObject.js
index c6c8ec472cb..c6c8ec472cb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubString.js
index 701051e8b3f..701051e8b3f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubTrue.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubTrue.js
index 9249082ce94..9249082ce94 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/stubTrue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/stubTrue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/subtract.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/subtract.js
index d32b16d4797..d32b16d4797 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/subtract.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/subtract.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sum.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sum.js
index 5cce12b325c..5cce12b325c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sum.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sum.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sumBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/sumBy.js
index c8826565f98..c8826565f98 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/sumBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/sumBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifference.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifference.js
index 78c16add622..78c16add622 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifference.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifference.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceBy.js
index 298fc7ff681..298fc7ff681 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceWith.js
index 70bc6faf282..70bc6faf282 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/symmetricDifferenceWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/symmetricDifferenceWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tail.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/tail.js
index f122f0ac347..f122f0ac347 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tail.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/tail.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/take.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/take.js
index 9af98a7bdb6..9af98a7bdb6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/take.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/take.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLast.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLast.js
index e98c84a162d..e98c84a162d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLast.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLast.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLastWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLastWhile.js
index 5367968a3d4..5367968a3d4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeLastWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeLastWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRight.js
index b82950a696c..b82950a696c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRightWhile.js
index 8ffb0a28576..8ffb0a28576 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeRightWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeRightWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeWhile.js
index 28136644fe6..28136644fe6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/takeWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/takeWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/tap.js
index d33ad6ec1e2..d33ad6ec1e2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/tap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/tap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/template.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/template.js
index 74857e1c841..74857e1c841 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/template.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/template.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/templateSettings.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/templateSettings.js
index 7bcc0a82b90..7bcc0a82b90 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/templateSettings.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/templateSettings.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/throttle.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/throttle.js
index 77fff142840..77fff142840 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/throttle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/throttle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/thru.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/thru.js
index d42b3b1d840..d42b3b1d840 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/thru.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/thru.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/times.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/times.js
index 0dab06dad16..0dab06dad16 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/times.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/times.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toArray.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toArray.js
index f0c360aca31..f0c360aca31 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toFinite.js
index 3a47687d6b4..3a47687d6b4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toFinite.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toFinite.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toInteger.js
index e0af6a750e3..e0af6a750e3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toIterator.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toIterator.js
index 65e6baa9dde..65e6baa9dde 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toIterator.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toIterator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toJSON.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toJSON.js
index 2d718d0bc1b..2d718d0bc1b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toJSON.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toJSON.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLength.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLength.js
index b97cdd93514..b97cdd93514 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLength.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLength.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLower.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLower.js
index 616ef36ada1..616ef36ada1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toLower.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toLower.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toNumber.js
index d0c6f4d3d64..d0c6f4d3d64 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toNumber.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toNumber.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairs.js
index af783786ee1..af783786ee1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairsIn.js
index 66504abf1f1..66504abf1f1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPairsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPairsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPath.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPath.js
index b4d5e50fb70..b4d5e50fb70 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPlainObject.js
index 278bb86398d..278bb86398d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toPlainObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toPlainObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toSafeInteger.js
index 367a26fddc7..367a26fddc7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toSafeInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toSafeInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toString.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toString.js
index cec4f8e2233..cec4f8e2233 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toUpper.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/toUpper.js
index 54f9a560585..54f9a560585 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/toUpper.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/toUpper.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/transform.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/transform.js
index 759d088f1a3..759d088f1a3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/transform.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/transform.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trim.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trim.js
index e6319a741c7..e6319a741c7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trim.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trim.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimChars.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimChars.js
index c9294de48c7..c9294de48c7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimChars.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimChars.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsEnd.js
index 284bc2f813e..284bc2f813e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsStart.js
index ff0ee65dfba..ff0ee65dfba 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimCharsStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimCharsStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimEnd.js
index 71908805fce..71908805fce 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimStart.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimStart.js
index fda902c3893..fda902c3893 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/trimStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/trimStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/truncate.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/truncate.js
index d265c1decb3..d265c1decb3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/truncate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/truncate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unapply.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unapply.js
index c5dfe779d6f..c5dfe779d6f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unapply.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unapply.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unary.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unary.js
index 286c945fb63..286c945fb63 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unary.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unary.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unescape.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unescape.js
index fddcb46e2dd..fddcb46e2dd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unescape.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unescape.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/union.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/union.js
index ef8228d74c7..ef8228d74c7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/union.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/union.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionBy.js
index 603687a188e..603687a188e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionWith.js
index 65bb3a79287..65bb3a79287 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unionWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unionWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniq.js
index bc1852490ba..bc1852490ba 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqBy.js
index 634c6a8bb3d..634c6a8bb3d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqWith.js
index 0ec601a910f..0ec601a910f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqueId.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqueId.js
index aa8fc2f7398..aa8fc2f7398 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/uniqueId.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/uniqueId.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unnest.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unnest.js
index 5d34060aa75..5d34060aa75 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unnest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unnest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unset.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unset.js
index ea203a0f39f..ea203a0f39f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unset.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unset.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzip.js
index cc364b3c5a4..cc364b3c5a4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzipWith.js
index 182eaa10424..182eaa10424 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/unzipWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/unzipWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/update.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/update.js
index b8ce2cc9e1f..b8ce2cc9e1f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/update.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/update.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/updateWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/updateWith.js
index d5e8282d94f..d5e8282d94f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/updateWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/updateWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperCase.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperCase.js
index c886f202162..c886f202162 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperFirst.js
index d8c04df54bb..d8c04df54bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/upperFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/upperFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/useWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/useWith.js
index d8b3df5a4e8..d8b3df5a4e8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/useWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/useWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/util.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/util.js
index 18c00baed46..18c00baed46 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/util.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/util.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/value.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/value.js
index 555eec7a38d..555eec7a38d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/value.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/value.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valueOf.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/valueOf.js
index f968807d701..f968807d701 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valueOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/valueOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/values.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/values.js
index 2dfc56136b6..2dfc56136b6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/values.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/values.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valuesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/valuesIn.js
index a1b2bb8725e..a1b2bb8725e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/valuesIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/valuesIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/where.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/where.js
index 3247f64a8c2..3247f64a8c2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/where.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/where.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/whereEq.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/whereEq.js
index 29d1e1e4f13..29d1e1e4f13 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/whereEq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/whereEq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/without.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/without.js
index bad9e125bc9..bad9e125bc9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/without.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/without.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/words.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/words.js
index 4a901414b8e..4a901414b8e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/words.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/words.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrap.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrap.js
index e93bd8a1de6..e93bd8a1de6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperAt.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperAt.js
index 8f0a310feac..8f0a310feac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperChain.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperChain.js
index 2a48ea2b5b7..2a48ea2b5b7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperChain.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperChain.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperLodash.js
index a7162d084c8..a7162d084c8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperLodash.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperLodash.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperReverse.js
index e1481aab917..e1481aab917 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperReverse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperReverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperValue.js
index 8eb9112f613..8eb9112f613 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/wrapperValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/wrapperValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xor.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xor.js
index 29e28194893..29e28194893 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/xor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorBy.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorBy.js
index b355686db65..b355686db65 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorWith.js
index 8e05739ad36..8e05739ad36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/xorWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/xorWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zip.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zip.js
index 69e147a441d..69e147a441d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipAll.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipAll.js
index efa8ccbfbb2..efa8ccbfbb2 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObj.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObj.js
index f4a34531b13..f4a34531b13 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObj.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObj.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObject.js
index 462dbb68cb3..462dbb68cb3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObjectDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObjectDeep.js
index 53a5d338073..53a5d338073 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipObjectDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipObjectDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipWith.js
index c5cf9e21282..c5cf9e21282 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fp/zipWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fp/zipWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/fromPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/fromPairs.js
index ee7940d2405..ee7940d2405 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/fromPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/fromPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/function.js b/tools/node_modules/@babel/core/node_modules/lodash/function.js
index b0fc6d93e3a..b0fc6d93e3a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/function.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/function.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/functions.js b/tools/node_modules/@babel/core/node_modules/lodash/functions.js
index 9722928f50e..9722928f50e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/functions.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/functions.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/functionsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/functionsIn.js
index f00345d0668..f00345d0668 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/functionsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/functionsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/get.js b/tools/node_modules/@babel/core/node_modules/lodash/get.js
index 8805ff92c19..8805ff92c19 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/get.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/get.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/groupBy.js b/tools/node_modules/@babel/core/node_modules/lodash/groupBy.js
index babf4f6baa8..babf4f6baa8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/groupBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/groupBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/gt.js b/tools/node_modules/@babel/core/node_modules/lodash/gt.js
index 3a662828801..3a662828801 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/gt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/gt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/gte.js b/tools/node_modules/@babel/core/node_modules/lodash/gte.js
index 4180a687d74..4180a687d74 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/gte.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/gte.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/has.js b/tools/node_modules/@babel/core/node_modules/lodash/has.js
index 34df55e8e2d..34df55e8e2d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/has.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/has.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/hasIn.js b/tools/node_modules/@babel/core/node_modules/lodash/hasIn.js
index 06a3686542e..06a3686542e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/hasIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/hasIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/head.js b/tools/node_modules/@babel/core/node_modules/lodash/head.js
index dee9d1f1e7f..dee9d1f1e7f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/head.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/head.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/identity.js b/tools/node_modules/@babel/core/node_modules/lodash/identity.js
index 2d5d963cd29..2d5d963cd29 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/identity.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/identity.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/inRange.js b/tools/node_modules/@babel/core/node_modules/lodash/inRange.js
index f20728d9205..f20728d9205 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/inRange.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/inRange.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/includes.js b/tools/node_modules/@babel/core/node_modules/lodash/includes.js
index ae0deedc906..ae0deedc906 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/includes.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/includes.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/index.js b/tools/node_modules/@babel/core/node_modules/lodash/index.js
index 5d063e21f33..5d063e21f33 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/index.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/indexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/indexOf.js
index 3c644af2efc..3c644af2efc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/indexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/indexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/initial.js b/tools/node_modules/@babel/core/node_modules/lodash/initial.js
index f47fc509285..f47fc509285 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/initial.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/initial.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersection.js b/tools/node_modules/@babel/core/node_modules/lodash/intersection.js
index a94c13512a9..a94c13512a9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/intersection.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/intersection.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/intersectionBy.js
index 31461aae539..31461aae539 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/intersectionBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/intersectionWith.js
index 63cabfaa403..63cabfaa403 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/intersectionWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/intersectionWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invert.js b/tools/node_modules/@babel/core/node_modules/lodash/invert.js
index 8c4795097bb..8c4795097bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invert.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/invert.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js b/tools/node_modules/@babel/core/node_modules/lodash/invertBy.js
index 3f4f7e532ca..3f4f7e532ca 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invertBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/invertBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invoke.js b/tools/node_modules/@babel/core/node_modules/lodash/invoke.js
index 97d51eb5bcc..97d51eb5bcc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invoke.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/invoke.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/invokeMap.js b/tools/node_modules/@babel/core/node_modules/lodash/invokeMap.js
index 8da5126c613..8da5126c613 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/invokeMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/invokeMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArguments.js b/tools/node_modules/@babel/core/node_modules/lodash/isArguments.js
index 8b9ed66cdde..8b9ed66cdde 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isArguments.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isArguments.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArray.js b/tools/node_modules/@babel/core/node_modules/lodash/isArray.js
index 88ab55fd0ae..88ab55fd0ae 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayBuffer.js
index 12904a64b4c..12904a64b4c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isArrayBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLike.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLike.js
index 0f9668056e5..0f9668056e5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLike.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLike.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLikeObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLikeObject.js
index 6c4812a8d86..6c4812a8d86 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isArrayLikeObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isArrayLikeObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isBoolean.js b/tools/node_modules/@babel/core/node_modules/lodash/isBoolean.js
index a43ed4b8fcf..a43ed4b8fcf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isBoolean.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isBoolean.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isBuffer.js b/tools/node_modules/@babel/core/node_modules/lodash/isBuffer.js
index c103cc74e79..c103cc74e79 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isBuffer.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isBuffer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isDate.js b/tools/node_modules/@babel/core/node_modules/lodash/isDate.js
index 7f0209fca76..7f0209fca76 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isDate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isDate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isElement.js b/tools/node_modules/@babel/core/node_modules/lodash/isElement.js
index 76ae29c3bfa..76ae29c3bfa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isElement.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isElement.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEmpty.js b/tools/node_modules/@babel/core/node_modules/lodash/isEmpty.js
index 3597294a477..3597294a477 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isEmpty.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isEmpty.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEqual.js b/tools/node_modules/@babel/core/node_modules/lodash/isEqual.js
index 5e23e76c942..5e23e76c942 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isEqual.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isEqual.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isEqualWith.js b/tools/node_modules/@babel/core/node_modules/lodash/isEqualWith.js
index 21bdc7ffe36..21bdc7ffe36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isEqualWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isEqualWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isError.js b/tools/node_modules/@babel/core/node_modules/lodash/isError.js
index b4f41e000db..b4f41e000db 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isError.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isError.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/isFinite.js
index 601842bc406..601842bc406 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isFinite.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isFinite.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isFunction.js b/tools/node_modules/@babel/core/node_modules/lodash/isFunction.js
index 907a8cd8bf3..907a8cd8bf3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isFunction.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isFunction.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/isInteger.js
index 66aa87d573d..66aa87d573d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isLength.js b/tools/node_modules/@babel/core/node_modules/lodash/isLength.js
index 3a95caa9625..3a95caa9625 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isLength.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isLength.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMap.js b/tools/node_modules/@babel/core/node_modules/lodash/isMap.js
index 44f8517eee7..44f8517eee7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMatch.js b/tools/node_modules/@babel/core/node_modules/lodash/isMatch.js
index 9773a18cd78..9773a18cd78 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isMatch.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isMatch.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isMatchWith.js b/tools/node_modules/@babel/core/node_modules/lodash/isMatchWith.js
index 187b6a61de5..187b6a61de5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isMatchWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isMatchWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNaN.js b/tools/node_modules/@babel/core/node_modules/lodash/isNaN.js
index 7d0d783bada..7d0d783bada 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isNaN.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isNaN.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNative.js b/tools/node_modules/@babel/core/node_modules/lodash/isNative.js
index f0cb8d58001..f0cb8d58001 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isNative.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isNative.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNil.js b/tools/node_modules/@babel/core/node_modules/lodash/isNil.js
index 79f05052c5e..79f05052c5e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isNil.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isNil.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNull.js b/tools/node_modules/@babel/core/node_modules/lodash/isNull.js
index c0a374d7dc1..c0a374d7dc1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isNull.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isNull.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/isNumber.js
index cd34ee46410..cd34ee46410 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isNumber.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isNumber.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isObject.js
index 1dc893918b8..1dc893918b8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isObjectLike.js b/tools/node_modules/@babel/core/node_modules/lodash/isObjectLike.js
index 301716b5a55..301716b5a55 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isObjectLike.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isObjectLike.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/isPlainObject.js
index 238737313f4..238737313f4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isPlainObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isPlainObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isRegExp.js b/tools/node_modules/@babel/core/node_modules/lodash/isRegExp.js
index 76c9b6e9c3d..76c9b6e9c3d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isRegExp.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isRegExp.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/isSafeInteger.js
index 2a48526e10d..2a48526e10d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isSafeInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isSafeInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSet.js b/tools/node_modules/@babel/core/node_modules/lodash/isSet.js
index ab88bdf81ad..ab88bdf81ad 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isString.js b/tools/node_modules/@babel/core/node_modules/lodash/isString.js
index 627eb9c384d..627eb9c384d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isSymbol.js b/tools/node_modules/@babel/core/node_modules/lodash/isSymbol.js
index dfb60b97f66..dfb60b97f66 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isSymbol.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isSymbol.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isTypedArray.js b/tools/node_modules/@babel/core/node_modules/lodash/isTypedArray.js
index da3f8dd1982..da3f8dd1982 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isTypedArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isTypedArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isUndefined.js b/tools/node_modules/@babel/core/node_modules/lodash/isUndefined.js
index 377d121ab8e..377d121ab8e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isUndefined.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isUndefined.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakMap.js b/tools/node_modules/@babel/core/node_modules/lodash/isWeakMap.js
index 8d36f6638f3..8d36f6638f3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakMap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isWeakMap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakSet.js b/tools/node_modules/@babel/core/node_modules/lodash/isWeakSet.js
index e628b261cf6..e628b261cf6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/isWeakSet.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/isWeakSet.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/iteratee.js b/tools/node_modules/@babel/core/node_modules/lodash/iteratee.js
index 61b73a8c050..61b73a8c050 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/iteratee.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/iteratee.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/join.js b/tools/node_modules/@babel/core/node_modules/lodash/join.js
index 45de079ff27..45de079ff27 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/join.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/join.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/kebabCase.js b/tools/node_modules/@babel/core/node_modules/lodash/kebabCase.js
index 8a52be64555..8a52be64555 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/kebabCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/kebabCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keyBy.js b/tools/node_modules/@babel/core/node_modules/lodash/keyBy.js
index acc007a0abf..acc007a0abf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/keyBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/keyBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keys.js b/tools/node_modules/@babel/core/node_modules/lodash/keys.js
index d143c7186f5..d143c7186f5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/keys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/keys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/keysIn.js b/tools/node_modules/@babel/core/node_modules/lodash/keysIn.js
index a62308f2c5b..a62308f2c5b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/keysIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/keysIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lang.js b/tools/node_modules/@babel/core/node_modules/lodash/lang.js
index a3962169abd..a3962169abd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lang.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lang.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/last.js b/tools/node_modules/@babel/core/node_modules/lodash/last.js
index cad1eafafa3..cad1eafafa3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/last.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/last.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/lastIndexOf.js
index dabfb613a5d..dabfb613a5d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lastIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lastIndexOf.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/lodash.js b/tools/node_modules/@babel/core/node_modules/lodash/lodash.js
new file mode 100644
index 00000000000..1fd7116f426
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lodash.js
@@ -0,0 +1,17161 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.17.20';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Error message constants. */
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
+ FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the maximum memoize cache size. */
+ var MAX_MEMOIZE_SIZE = 500;
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for cloning. */
+ var CLONE_DEEP_FLAG = 1,
+ CLONE_FLAT_FLAG = 2,
+ CLONE_SYMBOLS_FLAG = 4;
+
+ /** Used to compose bitmasks for value comparisons. */
+ var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+ /** Used to compose bitmasks for function metadata. */
+ var WRAP_BIND_FLAG = 1,
+ WRAP_BIND_KEY_FLAG = 2,
+ WRAP_CURRY_BOUND_FLAG = 4,
+ WRAP_CURRY_FLAG = 8,
+ WRAP_CURRY_RIGHT_FLAG = 16,
+ WRAP_PARTIAL_FLAG = 32,
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
+ WRAP_ARY_FLAG = 128,
+ WRAP_REARG_FLAG = 256,
+ WRAP_FLIP_FLAG = 512;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 800,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** Used to associate wrap methods with their bit flags. */
+ var wrapFlags = [
+ ['ary', WRAP_ARY_FLAG],
+ ['bind', WRAP_BIND_FLAG],
+ ['bindKey', WRAP_BIND_KEY_FLAG],
+ ['curry', WRAP_CURRY_FLAG],
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
+ ['flip', WRAP_FLIP_FLAG],
+ ['partial', WRAP_PARTIAL_FLAG],
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
+ ['rearg', WRAP_REARG_FLAG]
+ ];
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ asyncTag = '[object AsyncFunction]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ domExcTag = '[object DOMException]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ nullTag = '[object Null]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ proxyTag = '[object Proxy]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ undefinedTag = '[object Undefined]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
+ reUnescapedHtml = /[&<>"']/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g,
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
+
+ /** Used to match wrap detail comments. */
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
+ reSplitDetails = /,? & /;
+
+ /** Used to match words composed of alphanumeric characters. */
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f',
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reUnicodeWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
+ rsUpper + '+' + rsOptContrUpper,
+ rsOrdUpper,
+ rsOrdLower,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map Latin Unicode letters to basic Latin letters. */
+ var deburredLetters = {
+ // Latin-1 Supplement block.
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss',
+ // Latin Extended-A block.
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
+ '\u0134': 'J', '\u0135': 'j',
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
+ '\u0174': 'W', '\u0175': 'w',
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
+ '\u0132': 'IJ', '\u0133': 'ij',
+ '\u0152': 'Oe', '\u0153': 'oe',
+ '\u0149': "'n", '\u017f': 's'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'"
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array == null ? 0 : array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets the size of an ASCII `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ var asciiSize = baseProperty('length');
+
+ /**
+ * Converts an ASCII `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function asciiToArray(string) {
+ return string.split('');
+ }
+
+ /**
+ * Splits an ASCII `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function asciiWords(string) {
+ return string.match(reAsciiWord) || [];
+ }
+
+ /**
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
+ * without support for iteratee shorthands, which iterates over `collection`
+ * using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFindKey(collection, predicate, eachFunc) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = key;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array == null ? 0 : array.length;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.propertyOf` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyOf(object) {
+ return function(key) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ ++result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
+ * letters to basic Latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ var deburrLetter = basePropertyOf(deburredLetters);
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `string` contains Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
+ */
+ function hasUnicode(string) {
+ return reHasUnicode.test(string);
+ }
+
+ /**
+ * Checks if `string` contains a word composed of Unicode symbols.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
+ */
+ function hasUnicodeWord(string) {
+ return reHasUnicodeWord.test(string);
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Converts `set` to its value-value pairs.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the value-value pairs.
+ */
+ function setToPairs(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = [value, value];
+ });
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * A specialized version of `_.lastIndexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function strictLastIndexOf(array, value, fromIndex) {
+ var index = fromIndex + 1;
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ return hasUnicode(string)
+ ? unicodeSize(string)
+ : asciiSize(string);
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return hasUnicode(string)
+ ? unicodeToArray(string)
+ : asciiToArray(string);
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
+
+ /**
+ * Gets the size of a Unicode `string`.
+ *
+ * @private
+ * @param {string} string The string inspect.
+ * @returns {number} Returns the string size.
+ */
+ function unicodeSize(string) {
+ var result = reUnicode.lastIndex = 0;
+ while (reUnicode.test(string)) {
+ ++result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts a Unicode `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function unicodeToArray(string) {
+ return string.match(reUnicode) || [];
+ }
+
+ /**
+ * Splits a Unicode `string` into an array of its words.
+ *
+ * @private
+ * @param {string} The string to inspect.
+ * @returns {Array} Returns the words of `string`.
+ */
+ function unicodeWords(string) {
+ return string.match(reUnicodeWord) || [];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ var runInContext = (function runInContext(context) {
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
+
+ /** Built-in constructor references. */
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = context['__core-js_shared__'];
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var nativeObjectToString = objectProto.toString;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice,
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
+ symIterator = Symbol ? Symbol.iterator : undefined,
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ var defineProperty = (function() {
+ try {
+ var func = getNative(Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+ }());
+
+ /** Mocked built-ins. */
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = Date.now,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReverse = arrayProto.reverse;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array and iteratees accept only
+ * one argument. The heuristic for whether a section qualifies for shortcut
+ * fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
+ * `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!isObject(proto)) {
+ return {};
+ }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+ }());
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
+ * following template settings to use alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
+
+ this.size = data.size;
+ return result;
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.sample` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @returns {*} Returns the random element.
+ */
+ function arraySample(array) {
+ var length = array.length;
+ return length ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * A specialized version of `_.sampleSize` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function arraySampleSize(array, n) {
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * A specialized version of `_.shuffle` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function arrayShuffle(array) {
+ return shuffleSelf(copyArray(array));
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ baseAssignValue(object, key, value);
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.assignIn` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssignIn(object, source) {
+ return object && copyObject(source, keysIn(source), object);
+ }
+
+ /**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && defineProperty) {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Array} Returns the picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ length = paths.length,
+ result = Array(length),
+ skip = object == null;
+
+ while (++index < length) {
+ result[index] = skip ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Deep clone
+ * 2 - Flatten inherited properties
+ * 4 - Clone symbols
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, bitmask, customizer, key, object, stack) {
+ var result,
+ isDeep = bitmask & CLONE_DEEP_FLAG,
+ isFlat = bitmask & CLONE_FLAT_FLAG,
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
+
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
+ if (!isDeep) {
+ return isFlat
+ ? copySymbolsIn(value, baseAssignIn(result, value))
+ : copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (isSet(value)) {
+ value.forEach(function(subValue) {
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
+ });
+ } else if (isMap(value)) {
+ value.forEach(function(subValue, key) {
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ }
+
+ var keysFunc = isFull
+ ? (isFlat ? getAllKeysIn : getAllKeys)
+ : (isFlat ? keysIn : keys);
+
+ var props = isArr ? undefined : keysFunc(value);
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseConforms(source) {
+ var props = keys(source);
+ return function(object) {
+ return baseConformsTo(object, source, props);
+ };
+ }
+
+ /**
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ */
+ function baseConformsTo(object, source, props) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
+ * to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Array} args The arguments to provide to `func`.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee == null ? value : iteratee(value);
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the function names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ return object != null && hasOwnProperty.call(object, key);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ var func = object == null ? object : object[toKey(last(path))];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+ function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+ }
+
+ /**
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ */
+ function baseIsArrayBuffer(value) {
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
+ }
+
+ /**
+ * The base implementation of `_.isDate` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ */
+ function baseIsDate(value) {
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMap` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ */
+ function baseIsMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ */
+ function baseIsRegExp(value) {
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
+ }
+
+ /**
+ * The base implementation of `_.isSet` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ */
+ function baseIsSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ baseFor(source, function(srcValue, key) {
+ stack || (stack = new Stack);
+ if (isObject(srcValue)) {
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ }, keysIn);
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = safeGet(object, key),
+ srcValue = safeGet(source, key),
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ var isArr = isArray(srcValue),
+ isBuff = !isArr && isBuffer(srcValue),
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = cloneBuffer(srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = cloneTypedArray(srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ newValue = objValue;
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || isFunction(objValue)) {
+ newValue = initCloneObject(srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ if (iteratees.length) {
+ iteratees = arrayMap(iteratees, function(iteratee) {
+ if (isArray(iteratee)) {
+ return function(value) {
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
+ }
+ }
+ return iteratee;
+ });
+ } else {
+ iteratees = [identity];
+ }
+
+ var index = -1;
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, paths) {
+ return basePickBy(object, paths, function(value, path) {
+ return hasIn(object, path);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} paths The property paths to pick.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, paths, predicate) {
+ var index = -1,
+ length = paths.length,
+ result = {};
+
+ while (++index < length) {
+ var path = paths[index],
+ value = baseGet(object, path);
+
+ if (predicate(value, path)) {
+ baseSet(result, castPath(path, object), value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (array === values) {
+ values = copyArray(values);
+ }
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ } else {
+ baseUnset(array, index);
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the range of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ return setToString(overRest(func, start, identity), func + '');
+ }
+
+ /**
+ * The base implementation of `_.sample`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ */
+ function baseSample(collection) {
+ return arraySample(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.sampleSize` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} n The number of elements to sample.
+ * @returns {Array} Returns the random elements.
+ */
+ function baseSampleSize(collection, n) {
+ var array = values(collection);
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ if (!isObject(object)) {
+ return object;
+ }
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]),
+ newValue = value;
+
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
+ return object;
+ }
+
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = isObject(objValue)
+ ? objValue
+ : (isIndex(path[index + 1]) ? [] : {});
+ }
+ }
+ assignValue(nested, key, newValue);
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `setToString` without support for hot loop shorting.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
+ return defineProperty(func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': constant(string),
+ 'writable': true
+ });
+ };
+
+ /**
+ * The base implementation of `_.shuffle`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ */
+ function baseShuffle(collection) {
+ return shuffleSelf(values(collection));
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array == null ? low : array.length;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ var low = 0,
+ high = array == null ? 0 : array.length;
+ if (high === 0) {
+ return 0;
+ }
+
+ value = iteratee(value);
+ var valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The property path to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = castPath(path, object);
+ object = parent(object, path);
+ return object == null || delete object[toKey(last(path))];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var length = arrays.length;
+ if (length < 2) {
+ return length ? baseUniq(arrays[0]) : [];
+ }
+ var index = -1,
+ result = Array(length);
+
+ while (++index < length) {
+ var array = arrays[index],
+ othIndex = -1;
+
+ while (++othIndex < length) {
+ if (othIndex != index) {
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
+ }
+ }
+ }
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ /**
+ * A `baseRest` alias which can be replaced with `identity` by module
+ * replacement plugins.
+ *
+ * @private
+ * @type {Function}
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ var castRest = baseRest;
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
+ *
+ * @private
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
+ */
+ var clearTimeout = ctxClearTimeout || function(id) {
+ return root.clearTimeout(id);
+ };
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ baseAssignValue(object, key, newValue);
+ } else {
+ assignValue(object, key, newValue);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Copies own and inherited symbols of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbolsIn(source, object) {
+ return copyObject(source, getSymbolsIn(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBind(func, bitmask, thisArg) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new case function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = hasUnicode(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtor(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurry(func, bitmask, arity) {
+ var Ctor = createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getHolder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.find` or `_.findLast` function.
+ *
+ * @private
+ * @param {Function} findIndexFunc The function to find the collection index.
+ * @returns {Function} Returns the new find function.
+ */
+ function createFind(findIndexFunc) {
+ return function(collection, predicate, fromIndex) {
+ var iterable = Object(collection);
+ if (!isArrayLike(collection)) {
+ var iteratee = getIteratee(predicate, 3);
+ collection = keys(collection);
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
+ }
+ var index = findIndexFunc(collection, predicate, fromIndex);
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
+ };
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return flatRest(function(funcs) {
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value)) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & WRAP_ARY_FLAG,
+ isBind = bitmask & WRAP_BIND_FLAG,
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
+ isFlip = bitmask & WRAP_FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtor(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length;
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getHolder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurry(
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtor(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator, defaultValue) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return defaultValue;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new over function.
+ */
+ function createOver(arrayFunc) {
+ return flatRest(function(iteratees) {
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
+ return baseRest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return hasUnicode(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartial(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & WRAP_BIND_FLAG,
+ Ctor = createCtor(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
+
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return setWrapToString(result, func, bitmask);
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
+ if (precision && nativeIsFinite(number)) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
+ *
+ * @private
+ * @param {Function} keysFunc The function to get the keys of a given object.
+ * @returns {Function} Returns the new pairs function.
+ */
+ function createToPairs(keysFunc) {
+ return function(object) {
+ var tag = getTag(object);
+ if (tag == mapTag) {
+ return mapToArray(object);
+ }
+ if (tag == setTag) {
+ return setToPairs(object);
+ }
+ return baseToPairs(object, keysFunc(object));
+ };
+ }
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask flags.
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * 512 - `_.flip`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] === undefined
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
+ var result = createBind(func, bitmask, thisArg);
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
+ result = createCurry(func, bitmask, arity);
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
+ result = createPartial(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybrid.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setWrapToString(setter(result, newData), func, bitmask);
+ }
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
+ * of source objects to the destination object for all destination properties
+ * that resolve to `undefined`.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
+ * objects into destination objects that are passed thru.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, objValue);
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
+ stack['delete'](srcValue);
+ }
+ return objValue;
+ }
+
+ /**
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
+ * objects.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {string} key The key of the property to inspect.
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
+ */
+ function customOmitClone(value) {
+ return isPlainObject(value) ? undefined : value;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Check that cyclic values are equal.
+ var arrStacked = stack.get(array);
+ var othStacked = stack.get(other);
+ if (arrStacked && othStacked) {
+ return arrStacked == other && othStacked == array;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Check that cyclic values are equal.
+ var objStacked = stack.get(object);
+ var othStacked = stack.get(other);
+ if (objStacked && othStacked) {
+ return objStacked == other && othStacked == object;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseRest` which flattens the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @returns {Function} Returns the new function.
+ */
+ function flatRest(func) {
+ return setToString(overRest(func, undefined, flatten), func + '');
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getHolder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+ function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
+
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+ };
+
+ /**
+ * Creates an array of the own and inherited enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Extracts wrapper details from the `source` body comment.
+ *
+ * @private
+ * @param {string} source The source to inspect.
+ * @returns {Array} Returns the wrapper details.
+ */
+ function getWrapDetails(source) {
+ var match = source.match(reWrapDetails);
+ return match ? match[1].split(reSplitDetails) : [];
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return new Ctor;
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return new Ctor;
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
+ *
+ * @private
+ * @param {string} source The source to modify.
+ * @returns {Array} details The details to insert.
+ * @returns {string} Returns the modified source.
+ */
+ function insertWrapDetails(source, details) {
+ var length = details.length;
+ if (!length) {
+ return source;
+ }
+ var lastIndex = length - 1;
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
+ details = details.join(length > 2 ? ', ' : ' ');
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArray(value) || isArguments(value) ||
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `func` is capable of being masked.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
+ */
+ var isMaskable = coreJsData ? isFunction : stubFalse;
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+ function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
+
+ var cache = result.cache;
+ return result;
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & WRAP_BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & WRAP_ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+ function objectToString(value) {
+ return nativeObjectToString.call(value);
+ }
+
+ /**
+ * A specialized version of `baseRest` which transforms the rest array.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function safeGet(object, key) {
+ if (key === 'constructor' && typeof object[key] === 'function') {
+ return;
+ }
+
+ if (key == '__proto__') {
+ return;
+ }
+
+ return object[key];
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = shortOut(baseSetData);
+
+ /**
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @returns {number|Object} Returns the timer id or timeout object.
+ */
+ var setTimeout = ctxSetTimeout || function(func, wait) {
+ return root.setTimeout(func, wait);
+ };
+
+ /**
+ * Sets the `toString` method of `func` to return `string`.
+ *
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+ var setToString = shortOut(baseSetToString);
+
+ /**
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
+ * with wrapper details in a comment at the top of the source body.
+ *
+ * @private
+ * @param {Function} wrapper The function to modify.
+ * @param {Function} reference The reference function.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Function} Returns `wrapper`.
+ */
+ function setWrapToString(wrapper, reference, bitmask) {
+ var source = (reference + '');
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
+ }
+
+ /**
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
+ *
+ * @private
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
+ */
+ function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
+ }
+
+ /**
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
+ *
+ * @private
+ * @param {Array} array The array to shuffle.
+ * @param {number} [size=array.length] The size of `array`.
+ * @returns {Array} Returns `array`.
+ */
+ function shuffleSelf(array, size) {
+ var index = -1,
+ length = array.length,
+ lastIndex = length - 1;
+
+ size = size === undefined ? length : size;
+ while (++index < size) {
+ var rand = baseRandom(index, lastIndex),
+ value = array[rand];
+
+ array[rand] = array[index];
+ array[index] = value;
+ }
+ array.length = size;
+ return array;
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Updates wrapper `details` based on `bitmask` flags.
+ *
+ * @private
+ * @returns {Array} details The details to modify.
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
+ * @returns {Array} Returns `details`.
+ */
+ function updateWrapDetails(details, bitmask) {
+ arrayEach(wrapFlags, function(pair) {
+ var value = '_.' + pair[0];
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
+ details.push(value);
+ }
+ });
+ return details.sort();
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array of chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array == null ? 0 : array.length;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length;
+ if (!length) {
+ return [];
+ }
+ var args = Array(length - 1),
+ array = arguments[0],
+ index = length;
+
+ while (index--) {
+ args[index - 1] = arguments[index];
+ }
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of `array` values not included in the other given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([2, 1], [2, 3]);
+ * // => [1]
+ */
+ var difference = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = baseRest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. The order and
+ * references of result values are determined by the first array. The comparator
+ * is invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = baseRest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length - 1;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = fromIndex < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1);
+ }
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['a', 1], ['b', 2]]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs == null ? 0 : pairs.length,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
+ if (index < 0) {
+ index = nativeMax(length + index, 0);
+ }
+ return baseIndexOf(array, value, index);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 0, -1) : [];
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons. The order and references of result values are
+ * determined by the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [2, 3]);
+ * // => [2]
+ */
+ var intersection = baseRest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. The order and references of result values are
+ * determined by the first array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. The order and references
+ * of result values are determined by the first array. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = baseRest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ if (comparator) {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array == null ? '' : nativeJoin.call(array, separator);
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
+ }
+ return value === value
+ ? strictLastIndexOf(array, value, index)
+ : baseFindIndex(array, baseIsNaN, index, true);
+ }
+
+ /**
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
+ * element from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pull(array, 'a', 'c');
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ var pull = baseRest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
+ *
+ * _.pullAll(array, ['a', 'c']);
+ * console.log(array);
+ * // => ['b', 'b']
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ * var pulled = _.pullAt(array, [1, 3]);
+ *
+ * console.log(array);
+ * // => ['a', 'c']
+ *
+ * console.log(pulled);
+ * // => ['b', 'd']
+ */
+ var pullAt = flatRest(function(array, indexes) {
+ var length = array == null ? 0 : array.length,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array == null ? array : nativeReverse.call(array);
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 1
+ */
+ function sortedIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
+ * // => 4
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
+ *
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array == null ? 0 : array.length;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ var length = array == null ? 0 : array.length;
+ return length ? baseSlice(array, 1, length) : [];
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array == null ? 0 : array.length;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2], [1, 2]);
+ * // => [2, 1]
+ */
+ var union = baseRest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. Result values are chosen from the first
+ * array in which the value occurs. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. Result values are chosen from
+ * the first array in which the value occurs. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each element
+ * is kept. The order of result values is determined by the order they occur
+ * in the array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length) ? baseUniq(array) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The order of result values is
+ * determined by the order they occur in the array.The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['a', 'b'], [1, 2], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.pull`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([2, 1, 2, 3], 1, 2);
+ * // => [3]
+ */
+ var without = baseRest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [2, 3]);
+ * // => [1, 3]
+ */
+ var xor = baseRest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The order of result values is determined
+ * by the order they occur in the arrays. The iteratee is invoked with one
+ * argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
+ * // => [1.2, 3.4]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = baseRest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The order of result values is
+ * determined by the order they occur in the arrays. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = baseRest(function(arrays) {
+ var comparator = last(arrays);
+ comparator = typeof comparator == 'function' ? comparator : undefined;
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
+ * // => [['a', 1, true], ['b', 2, false]]
+ */
+ var zip = baseRest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = baseRest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ */
+ var wrapperAt = flatRest(function(paths) {
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ ++result[key];
+ } else {
+ baseAssignValue(result, key, 1);
+ }
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * **Note:** This method returns `true` for
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
+ * elements of empty collections.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * **Note:** Unlike `_.remove`, this method returns a new array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ *
+ * // Combining several predicates using `_.overEvery` or `_.overSome`.
+ * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
+ * // => objects for ['fred', 'barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ var find = createFind(findIndex);
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ var findLast = createFind(findLastIndex);
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _.forEach([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ var func = isArray(collection) ? arrayEach : baseEach;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ baseAssignValue(result, key, [value]);
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
+ * // => true
+ *
+ * _.includes('abcd', 'bc');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `path` is a function, it's invoked
+ * for, and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = baseRest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ baseAssignValue(result, key, value);
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, negate(getIteratee(predicate, 3)));
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var func = isArray(collection) ? arraySample : baseSample;
+ return func(collection);
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
+ return func(collection, n);
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
+ return func(collection);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ return isString(collection) ? stringSize(collection) : collection.length;
+ }
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ return baseKeys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+ var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+ var now = ctxNow || function() {
+ return root.Date.now();
+ };
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * function greet(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = baseRest(function(func, thisArg, partials) {
+ var bitmask = WRAP_BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bind));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = baseRest(function(object, key, partials) {
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getHolder(bindKey));
+ bitmask |= WRAP_PARTIAL_FLAG;
+ }
+ return createWrap(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ timeWaiting = wait - timeSinceLastCall;
+
+ return maxing
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
+ : timeWaiting;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one millisecond.
+ */
+ var defer = baseRest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = baseRest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new flipped function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrap(func, WRAP_FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Expose `MapCache`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new negated function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return !predicate.call(this);
+ case 1: return !predicate.call(this, args[0]);
+ case 2: return !predicate.call(this, args[0], args[1]);
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
+ }
+ return !predicate.apply(this, args);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with its arguments transformed.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
+ * The argument transforms.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, [square, doubled]);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = castRest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return baseRest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partial));
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * function greet(greeting, name) {
+ * return greeting + ' ' + name;
+ * }
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = baseRest(function(func, partials) {
+ var holders = replaceHolders(partials, getHolder(partialRight));
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, [2, 0, 1]);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = flatRest(function(func, indexes) {
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? start : toInteger(start);
+ return baseRest(func, start);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
+ return baseRest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to `wrapper` as its first
+ * argument. Any additional arguments provided to the function are appended
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
+ * binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, &amp; pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ return partial(castFunction(wrapper), value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
+ }
+
+ /**
+ * Checks if `object` conforms to `source` by invoking the predicate
+ * properties of `source` with the corresponding property values of `object`.
+ *
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
+ * partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
+ * // => true
+ *
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
+ * // => false
+ */
+ function conformsTo(object, source) {
+ return source == null || baseConformsTo(object, source, keys(source));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+ };
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = nativeIsBuffer || stubFalse;
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) &&
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
+ return !value.length;
+ }
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ if (isPrototype(value)) {
+ return !baseKeys(value).length;
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are compared by strict equality, i.e. `===`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ var tag = baseGetTag(value);
+ return tag == errorTag || tag == domExcTag ||
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ *
+ * _.isFinite('3');
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values.
+ *
+ * **Note:** This method is equivalent to `_.matches` when `source` is
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ *
+ * _.isMatch(object, { 'b': 2 });
+ * // => true
+ *
+ * _.isMatch(object, { 'b': 1 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a pristine native function.
+ *
+ * **Note:** This method can't reliably detect native functions in the presence
+ * of the core-js package because core-js circumvents this kind of detection.
+ * Despite multiple requests, the core-js maintainer has made it clear: any
+ * attempt to fix the detection will be obstructed. As a result, we're left
+ * with little choice but to throw an error. Unfortunately, this also affects
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
+ * which rely on core-js.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (isMaskable(value)) {
+ throw new Error(CORE_ERROR_TEXT);
+ }
+ return baseIsNative(value);
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
+ funcToString.call(Ctor) == objectCtorString;
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (symIterator && value[symIterator]) {
+ return iteratorToArray(value[symIterator]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3.2);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3.2');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3.2);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3.2');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return value
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
+ : (value === 0 ? value : 0);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * function Bar() {
+ * this.c = 3;
+ * }
+ *
+ * Foo.prototype.b = 2;
+ * Bar.prototype.d = 4;
+ *
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Array} Returns the picked values.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ */
+ var at = flatRest(baseAt);
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties == null ? result : baseAssign(result, properties);
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var defaults = baseRest(function(object, sources) {
+ object = Object(object);
+
+ var index = -1;
+ var length = sources.length;
+ var guard = length > 2 ? sources[2] : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ length = 1;
+ }
+
+ while (++index < length) {
+ var source = sources[index];
+ var props = keysIn(source);
+ var propsIndex = -1;
+ var propsLength = props.length;
+
+ while (++propsIndex < propsLength) {
+ var key = props[propsIndex];
+ var value = object[key];
+
+ if (value === undefined ||
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ object[key] = source[key];
+ }
+ }
+ }
+
+ return object;
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
+ * // => { 'a': { 'b': 2, 'c': 3 } }
+ */
+ var defaultsDeep = baseRest(function(args) {
+ args.push(undefined, customDefaultsMerge);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the function names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (value != null &&
+ typeof value.toString != 'function') {
+ value = nativeObjectToString.call(value);
+ }
+
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = baseRest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, iteratee(value, key, object), value);
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ baseAssignValue(result, key, iteratee(value, key, object));
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with six arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = { 'a': [1], 'b': [2] };
+ * var other = { 'a': [3], 'b': [4] };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'a': [1, 3], 'b': [2, 4] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable property paths of `object` that are not omitted.
+ *
+ * **Note:** This method is considerably slower than `_.pick`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = flatRest(function(object, paths) {
+ var result = {};
+ if (object == null) {
+ return result;
+ }
+ var isDeep = false;
+ paths = arrayMap(paths, function(path) {
+ path = castPath(path, object);
+ isDeep || (isDeep = path.length > 1);
+ return path;
+ });
+ copyObject(object, getAllKeysIn(object), result);
+ if (isDeep) {
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
+ }
+ var length = paths.length;
+ while (length--) {
+ baseUnset(result, paths[length]);
+ }
+ return result;
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ return pickBy(object, negate(getIteratee(predicate)));
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [paths] The property paths to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = flatRest(function(object, paths) {
+ return object == null ? {} : basePick(object, paths);
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Function} [predicate=_.identity] The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ if (object == null) {
+ return {};
+ }
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
+ return [prop];
+ });
+ predicate = getIteratee(predicate);
+ return basePickBy(object, props, function(value, path) {
+ return predicate(value, path[0]);
+ });
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ length = 1;
+ object = undefined;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
+ * entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ var toPairs = createToPairs(keys);
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
+ * or set, its entries are returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
+ */
+ var toPairsIn = createToPairs(keysIn);
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. If `accumulator` is not
+ * provided, a new object with the same `[[Prototype]]` will be used. The
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object),
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
+
+ iteratee = getIteratee(iteratee, 4);
+ if (accumulator == null) {
+ var Ctor = object && object.constructor;
+ if (isArrLike) {
+ accumulator = isArr ? new Ctor : [];
+ }
+ else if (isObject(object)) {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ else {
+ accumulator = {};
+ }
+ }
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object == null ? [] : baseValues(object, keys(object));
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toFinite(start);
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toFinite(end);
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toFinite(lower);
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toFinite(upper);
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
+ * letters to basic Latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search up to.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ var end = position;
+ position -= target.length;
+ return position >= 0 && string.slice(position, end) == target;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
+ * corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, &amp; pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (!separator && hasUnicode(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return string.split(separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = position == null
+ ? 0
+ : baseClamp(toInteger(position), 0, string.length);
+
+ target = baseToString(target);
+ return string.slice(position, position + target.length) == target;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = '//# sourceURL=' +
+ (hasOwnProperty.call(options, 'sourceURL')
+ ? (options.sourceURL + '').replace(/\s/g, ' ')
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (hasUnicode(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, &amp; pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = baseRest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'click': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, ['click']);
+ * jQuery(element).on('click', view.click);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = flatRest(function(object, methodNames) {
+ arrayEach(methodNames, function(key) {
+ key = toKey(key);
+ baseAssignValue(object, key, bind(object[key], object));
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new composite function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.stubTrue, _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs == null ? 0 : pairs.length,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return baseRest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.conformsTo` with
+ * `source` partially applied.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 2, 'b': 1 },
+ * { 'a': 1, 'b': 2 }
+ * ];
+ *
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
+ * // => [{ 'a': 1, 'b': 2 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
+ * @example
+ *
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
+ */
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Checks `value` to determine whether a default value should be returned in
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
+ * or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.14.0
+ * @category Util
+ * @param {*} value The value to check.
+ * @param {*} defaultValue The default value.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * _.defaultTo(1, 10);
+ * // => 1
+ *
+ * _.defaultTo(undefined, 10);
+ * // => 10
+ */
+ function defaultTo(value, defaultValue) {
+ return (value == null || value !== value) ? defaultValue : value;
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow([_.add, square]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
+ * @returns {Function} Returns the new composite function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight([square, _.add]);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = baseRest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new invoker function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = baseRest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new pass-thru function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return baseRest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over([Math.max, Math.min]);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the range of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+ function stubFalse() {
+ return false;
+ }
+
+ /**
+ * This method returns a new empty object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Object} Returns the new empty object.
+ * @example
+ *
+ * var objects = _.times(2, _.stubObject);
+ *
+ * console.log(objects);
+ * // => [{}, {}]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => false
+ */
+ function stubObject() {
+ return {};
+ }
+
+ /**
+ * This method returns an empty string.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {string} Returns the empty string.
+ * @example
+ *
+ * _.times(2, _.stubString);
+ * // => ['', '']
+ */
+ function stubString() {
+ return '';
+ }
+
+ /**
+ * This method returns `true`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `true`.
+ * @example
+ *
+ * _.times(2, _.stubTrue);
+ * // => [true, true]
+ */
+ function stubTrue() {
+ return true;
+ }
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(0));
+ * // => [0, 0, 0, 0]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ }, 0);
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ }, 1);
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee, 2));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ }, 1);
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ }, 0);
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee, 2))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.conformsTo = conformsTo;
+ lodash.deburr = deburr;
+ lodash.defaultTo = defaultTo;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.stubArray = stubArray;
+ lodash.stubFalse = stubFalse;
+ lodash.stubObject = stubObject;
+ lodash.stubString = stubString;
+ lodash.stubTrue = stubTrue;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toFinite = toFinite;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = (this.__filtered__ && !index)
+ ? new LazyWrapper(this)
+ : this.clone();
+
+ if (result.__filtered__) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ return this.filter(negate(getIteratee(predicate)));
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = lodashFunc.name + '';
+ if (!hasOwnProperty.call(realNames, key)) {
+ realNames[key] = [];
+ }
+ realNames[key].push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ // Add lazy aliases.
+ lodash.prototype.first = lodash.prototype.head;
+
+ if (symIterator) {
+ lodash.prototype[symIterator] = wrapperToIterator;
+ }
+ return lodash;
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Expose Lodash on the global object to prevent errors when Lodash is
+ // loaded by a script tag in the presence of an AMD loader.
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
+ // Use `_.noConflict` to remove Lodash from the global object.
+ root._ = _;
+
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds it.
+ else if (freeModule) {
+ // Export for Node.js.
+ (freeModule.exports = _)._ = _;
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js b/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js
new file mode 100644
index 00000000000..a078dd93176
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lodash.min.js
@@ -0,0 +1,139 @@
+/**
+ * @license
+ * Lodash <https://lodash.com/>
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
+return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
+return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match(Bt)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?q(n,t,r):g(n,b,r)}function d(n,t,r,e){
+for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Sn}function m(n){return function(t){return null==t?Y:t[n]}}function x(n){return function(t){return null==n?Y:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==Y&&(r=r===Y?i:r+i);
+}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return function(t){return n(t)}}function z(n,t){return c(t,function(t){return n[t]})}function E(n,t){return n.has(t)}function S(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){
+return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==un||(n[r]=un,i[u++]=r)}return i}function N(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function P(n){
+var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function Z(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function K(n){return B(n)?G(n):se(n)}function V(n){return B(n)?H(n):p(n)}function G(n){for(var t=Tr.lastIndex=0;Tr.test(n);)++t;return t}function H(n){return n.match(Tr)||[]}function J(n){return n.match($r)||[]}var Y,Q="4.17.20",X=200,nn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",tn="Expected a function",rn="__lodash_hash_undefined__",en=500,un="__lodash_placeholder__",on=1,fn=2,cn=4,an=1,ln=2,sn=1,hn=2,pn=4,_n=8,vn=16,gn=32,yn=64,dn=128,bn=256,wn=512,mn=30,xn="...",jn=800,An=16,kn=1,On=2,In=3,Rn=1/0,zn=9007199254740991,En=1.7976931348623157e308,Sn=NaN,Wn=4294967295,Ln=Wn-1,Cn=Wn>>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={};
+Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
+"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
+"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
+"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
+"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
+"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){
+try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
+this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1,
+n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==On)g=w;else if(!w){if(b==kn)continue n;break n}}_[h++]=g}return _}function Yt(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Qt(){this.__data__=es?es(null):{},this.size=0}function Xt(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function nr(n){var t=this.__data__;if(es){var r=t[n];return r===rn?Y:r}return yl.call(t,n)?t[n]:Y}function tr(n){var t=this.__data__;return es?t[n]!==Y:yl.call(t,n)}function rr(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=es&&t===Y?rn:t,this}function er(n){
+var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function ur(){this.__data__=[],this.size=0}function ir(n){var t=this.__data__,r=Er(t,n);return!(r<0)&&(r==t.length-1?t.pop():Sl.call(t,r,1),--this.size,!0)}function or(n){var t=this.__data__,r=Er(t,n);return r<0?Y:t[r][1]}function fr(n){return Er(this.__data__,n)>-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
+var e=n[t];this.set(e[0],e[1])}}function lr(){this.size=0,this.__data__={hash:new Yt,map:new(Xl||er),string:new Yt}}function sr(n){var t=wi(this,n).delete(n);return this.size-=t?1:0,t}function hr(n){return wi(this,n).get(n)}function pr(n){return wi(this,n).has(n)}function _r(n,t){var r=wi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function vr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new ar;++t<r;)this.add(n[t])}function gr(n){return this.__data__.set(n,rn),this}function yr(n){
+return this.__data__.has(n)}function dr(n){this.size=(this.__data__=new er(n)).size}function br(){this.__data__=new er,this.size=0}function wr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function mr(n){return this.__data__.get(n)}function xr(n){return this.__data__.has(n)}function jr(n,t){var r=this.__data__;if(r instanceof er){var e=r.__data__;if(!Xl||e.length<X-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ar(e)}return r.set(n,t),this.size=r.size,this}function Ar(n,t){
+var r=yh(n),e=!r&&gh(n),u=!r&&!e&&bh(n),i=!r&&!e&&!u&&Ah(n),o=r||e||u||i,f=o?O(n.length,ll):[],c=f.length;for(var a in n)!t&&!yl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Wi(a,c))||f.push(a);return f}function kr(n){var t=n.length;return t?n[Xe(0,t-1)]:Y}function Or(n,t){return Yi(Uu(n),$r(t,0,n.length))}function Ir(n){return Yi(Uu(n))}function Rr(n,t,r){(r===Y||Kf(n[t],r))&&(r!==Y||t in n)||Cr(n,t,r)}function zr(n,t,r){var e=n[t];
+yl.call(n,t)&&Kf(e,r)&&(r!==Y||t in n)||Cr(n,t,r)}function Er(n,t){for(var r=n.length;r--;)if(Kf(n[r][0],t))return r;return-1}function Sr(n,t,r,e){return vs(n,function(n,u,i){t(e,n,r(n),i)}),e}function Wr(n,t){return n&&Bu(t,Fc(t),n)}function Lr(n,t){return n&&Bu(t,Nc(t),n)}function Cr(n,t,r){"__proto__"==t&&Ul?Ul(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=el(e),i=null==n;++r<e;)u[r]=i?Y:$c(n,t[r]);return u}function $r(n,t,r){return n===n&&(r!==Y&&(n=n<=r?n:r),
+t!==Y&&(n=n>=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){
+f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
+if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Gr(n,t){var r=!0;return vs(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===Y?o===o&&!yc(o):r(o,f)))var f=o,c=i}return c}function Qr(n,t,r,e){var u=n.length;for(r=jc(r),r<0&&(r=-r>u?0:u+r),
+e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r<e;)n[r++]=t;return n}function ne(n,t){var r=[];return vs(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function te(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Si),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Qi(t[r++])];
+return r&&r==e?n:Y}function ye(n,t,r){var e=t(n);return yh(n)?e:a(e,r(n))}function de(n){return null==n?n===Y?tt:Vn:Cl&&Cl in cl(n)?ji(n):qi(n)}function be(n,t){return n>t}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n<Kl(t,r)}function je(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=el(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,R(t))),s=Vl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new vr(a&&p):Y}p=n[0];
+var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?E(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?E(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Ae(n,t,r,e){return ee(n,function(n,u,i){t(e,r(n),u,i)}),e}function ke(t,r,e){r=ju(r,t),t=Ki(t,r);var u=null==t?t:t[Qi(mo(r))];return null==u?Y:n(u,t,e)}function Oe(n){return oc(n)&&de(n)==Bn}function Ie(n){return oc(n)&&de(n)==ut}function Re(n){return oc(n)&&de(n)==Mn}function ze(n,t,r,e,u){
+return n===t||(null==n||null==t||!oc(n)&&!oc(t)?n!==n&&t!==t:Ee(n,t,r,e,ze,u))}function Ee(n,t,r,e,u,i){var o=yh(n),f=yh(t),c=o?Tn:Is(n),a=f?Tn:Is(t);c=c==Bn?Gn:c,a=a==Bn?Gn:a;var l=c==Gn,s=a==Gn,h=c==a;if(h&&bh(n)){if(!bh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new dr),o||Ah(n)?si(n,t,r,e,u,i):hi(n,t,c,r,e,u,i);if(!(r&an)){var p=l&&yl.call(n,"__wrapped__"),_=s&&yl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new dr),u(v,g,r,e,i)}}return!!h&&(i||(i=new dr),pi(n,t,r,e,u,i));
+}function Se(n){return oc(n)&&Is(n)==Zn}function We(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=cl(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===Y&&!(c in n))return!1}else{var s=new dr;if(e)var h=e(a,l,c,n,t,s);if(!(h===Y?ze(l,a,an|ln,e,s):h))return!1}}return!0}function Le(n){return!(!ic(n)||Ti(n))&&(rc(n)?jl:Nt).test(Xi(n))}function Ce(n){return oc(n)&&de(n)==Yn}function Ue(n){return oc(n)&&Is(n)==Qn;
+}function Be(n){return oc(n)&&uc(n.length)&&!!Pr[de(n)]}function Te(n){return"function"==typeof n?n:null==n?Sa:"object"==typeof n?yh(n)?Pe(n[0],n[1]):Ne(n):Da(n)}function $e(n){if(!$i(n))return Zl(n);var t=[];for(var r in cl(n))yl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function De(n){if(!ic(n))return Pi(n);var t=$i(n),r=[];for(var e in n)("constructor"!=e||!t&&yl.call(n,e))&&r.push(e);return r}function Me(n,t){return n<t}function Fe(n,t){var r=-1,e=Vf(n)?el(n.length):[];return vs(n,function(n,u,i){
+e[++r]=t(n,u,i)}),e}function Ne(n){var t=mi(n);return 1==t.length&&t[0][2]?Mi(t[0][0],t[0][1]):function(r){return r===n||We(r,n,t)}}function Pe(n,t){return Ci(n)&&Di(t)?Mi(Qi(n),t):function(r){var e=$c(r,n);return e===Y&&e===t?Mc(r,n):ze(t,e,an|ln)}}function qe(n,t,r,e,u){n!==t&&ys(t,function(i,o){if(u||(u=new dr),ic(i))Ze(n,t,o,r,qe,e,u);else{var f=e?e(Gi(n,o),i,o+"",n,t,u):Y;f===Y&&(f=i),Rr(n,o,f)}},Nc)}function Ze(n,t,r,e,u,i,o){var f=Gi(n,r),c=Gi(t,r),a=o.get(c);if(a)return Rr(n,r,a),Y;var l=i?i(f,c,r+"",n,t,o):Y,s=l===Y;
+if(s){var h=yh(c),p=!h&&bh(c),_=!h&&!p&&Ah(c);l=c,h||p||_?yh(f)?l=f:Gf(f)?l=Uu(f):p?(s=!1,l=ku(c,!0)):_?(s=!1,l=Eu(c,!0)):l=[]:_c(c)||gh(c)?(l=f,gh(f)?l=Oc(f):ic(f)&&!rc(f)||(l=Ri(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Rr(n,r,l)}function Ke(n,t){var r=n.length;if(r)return t+=t<0?r:0,Wi(t,r)?n[t]:Y}function Ve(n,t,r){t=t.length?c(t,function(n){return yh(n)?function(t){return ve(t,1===n.length?n[0]:n)}:n}):[Sa];var e=-1;return t=c(t,R(bi())),A(Fe(n,function(n,r,u){return{criteria:c(t,function(t){
+return t(n)}),index:++e,value:n}}),function(n,t){return Wu(n,t,r)})}function Ge(n,t){return He(n,t,function(t,r){return Mc(n,r)})}function He(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=ve(n,o);r(f,o)&&iu(i,ju(o,n),f)}return i}function Je(n){return function(t){return ve(t,n)}}function Ye(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Uu(t)),r&&(f=c(n,R(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){
+var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n);
+for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Qi(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):Y,a===Y&&(a=ic(l)?l:Wi(t[u+1])?[]:{})}zr(f,c,a),f=f[c]}return n}function ou(n){return Yi(na(n))}function fu(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e<u;)i[e]=n[e+t];return i}function cu(n,t){var r;return vs(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function au(n,t,r){
+var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Cn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return lu(n,t,Sa,r)}function lu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=yc(t),a=t===Y;u<i;){var l=Ml((u+i)/2),s=r(n[l]),h=s!==Y,p=null===s,_=s===s,v=yc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Vl(i,Ln)}function su(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
+var o=n[r],f=t?t(o):o;if(!r||!Kf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function hu(n){return"number"==typeof n?n:yc(n)?Sn:+n}function pu(n){if("string"==typeof n)return n;if(yh(n))return c(n,pu)+"";if(yc(n))return ps?ps.call(n):"";var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function _u(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
+t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function vu(n,t){return t=ju(t,n),n=Ki(n,t),null==n||delete n[Qi(mo(t))]}function gu(n,t,r,e){return iu(n,t,r(ve(n,t)),e)}function yu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?fu(n,e?0:i,e?i+1:u):fu(n,e?i+1:0,e?u:i)}function du(n,t){var r=n;return r instanceof Bt&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function bu(n,t,r){var e=n.length;if(e<2)return e?_u(n[0]):[];
+for(var u=-1,i=el(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Vr(i[u]||o,n[f],t,r));return _u(te(i,1),t,r)}function wu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:Y)}return o}function mu(n){return Gf(n)?n:[]}function xu(n){return"function"==typeof n?n:Sa}function ju(n,t){return yh(n)?n:Ci(n,t)?[n]:Ws(Rc(n))}function Au(n,t,r){var e=n.length;return r=r===Y?e:r,!t&&r>=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r);
+return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t);
+if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Wu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Su(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
+}function Cu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Kl(i-f,0),s=el(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Uu(n,t){var r=-1,e=n.length;for(t||(t=el(e));++r<e;)t[r]=n[r];return t}function Bu(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):Y;c===Y&&(c=n[f]),u?Cr(r,f,c):zr(r,f,c)}return r}function Tu(n,t){return Bu(n,ks(n),t)}function $u(n,t){return Bu(n,Os(n),t);
+}function Du(n,r){return function(e,u){var i=yh(e)?t:Sr,o=r?r():{};return i(e,n,bi(u,2),o)}}function Mu(n){return ru(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Fu(n,t){return function(r,e){if(null==r)return r;if(!Vf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=cl(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function Nu(n){return function(t,r,e){
+for(var u=-1,i=cl(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Pu(n,t,r){function e(){return(this&&this!==Xr&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&sn,i=Ku(n);return e}function qu(n){return function(t){t=Rc(t);var r=B(t)?V(t):Y,e=r?r[0]:t.charAt(0),u=r?Au(r,1).join(""):t.slice(1);return e[n]()+u}}function Zu(n){return function(t){return l(Oa(oa(t).replace(Ur,"")),n,"")}}function Ku(n){return function(){var t=arguments;switch(t.length){
+case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=_s(n.prototype),e=n.apply(r,t);return ic(e)?e:r}}function Vu(t,r,e){function u(){for(var o=arguments.length,f=el(o),c=o,a=di(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:F(f,a);
+return o-=l.length,o<e?ui(t,r,Ju,u.placeholder,Y,f,l,Y,Y,e-o):n(this&&this!==Xr&&this instanceof u?i:t,this,f)}var i=Ku(t);return u}function Gu(n){return function(t,r,e){var u=cl(t);if(!Vf(t)){var i=bi(r,3);t=Fc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e<r;){
+i=t[e];var f=yi(i),c="wrapper"==f?As(i):Y;o=c&&Bi(c[0])&&c[1]==(dn|_n|gn|bn)&&!c[4].length&&1==c[9]?o[yi(c[0])].apply(o,c[3]):1==i.length&&Bi(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&yh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Ju(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=el(y),b=y;b--;)d[b]=arguments[b];if(_)var w=di(l),m=L(d,w);if(e&&(d=Lu(d,e,u,_)),i&&(d=Cu(d,i,o,_)),
+y-=m,_&&y<a){return ui(n,t,Ju,l.placeholder,r,d,F(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Vi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==Xr&&this instanceof l&&(j=g||Ku(j)),j.apply(x,d)}var s=t&dn,h=t&sn,p=t&hn,_=t&(_n|vn),v=t&wn,g=p?Y:Ku(n);return l}function Yu(n,t){return function(r,e){return Ae(r,n,t(e),{})}}function Qu(n,t){return function(r,e){var u;if(r===Y&&e===Y)return t;if(r!==Y&&(u=r),e!==Y){if(u===Y)return e;"string"==typeof r||"string"==typeof e?(r=pu(r),
+e=pu(e)):(r=hu(r),e=hu(e)),u=n(r,e)}return u}}function Xu(t){return _i(function(r){return r=c(r,R(bi())),ru(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ni(n,t){t=t===Y?" ":pu(t);var r=t.length;if(r<2)return r?tu(t,n):t;var e=tu(t,Dl(n/K(t)));return B(t)?Au(V(e),0,n).join(""):e.slice(0,n)}function ti(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=el(l+c),h=this&&this!==Xr&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
+return n(h,o?e:this,s)}var o=r&sn,f=Ku(t);return i}function ri(n){return function(t,r,e){return e&&"number"!=typeof e&&Li(t,r,e)&&(r=e=Y),t=xc(t),r===Y?(r=t,t=0):r=xc(r),e=e===Y?t<r?1:-1:xc(e),nu(t,r,e,n)}}function ei(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=kc(t),r=kc(r)),n(t,r)}}function ui(n,t,r,e,u,i,o,f,c,a){var l=t&_n,s=l?o:Y,h=l?Y:o,p=l?i:Y,_=l?Y:i;t|=l?gn:yn,t&=~(l?yn:gn),t&pn||(t&=~(sn|hn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(Y,v);return Bi(n)&&zs(g,v),g.placeholder=e,
+Hi(g,n,t)}function ii(n){var t=fl[n];return function(n,r){if(n=kc(n),r=null==r?0:Vl(jc(r),292),r&&Pl(n)){var e=(Rc(n)+"e").split("e");return e=(Rc(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oi(n){return function(t){var r=Is(t);return r==Zn?D(t):r==Qn?P(t):I(t,n(t))}}function fi(n,t,r,e,u,i,o,f){var c=t&hn;if(!c&&"function"!=typeof n)throw new sl(tn);var a=e?e.length:0;if(a||(t&=~(gn|yn),e=u=Y),o=o===Y?o:Kl(jc(o),0),f=f===Y?f:jc(f),a-=u?u.length:0,t&yn){var l=e,s=u;
+e=u=Y}var h=c?Y:As(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&Ni(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===Y?c?0:n.length:Kl(p[9]-a,0),!f&&t&(_n|vn)&&(t&=~(_n|vn)),t&&t!=sn)_=t==_n||t==vn?Vu(n,t,f):t!=gn&&t!=(sn|gn)||u.length?Ju.apply(Y,p):ti(n,t,r,e);else var _=Pu(n,t,r);return Hi((h?bs:zs)(_,p),n,t)}function ci(n,t,r,e){return n===Y||Kf(n,_l[r])&&!yl.call(e,r)?t:n}function ai(n,t,r,e,u,i){return ic(n)&&ic(t)&&(i.set(t,n),qe(n,t,Y,ai,i),i.delete(t)),n}function li(n){return _c(n)?Y:n}function si(n,t,r,e,u,i){
+var o=r&an,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==Y){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!E(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function hi(n,t,r,e,u,i,o){switch(r){case it:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
+n=n.buffer,t=t.buffer;case ut:return!(n.byteLength!=t.byteLength||!i(new Ol(n),new Ol(t)));case Dn:case Mn:case Kn:return Kf(+n,+t);case Nn:return n.name==t.name&&n.message==t.message;case Yn:case Xn:return n==t+"";case Zn:var f=D;case Qn:var c=e&an;if(f||(f=N),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=ln,o.set(n,t);var l=si(f(n),f(t),e,u,i,o);return o.delete(n),l;case nt:if(hs)return hs.call(n)==hs.call(t)}return!1}function pi(n,t,r,e,u,i){var o=r&an,f=vi(n),c=f.length;if(c!=vi(t).length&&!o)return!1;
+for(var a=c;a--;){var l=f[a];if(!(o?l in t:yl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===Y?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
+i.delete(t),p}function _i(n){return Ss(Zi(n,Y,ho),n+"")}function vi(n){return ye(n,Fc,ks)}function gi(n){return ye(n,Nc,Os)}function yi(n){for(var t=n.name+"",r=is[t],e=yl.call(is,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function di(n){return(yl.call(q,"placeholder")?q:n).placeholder}function bi(){var n=q.iteratee||Wa;return n=n===Wa?Te:n,arguments.length?n(arguments[0],arguments[1]):n}function wi(n,t){var r=n.__data__;return Ui(t)?r["string"==typeof t?"string":"hash"]:r.map;
+}function mi(n){for(var t=Fc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Di(u)]}return t}function xi(n,t){var r=U(n,t);return Le(r)?r:Y}function ji(n){var t=yl.call(n,Cl),r=n[Cl];try{n[Cl]=Y;var e=!0}catch(n){}var u=wl.call(n);return e&&(t?n[Cl]=r:delete n[Cl]),u}function Ai(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Vl(t,n+o);break;case"takeRight":n=Kl(n,t-o)}}return{start:n,end:t}}function ki(n){var t=n.match(Ct);
+return t?t[1].split(Ut):[]}function Oi(n,t,r){t=ju(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=Qi(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&uc(u)&&Wi(o,u)&&(yh(n)||gh(n)))}function Ii(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&yl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ri(n){return"function"!=typeof n.constructor||$i(n)?{}:_s(Rl(n))}function zi(n,t,r){var e=n.constructor;switch(t){case ut:return Ou(n);
+case Dn:case Mn:return new e(+n);case it:return Iu(n,r);case ot:case ft:case ct:case at:case lt:case st:case ht:case pt:case _t:return Eu(n,r);case Zn:return new e;case Kn:case Xn:return new e(n);case Yn:return Ru(n);case Qn:return new e;case nt:return zu(n)}}function Ei(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n;
+return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n<t}function Li(n,t,r){if(!ic(r))return!1;var e=typeof t;return!!("number"==e?Vf(r)&&Wi(t,r.length):"string"==e&&t in r)&&Kf(r[t],n)}function Ci(n,t){if(yh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!yc(n))||(Ot.test(n)||!kt.test(n)||null!=t&&n in cl(t))}function Ui(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function Bi(n){
+var t=yi(n),r=q[t];if("function"!=typeof r||!(t in Bt.prototype))return!1;if(n===r)return!0;var e=As(r);return!!e&&n===e[0]}function Ti(n){return!!bl&&bl in n}function $i(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||_l)}function Di(n){return n===n&&!ic(n)}function Mi(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==Y||n in cl(r)))}}function Fi(n){var t=Wf(n,function(n){return r.size===en&&r.clear(),n}),r=t.cache;return t}function Ni(n,t){var r=n[1],e=t[1],u=r|e,i=u<(sn|hn|dn),o=e==dn&&r==_n||e==dn&&r==bn&&n[7].length<=t[8]||e==(dn|bn)&&t[7].length<=t[8]&&r==_n;
+if(!i&&!o)return n;e&sn&&(n[2]=t[2],u|=r&sn?0:pn);var f=t[3];if(f){var c=n[3];n[3]=c?Lu(c,f,t[4]):f,n[4]=c?F(n[3],un):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Cu(c,f,t[6]):f,n[6]=c?F(n[5],un):t[6]),f=t[7],f&&(n[7]=f),e&dn&&(n[8]=null==n[8]?t[8]:Vl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Pi(n){var t=[];if(null!=n)for(var r in cl(n))t.push(r);return t}function qi(n){return wl.call(n)}function Zi(t,r,e){return r=Kl(r===Y?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Kl(u.length-r,0),f=el(o);++i<o;)f[i]=u[r+i];
+i=-1;for(var c=el(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Ki(n,t){return t.length<2?n:ve(n,fu(t,0,-1))}function Vi(n,t){for(var r=n.length,e=Vl(t.length,r),u=Uu(n);e--;){var i=t[e];n[e]=Wi(i,r)?u[i]:Y}return n}function Gi(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Hi(n,t,r){var e=t+"";return Ss(n,Ei(e,no(ki(e),r)))}function Ji(n){var t=0,r=0;return function(){var e=Gl(),u=An-(e-r);if(r=e,u>0){if(++t>=jn)return arguments[0]}else t=0;
+return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r<t;){var i=Xe(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function Qi(n){if("string"==typeof n||yc(n))return n;var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function Xi(n){if(null!=n){try{return gl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function no(n,t){return r(Un,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function to(n){if(n instanceof Bt)return n.clone();var t=new H(n.__wrapped__,n.__chain__);
+return t.__actions__=Uu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function ro(n,t,r){t=(r?Li(n,t,r):t===Y)?1:Kl(jc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=el(Dl(e/t));u<e;)o[i++]=fu(n,u,u+=t);return o}function eo(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function uo(){var n=arguments.length;if(!n)return[];for(var t=el(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(yh(r)?Uu(r):[r],te(t,1));
+}function io(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),fu(n,t<0?0:t,e)):[]}function oo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,0,t<0?0:t)):[]}function fo(n,t){return n&&n.length?yu(n,bi(t,3),!0,!0):[]}function co(n,t){return n&&n.length?yu(n,bi(t,3),!0):[]}function ao(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Li(n,t,r)&&(r=0,e=u),Qr(n,t,r,e)):[]}function lo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);
+return u<0&&(u=Kl(e+u,0)),g(n,bi(t,3),u)}function so(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==Y&&(u=jc(r),u=r<0?Kl(e+u,0):Vl(u,e-1)),g(n,bi(t,3),u,!0)}function ho(n){return(null==n?0:n.length)?te(n,1):[]}function po(n){return(null==n?0:n.length)?te(n,Rn):[]}function _o(n,t){return(null==n?0:n.length)?(t=t===Y?1:jc(t),te(n,t)):[]}function vo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function go(n){return n&&n.length?n[0]:Y}function yo(n,t,r){
+var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);return u<0&&(u=Kl(e+u,0)),y(n,t,u)}function bo(n){return(null==n?0:n.length)?fu(n,0,-1):[]}function wo(n,t){return null==n?"":ql.call(n,t)}function mo(n){var t=null==n?0:n.length;return t?n[t-1]:Y}function xo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==Y&&(u=jc(r),u=u<0?Kl(e+u,0):Vl(u,e-1)),t===t?Z(n,t,u):g(n,b,u,!0)}function jo(n,t){return n&&n.length?Ke(n,jc(t)):Y}function Ao(n,t){return n&&n.length&&t&&t.length?Ye(n,t):n;
+}function ko(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,bi(r,2)):n}function Oo(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,Y,r):n}function Io(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=bi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return Qe(n,u),r}function Ro(n){return null==n?n:Yl.call(n)}function zo(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Li(n,t,r)?(t=0,r=e):(t=null==t?0:jc(t),r=r===Y?e:jc(r)),fu(n,t,r)):[]}function Eo(n,t){
+return au(n,t)}function So(n,t,r){return lu(n,t,bi(r,2))}function Wo(n,t){var r=null==n?0:n.length;if(r){var e=au(n,t);if(e<r&&Kf(n[e],t))return e}return-1}function Lo(n,t){return au(n,t,!0)}function Co(n,t,r){return lu(n,t,bi(r,2),!0)}function Uo(n,t){if(null==n?0:n.length){var r=au(n,t,!0)-1;if(Kf(n[r],t))return r}return-1}function Bo(n){return n&&n.length?su(n):[]}function To(n,t){return n&&n.length?su(n,bi(t,2)):[]}function $o(n){var t=null==n?0:n.length;return t?fu(n,1,t):[]}function Do(n,t,r){
+return n&&n.length?(t=r||t===Y?1:jc(t),fu(n,0,t<0?0:t)):[]}function Mo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,t<0?0:t,e)):[]}function Fo(n,t){return n&&n.length?yu(n,bi(t,3),!1,!0):[]}function No(n,t){return n&&n.length?yu(n,bi(t,3)):[]}function Po(n){return n&&n.length?_u(n):[]}function qo(n,t){return n&&n.length?_u(n,bi(t,2)):[]}function Zo(n,t){return t="function"==typeof t?t:Y,n&&n.length?_u(n,Y,t):[]}function Ko(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
+if(Gf(n))return t=Kl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Vo(t,r){if(!t||!t.length)return[];var e=Ko(t);return null==r?e:c(e,function(t){return n(r,Y,t)})}function Go(n,t){return wu(n||[],t||[],zr)}function Ho(n,t){return wu(n||[],t||[],iu)}function Jo(n){var t=q(n);return t.__chain__=!0,t}function Yo(n,t){return t(n),n}function Qo(n,t){return t(n)}function Xo(){return Jo(this)}function nf(){return new H(this.value(),this.__chain__)}function tf(){this.__values__===Y&&(this.__values__=mc(this.value()));
+var n=this.__index__>=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro);
+}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)),
+gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),
+(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn);
+return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_;
+}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
+s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
+return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
+Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n);
+}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e;
+}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){
+return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){
+return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){
+var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n);
+return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me);
+}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++e<u;){var i=null==n?Y:n[Qi(t[e])];
+i===Y&&(e=u,i=r),n=rc(i)?i.call(n):i}return n}function Gc(n,t,r){return null==n?n:iu(n,t,r)}function Hc(n,t,r,e){return e="function"==typeof e?e:Y,null==n?n:iu(n,t,r,e)}function Jc(n,t,e){var u=yh(n),i=u||bh(n)||Ah(n);if(t=bi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:ic(n)&&rc(o)?_s(Rl(n)):{}}return(i?r:ee)(n,function(n,r,u){return t(e,n,r,u)}),e}function Yc(n,t){return null==n||vu(n,t)}function Qc(n,t,r){return null==n?n:gu(n,t,xu(r))}function Xc(n,t,r,e){return e="function"==typeof e?e:Y,
+null==n?n:gu(n,t,xu(r),e)}function na(n){return null==n?[]:z(n,Fc(n))}function ta(n){return null==n?[]:z(n,Nc(n))}function ra(n,t,r){return r===Y&&(r=t,t=Y),r!==Y&&(r=kc(r),r=r===r?r:0),t!==Y&&(t=kc(t),t=t===t?t:0),$r(kc(n),t,r)}function ea(n,t,r){return t=xc(t),r===Y?(r=t,t=0):r=xc(r),n=kc(n),xe(n,t,r)}function ua(n,t,r){if(r&&"boolean"!=typeof r&&Li(n,t,r)&&(t=r=Y),r===Y&&("boolean"==typeof t?(r=t,t=Y):"boolean"==typeof n&&(r=n,n=Y)),n===Y&&t===Y?(n=0,t=1):(n=xc(n),t===Y?(t=n,n=0):t=xc(t)),n>t){
+var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t);
+var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?n+ni(t-e,r):n}function ha(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?ni(t-e,r)+n:n}function pa(n,t,r){return r||null==t?t=0:t&&(t=+t),Hl(Rc(n).replace(St,""),t||0)}function _a(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),tu(Rc(n),t)}function va(){var n=arguments,t=Rc(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function ga(n,t,r){return r&&"number"!=typeof r&&Li(n,t,r)&&(t=r=Y),
+(r=r===Y?Wn:r>>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n";
+n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
+var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n),
+n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")),
+u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e);
+}})}function Ra(n){return Mr(Dr(n,on))}function za(n){return function(){return n}}function Ea(n,t){return null==n||n!==n?t:n}function Sa(n){return n}function Wa(n){return Te("function"==typeof n?n:Dr(n,on))}function La(n){return Ne(Dr(n,on))}function Ca(n,t){return Pe(n,Dr(t,on))}function Ua(n,t,e){var u=Fc(t),i=se(t,u);null!=e||ic(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=se(t,Fc(t)));var o=!(ic(e)&&"chain"in e&&!e.chain),f=rc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){
+var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Uu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Ba(){return Xr._===this&&(Xr._=xl),this}function Ta(){}function $a(n){return n=jc(n),ru(function(t){return Ke(t,n)})}function Da(n){return Ci(n)?m(Qi(n)):Je(n)}function Ma(n){return function(t){return null==n?Y:ve(n,t)}}function Fa(){return[]}function Na(){return!1}function Pa(){return{};
+}function qa(){return""}function Za(){return!0}function Ka(n,t){if(n=jc(n),n<1||n>zn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r<n;)t(r);return u}function Va(n){return yh(n)?c(n,Qi):yc(n)?[n]:Uu(Ws(Rc(n)))}function Ga(n){var t=++dl;return Rc(n)+t}function Ha(n){return n&&n.length?Yr(n,Sa,be):Y}function Ja(n,t){return n&&n.length?Yr(n,bi(t,2),be):Y}function Ya(n){return w(n,Sa)}function Qa(n,t){return w(n,bi(t,2))}function Xa(n){return n&&n.length?Yr(n,Sa,Me):Y}function nl(n,t){
+return n&&n.length?Yr(n,bi(t,2),Me):Y}function tl(n){return n&&n.length?k(n,Sa):0}function rl(n,t){return n&&n.length?k(n,bi(t,2)):0}x=null==x?Xr:ge.defaults(Xr.Object(),x,ge.pick(Xr,Fr));var el=x.Array,ul=x.Date,il=x.Error,ol=x.Function,fl=x.Math,cl=x.Object,al=x.RegExp,ll=x.String,sl=x.TypeError,hl=el.prototype,pl=ol.prototype,_l=cl.prototype,vl=x["__core-js_shared__"],gl=pl.toString,yl=_l.hasOwnProperty,dl=0,bl=function(){var n=/[^.]+$/.exec(vl&&vl.keys&&vl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:"";
+}(),wl=_l.toString,ml=gl.call(cl),xl=Xr._,jl=al("^"+gl.call(yl).replace(Rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Al=re?x.Buffer:Y,kl=x.Symbol,Ol=x.Uint8Array,Il=Al?Al.allocUnsafe:Y,Rl=M(cl.getPrototypeOf,cl),zl=cl.create,El=_l.propertyIsEnumerable,Sl=hl.splice,Wl=kl?kl.isConcatSpreadable:Y,Ll=kl?kl.iterator:Y,Cl=kl?kl.toStringTag:Y,Ul=function(){try{var n=xi(cl,"defineProperty");return n({},"",{}),n}catch(n){}}(),Bl=x.clearTimeout!==Xr.clearTimeout&&x.clearTimeout,Tl=ul&&ul.now!==Xr.Date.now&&ul.now,$l=x.setTimeout!==Xr.setTimeout&&x.setTimeout,Dl=fl.ceil,Ml=fl.floor,Fl=cl.getOwnPropertySymbols,Nl=Al?Al.isBuffer:Y,Pl=x.isFinite,ql=hl.join,Zl=M(cl.keys,cl),Kl=fl.max,Vl=fl.min,Gl=ul.now,Hl=x.parseInt,Jl=fl.random,Yl=hl.reverse,Ql=xi(x,"DataView"),Xl=xi(x,"Map"),ns=xi(x,"Promise"),ts=xi(x,"Set"),rs=xi(x,"WeakMap"),es=xi(cl,"create"),us=rs&&new rs,is={},os=Xi(Ql),fs=Xi(Xl),cs=Xi(ns),as=Xi(ts),ls=Xi(rs),ss=kl?kl.prototype:Y,hs=ss?ss.valueOf:Y,ps=ss?ss.toString:Y,_s=function(){
+function n(){}return function(t){if(!ic(t))return{};if(zl)return zl(t);n.prototype=t;var r=new n;return n.prototype=Y,r}}();q.templateSettings={escape:xt,evaluate:jt,interpolate:At,variable:"",imports:{_:q}},q.prototype=G.prototype,q.prototype.constructor=q,H.prototype=_s(G.prototype),H.prototype.constructor=H,Bt.prototype=_s(G.prototype),Bt.prototype.constructor=Bt,Yt.prototype.clear=Qt,Yt.prototype.delete=Xt,Yt.prototype.get=nr,Yt.prototype.has=tr,Yt.prototype.set=rr,er.prototype.clear=ur,er.prototype.delete=ir,
+er.prototype.get=or,er.prototype.has=fr,er.prototype.set=cr,ar.prototype.clear=lr,ar.prototype.delete=sr,ar.prototype.get=hr,ar.prototype.has=pr,ar.prototype.set=_r,vr.prototype.add=vr.prototype.push=gr,vr.prototype.has=yr,dr.prototype.clear=br,dr.prototype.delete=wr,dr.prototype.get=mr,dr.prototype.has=xr,dr.prototype.set=jr;var vs=Fu(ee),gs=Fu(ue,!0),ys=Nu(),ds=Nu(!0),bs=us?function(n,t){return us.set(n,t),n}:Sa,ws=Ul?function(n,t){return Ul(n,"toString",{configurable:!0,enumerable:!1,value:za(t),
+writable:!0})}:Sa,ms=ru,xs=Bl||function(n){return Xr.clearTimeout(n)},js=ts&&1/N(new ts([,-0]))[1]==Rn?function(n){return new ts(n)}:Ta,As=us?function(n){return us.get(n)}:Ta,ks=Fl?function(n){return null==n?[]:(n=cl(n),i(Fl(n),function(t){return El.call(n,t)}))}:Fa,Os=Fl?function(n){for(var t=[];n;)a(t,ks(n)),n=Rl(n);return t}:Fa,Is=de;(Ql&&Is(new Ql(new ArrayBuffer(1)))!=it||Xl&&Is(new Xl)!=Zn||ns&&Is(ns.resolve())!=Hn||ts&&Is(new ts)!=Qn||rs&&Is(new rs)!=rt)&&(Is=function(n){var t=de(n),r=t==Gn?n.constructor:Y,e=r?Xi(r):"";
+if(e)switch(e){case os:return it;case fs:return Zn;case cs:return Hn;case as:return Qn;case ls:return rt}return t});var Rs=vl?rc:Na,zs=Ji(bs),Es=$l||function(n,t){return Xr.setTimeout(n,t)},Ss=Ji(ws),Ws=Fi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(It,function(n,r,e,u){t.push(e?u.replace(Tt,"$1"):r||n)}),t}),Ls=ru(function(n,t){return Gf(n)?Vr(n,te(t,1,Gf,!0)):[]}),Cs=ru(function(n,t){var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),bi(r,2)):[]}),Us=ru(function(n,t){
+var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),Y,r):[]}),Bs=ru(function(n){var t=c(n,mu);return t.length&&t[0]===n[0]?je(t):[]}),Ts=ru(function(n){var t=mo(n),r=c(n,mu);return t===mo(r)?t=Y:r.pop(),r.length&&r[0]===n[0]?je(r,bi(t,2)):[]}),$s=ru(function(n){var t=mo(n),r=c(n,mu);return t="function"==typeof t?t:Y,t&&r.pop(),r.length&&r[0]===n[0]?je(r,Y,t):[]}),Ds=ru(Ao),Ms=_i(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return Qe(n,c(t,function(n){return Wi(n,r)?+n:n}).sort(Su)),e}),Fs=ru(function(n){
+return _u(te(n,1,Gf,!0))}),Ns=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),_u(te(n,1,Gf,!0),bi(t,2))}),Ps=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,_u(te(n,1,Gf,!0),Y,t)}),qs=ru(function(n,t){return Gf(n)?Vr(n,t):[]}),Zs=ru(function(n){return bu(i(n,Gf))}),Ks=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),bu(i(n,Gf),bi(t,2))}),Vs=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,bu(i(n,Gf),Y,t)}),Gs=ru(Ko),Hs=ru(function(n){var t=n.length,r=t>1?n[t-1]:Y;return r="function"==typeof r?(n.pop(),
+r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[];
+return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn;
+}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),sh=ru(function(n,t){return fi(n,gn,Y,t,F(t,di(sh)))}),hh=ru(function(n,t){return fi(n,yn,Y,t,F(t,di(hh)))}),ph=_i(function(n,t){return fi(n,bn,Y,Y,Y,t)}),_h=ei(be),vh=ei(function(n,t){
+return n>=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e);
+}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=Nc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===Y||Kf(l,_l[a])&&!yl.call(n,a))&&(n[a]=i[a])}return n}),Lh=ru(function(t){return t.push(Y,ai),n($h,Y,t)}),Ch=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),n[t]=r},za(Sa)),Uh=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),yl.call(n,t)?n[t].push(r):n[t]=[r]},bi),Bh=ru(ke),Th=Mu(function(n,t,r){
+qe(n,t,r)}),$h=Mu(function(n,t,r,e){qe(n,t,r,e)}),Dh=_i(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ju(t,n),e||(e=t.length>1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){
+return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){
+return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh,
+q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc,
+q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf,
+q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta,
+q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so,
+q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh,
+q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa,
+q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc,
+q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){
+r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
+var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){
+return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
+u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
+var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js,
+q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lowerCase.js b/tools/node_modules/@babel/core/node_modules/lodash/lowerCase.js
index 66c1f499f41..66c1f499f41 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lowerCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lowerCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lowerFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/lowerFirst.js
index c08f082b139..c08f082b139 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lowerFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lowerFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lt.js b/tools/node_modules/@babel/core/node_modules/lodash/lt.js
index 813866e4a0d..813866e4a0d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lte.js b/tools/node_modules/@babel/core/node_modules/lodash/lte.js
index 382f6610d29..382f6610d29 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lte.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/lte.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/map.js b/tools/node_modules/@babel/core/node_modules/lodash/map.js
index 22efee7b356..22efee7b356 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/map.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/map.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mapKeys.js b/tools/node_modules/@babel/core/node_modules/lodash/mapKeys.js
index 3b68797db0b..3b68797db0b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/mapKeys.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/mapKeys.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mapValues.js b/tools/node_modules/@babel/core/node_modules/lodash/mapValues.js
index 4ec082514ef..4ec082514ef 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/mapValues.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/mapValues.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/matches.js b/tools/node_modules/@babel/core/node_modules/lodash/matches.js
new file mode 100644
index 00000000000..e10b35198b8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/matches.js
@@ -0,0 +1,46 @@
+var baseClone = require('./_baseClone'),
+ baseMatches = require('./_baseMatches');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`.
+ *
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
+ * partially applied.
+ *
+ * Partial comparisons will match empty array and empty object `source`
+ * values against any array or object value, respectively. See `_.isEqual`
+ * for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matches(source) {
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
+}
+
+module.exports = matches;
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js b/tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js
new file mode 100644
index 00000000000..e6f1a882d61
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/matchesProperty.js
@@ -0,0 +1,44 @@
+var baseClone = require('./_baseClone'),
+ baseMatchesProperty = require('./_baseMatchesProperty');
+
+/** Used to compose bitmasks for cloning. */
+var CLONE_DEEP_FLAG = 1;
+
+/**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** Partial comparisons will match empty array and empty object
+ * `srcValue` values against any array or object value, respectively. See
+ * `_.isEqual` for a list of supported value comparisons.
+ *
+ * **Note:** Multiple values can be checked by combining several matchers
+ * using `_.overSome`
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': 1, 'b': 2, 'c': 3 },
+ * { 'a': 4, 'b': 5, 'c': 6 }
+ * ];
+ *
+ * _.find(objects, _.matchesProperty('a', 4));
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
+ *
+ * // Checking for several possible values
+ * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
+ * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
+ */
+function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
+}
+
+module.exports = matchesProperty;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/math.js b/tools/node_modules/@babel/core/node_modules/lodash/math.js
index 596688748e0..596688748e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/math.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/math.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/max.js b/tools/node_modules/@babel/core/node_modules/lodash/max.js
index 142ad8cfb1b..142ad8cfb1b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/max.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/max.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/maxBy.js b/tools/node_modules/@babel/core/node_modules/lodash/maxBy.js
index 2eba9c06ff3..2eba9c06ff3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/maxBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/maxBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mean.js b/tools/node_modules/@babel/core/node_modules/lodash/mean.js
index e3ffff67c79..e3ffff67c79 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/mean.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/mean.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/meanBy.js b/tools/node_modules/@babel/core/node_modules/lodash/meanBy.js
index b0316716fe4..b0316716fe4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/meanBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/meanBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/memoize.js b/tools/node_modules/@babel/core/node_modules/lodash/memoize.js
index d6035af1721..d6035af1721 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/memoize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/memoize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/merge.js b/tools/node_modules/@babel/core/node_modules/lodash/merge.js
index 4bbc3a181ef..4bbc3a181ef 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/merge.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/merge.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mergeWith.js b/tools/node_modules/@babel/core/node_modules/lodash/mergeWith.js
index 1b43a2c4a30..1b43a2c4a30 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/mergeWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/mergeWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/method.js b/tools/node_modules/@babel/core/node_modules/lodash/method.js
index 23ec32d5570..23ec32d5570 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/method.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/method.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/methodOf.js b/tools/node_modules/@babel/core/node_modules/lodash/methodOf.js
index df59b57f318..df59b57f318 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/methodOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/methodOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/min.js b/tools/node_modules/@babel/core/node_modules/lodash/min.js
index 428f571d741..428f571d741 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/min.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/min.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/minBy.js b/tools/node_modules/@babel/core/node_modules/lodash/minBy.js
index b2697e49a44..b2697e49a44 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/minBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/minBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/mixin.js b/tools/node_modules/@babel/core/node_modules/lodash/mixin.js
index 6dc96746718..6dc96746718 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/mixin.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/mixin.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/multiply.js b/tools/node_modules/@babel/core/node_modules/lodash/multiply.js
index d7876e1391a..d7876e1391a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/multiply.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/multiply.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/negate.js b/tools/node_modules/@babel/core/node_modules/lodash/negate.js
index 5a65cd1fb2f..5a65cd1fb2f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/negate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/negate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/next.js b/tools/node_modules/@babel/core/node_modules/lodash/next.js
index 55f949c8cd5..55f949c8cd5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/next.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/next.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/noop.js b/tools/node_modules/@babel/core/node_modules/lodash/noop.js
index 3c0862ee62f..3c0862ee62f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/noop.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/noop.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/now.js b/tools/node_modules/@babel/core/node_modules/lodash/now.js
index 44a05623f23..44a05623f23 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/now.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/now.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/nth.js b/tools/node_modules/@babel/core/node_modules/lodash/nth.js
index 8a344dee560..8a344dee560 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/nth.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/nth.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/nthArg.js b/tools/node_modules/@babel/core/node_modules/lodash/nthArg.js
index 09406ddf49a..09406ddf49a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/nthArg.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/nthArg.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/number.js b/tools/node_modules/@babel/core/node_modules/lodash/number.js
index c3b01008a67..c3b01008a67 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/number.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/number.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/object.js b/tools/node_modules/@babel/core/node_modules/lodash/object.js
index f046b05f758..f046b05f758 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/object.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/object.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/omit.js b/tools/node_modules/@babel/core/node_modules/lodash/omit.js
index 97f5f546f81..97f5f546f81 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/omit.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/omit.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/omitBy.js b/tools/node_modules/@babel/core/node_modules/lodash/omitBy.js
index a064036ebaf..a064036ebaf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/omitBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/omitBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/once.js b/tools/node_modules/@babel/core/node_modules/lodash/once.js
index 0706fc3cbb6..0706fc3cbb6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/once.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/once.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/orderBy.js b/tools/node_modules/@babel/core/node_modules/lodash/orderBy.js
index 7195c8c737f..7195c8c737f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/orderBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/orderBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/over.js b/tools/node_modules/@babel/core/node_modules/lodash/over.js
index bea2f91f8bb..bea2f91f8bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/over.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/over.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overArgs.js b/tools/node_modules/@babel/core/node_modules/lodash/overArgs.js
index f0067dbd32f..f0067dbd32f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/overArgs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/overArgs.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js b/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js
new file mode 100644
index 00000000000..fb19d13ed98
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/overEvery.js
@@ -0,0 +1,34 @@
+var arrayEvery = require('./_arrayEvery'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+var overEvery = createOver(arrayEvery);
+
+module.exports = overEvery;
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/overSome.js b/tools/node_modules/@babel/core/node_modules/lodash/overSome.js
new file mode 100644
index 00000000000..414ab66b925
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/overSome.js
@@ -0,0 +1,37 @@
+var arraySome = require('./_arraySome'),
+ createOver = require('./_createOver');
+
+/**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * Following shorthands are possible for providing predicates.
+ * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
+ * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
+ * The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome([Boolean, isFinite]);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ *
+ * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
+ * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
+ */
+var overSome = createOver(arraySome);
+
+module.exports = overSome;
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/package.json b/tools/node_modules/@babel/core/node_modules/lodash/package.json
new file mode 100644
index 00000000000..2539c2434cb
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "lodash",
+ "version": "4.17.20",
+ "description": "Lodash modular utilities.",
+ "keywords": "modules, stdlib, util",
+ "homepage": "https://lodash.com/",
+ "repository": "lodash/lodash",
+ "icon": "https://lodash.com/icon.svg",
+ "license": "MIT",
+ "main": "lodash.js",
+ "author": "John-David Dalton <john.david.dalton@gmail.com>",
+ "contributors": [
+ "John-David Dalton <john.david.dalton@gmail.com>",
+ "Mathias Bynens <mathias@qiwi.be>"
+ ],
+ "scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pad.js b/tools/node_modules/@babel/core/node_modules/lodash/pad.js
index 77e1f1c1ab6..77e1f1c1ab6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pad.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pad.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/padEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/padEnd.js
index 224eb80e99e..224eb80e99e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/padEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/padEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/padStart.js b/tools/node_modules/@babel/core/node_modules/lodash/padStart.js
index f991866bf36..f991866bf36 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/padStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/padStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/parseInt.js b/tools/node_modules/@babel/core/node_modules/lodash/parseInt.js
index 82badf0341b..82badf0341b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/parseInt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/parseInt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partial.js b/tools/node_modules/@babel/core/node_modules/lodash/partial.js
index 05fe8d3c8ec..05fe8d3c8ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/partial.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/partial.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partialRight.js b/tools/node_modules/@babel/core/node_modules/lodash/partialRight.js
index eee031f6d0f..eee031f6d0f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/partialRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/partialRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/partition.js b/tools/node_modules/@babel/core/node_modules/lodash/partition.js
index 6b814a9f2d1..6b814a9f2d1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/partition.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/partition.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pick.js b/tools/node_modules/@babel/core/node_modules/lodash/pick.js
index 3160199f0c8..3160199f0c8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pick.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pick.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pickBy.js b/tools/node_modules/@babel/core/node_modules/lodash/pickBy.js
index ae7c271eacb..ae7c271eacb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pickBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pickBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/plant.js b/tools/node_modules/@babel/core/node_modules/lodash/plant.js
index 23776f3238b..23776f3238b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/plant.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/plant.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/property.js b/tools/node_modules/@babel/core/node_modules/lodash/property.js
index ca8202ff454..ca8202ff454 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/property.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/property.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/propertyOf.js b/tools/node_modules/@babel/core/node_modules/lodash/propertyOf.js
index 384044d3f0f..384044d3f0f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/propertyOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/propertyOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pull.js b/tools/node_modules/@babel/core/node_modules/lodash/pull.js
index a2efcb5e10f..a2efcb5e10f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pull.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pull.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAll.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAll.js
index f4605c212ef..f4605c212ef 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pullAll.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pullAll.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllBy.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAllBy.js
index 74025e8f0e1..74025e8f0e1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pullAllBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllWith.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAllWith.js
index 1d2fd9f941c..1d2fd9f941c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pullAllWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pullAllWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/pullAt.js b/tools/node_modules/@babel/core/node_modules/lodash/pullAt.js
index 6ed84e064dd..6ed84e064dd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/pullAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/pullAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/random.js b/tools/node_modules/@babel/core/node_modules/lodash/random.js
index 8067711c235..8067711c235 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/random.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/random.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/range.js b/tools/node_modules/@babel/core/node_modules/lodash/range.js
index fa63b091805..fa63b091805 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/range.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/range.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rangeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/rangeRight.js
index 271fafc9821..271fafc9821 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/rangeRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/rangeRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rearg.js b/tools/node_modules/@babel/core/node_modules/lodash/rearg.js
index a3e1970b8c3..a3e1970b8c3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/rearg.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/rearg.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reduce.js b/tools/node_modules/@babel/core/node_modules/lodash/reduce.js
index 5a1df4d041a..5a1df4d041a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/reduce.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/reduce.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reduceRight.js b/tools/node_modules/@babel/core/node_modules/lodash/reduceRight.js
index e06a7cb7b09..e06a7cb7b09 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/reduceRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/reduceRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reject.js b/tools/node_modules/@babel/core/node_modules/lodash/reject.js
index a13e5547407..a13e5547407 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/reject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/reject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/remove.js b/tools/node_modules/@babel/core/node_modules/lodash/remove.js
index 87b1898e35d..87b1898e35d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/remove.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/remove.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/repeat.js b/tools/node_modules/@babel/core/node_modules/lodash/repeat.js
index f4d8c69a055..f4d8c69a055 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/repeat.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/repeat.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/replace.js b/tools/node_modules/@babel/core/node_modules/lodash/replace.js
index 6e26ecd8273..6e26ecd8273 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/replace.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/replace.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/rest.js b/tools/node_modules/@babel/core/node_modules/lodash/rest.js
index eaaad00b7bb..eaaad00b7bb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/rest.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/rest.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/result.js b/tools/node_modules/@babel/core/node_modules/lodash/result.js
index eae12500b41..eae12500b41 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/result.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/result.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/reverse.js b/tools/node_modules/@babel/core/node_modules/lodash/reverse.js
index 21764afd665..21764afd665 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/reverse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/reverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/round.js b/tools/node_modules/@babel/core/node_modules/lodash/round.js
index fccc83101e7..fccc83101e7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/round.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/round.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sample.js b/tools/node_modules/@babel/core/node_modules/lodash/sample.js
index 39c356042a9..39c356042a9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sample.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sample.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sampleSize.js b/tools/node_modules/@babel/core/node_modules/lodash/sampleSize.js
index a3036867519..a3036867519 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sampleSize.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sampleSize.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/seq.js b/tools/node_modules/@babel/core/node_modules/lodash/seq.js
index 1570c2db7b3..1570c2db7b3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/seq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/seq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/set.js b/tools/node_modules/@babel/core/node_modules/lodash/set.js
index d6630027f12..d6630027f12 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/set.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/set.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/setWith.js b/tools/node_modules/@babel/core/node_modules/lodash/setWith.js
index fb3e0f65a7e..fb3e0f65a7e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/setWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/setWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/shuffle.js b/tools/node_modules/@babel/core/node_modules/lodash/shuffle.js
index 2b72da7cd6d..2b72da7cd6d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/shuffle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/shuffle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/size.js b/tools/node_modules/@babel/core/node_modules/lodash/size.js
index 3561fc1010d..3561fc1010d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/size.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/size.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/slice.js b/tools/node_modules/@babel/core/node_modules/lodash/slice.js
index f7324426a06..f7324426a06 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/slice.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/slice.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/snakeCase.js b/tools/node_modules/@babel/core/node_modules/lodash/snakeCase.js
index 27f2a767647..27f2a767647 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/snakeCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/snakeCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/some.js b/tools/node_modules/@babel/core/node_modules/lodash/some.js
index 9c1d08cc848..9c1d08cc848 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/some.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/some.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/sortBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortBy.js
new file mode 100644
index 00000000000..d756aba6c5e
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortBy.js
@@ -0,0 +1,48 @@
+var baseFlatten = require('./_baseFlatten'),
+ baseOrderBy = require('./_baseOrderBy'),
+ baseRest = require('./_baseRest'),
+ isIterateeCall = require('./_isIterateeCall');
+
+/**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 30 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, [function(o) { return o.user; }]);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
+ */
+var sortBy = baseRest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
+});
+
+module.exports = sortBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndex.js
index e763473ac4c..e763473ac4c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexBy.js
index 945f23cb0ac..945f23cb0ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexOf.js
index e2d3b7a3ddb..e2d3b7a3ddb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndex.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndex.js
index 9380cb9cbc6..9380cb9cbc6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndex.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndex.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexBy.js
index 9225eeb3634..9225eeb3634 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexOf.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexOf.js
index 18bc4c5d529..18bc4c5d529 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedLastIndexOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedLastIndexOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniq.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniq.js
index 866db311e4e..866db311e4e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniqBy.js
index 4f05ebe91b6..4f05ebe91b6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortedUniqBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sortedUniqBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/split.js b/tools/node_modules/@babel/core/node_modules/lodash/split.js
index 956b48a15aa..956b48a15aa 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/split.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/split.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/spread.js b/tools/node_modules/@babel/core/node_modules/lodash/spread.js
index 60a08e22e41..60a08e22e41 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/spread.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/spread.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/startCase.js b/tools/node_modules/@babel/core/node_modules/lodash/startCase.js
index a48f21ce9b3..a48f21ce9b3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/startCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/startCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/startsWith.js b/tools/node_modules/@babel/core/node_modules/lodash/startsWith.js
index 956c098a0cf..956c098a0cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/startsWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/startsWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/string.js b/tools/node_modules/@babel/core/node_modules/lodash/string.js
index 2c829c16a1b..2c829c16a1b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/string.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/string.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubArray.js b/tools/node_modules/@babel/core/node_modules/lodash/stubArray.js
index f460c15e323..f460c15e323 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/stubArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/stubArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubFalse.js b/tools/node_modules/@babel/core/node_modules/lodash/stubFalse.js
index 9b346fce50a..9b346fce50a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/stubFalse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/stubFalse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubObject.js b/tools/node_modules/@babel/core/node_modules/lodash/stubObject.js
index 1d190a1d062..1d190a1d062 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/stubObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/stubObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubString.js b/tools/node_modules/@babel/core/node_modules/lodash/stubString.js
index 2db0bed0734..2db0bed0734 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/stubString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/stubString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/stubTrue.js b/tools/node_modules/@babel/core/node_modules/lodash/stubTrue.js
index af3cc9edc7f..af3cc9edc7f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/stubTrue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/stubTrue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/subtract.js b/tools/node_modules/@babel/core/node_modules/lodash/subtract.js
index 67207785d9f..67207785d9f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/subtract.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/subtract.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sum.js b/tools/node_modules/@babel/core/node_modules/lodash/sum.js
index 3b07ee40e77..3b07ee40e77 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sum.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sum.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sumBy.js b/tools/node_modules/@babel/core/node_modules/lodash/sumBy.js
index 00e36d00ed6..00e36d00ed6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sumBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/sumBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/tail.js b/tools/node_modules/@babel/core/node_modules/lodash/tail.js
index 001c22d0fdf..001c22d0fdf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/tail.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/tail.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/take.js b/tools/node_modules/@babel/core/node_modules/lodash/take.js
index b7da712ffe5..b7da712ffe5 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/take.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/take.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeRight.js b/tools/node_modules/@babel/core/node_modules/lodash/takeRight.js
index 6c375060eb7..6c375060eb7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/takeRight.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/takeRight.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeRightWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/takeRightWhile.js
index 94ab783d798..94ab783d798 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/takeRightWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/takeRightWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/takeWhile.js b/tools/node_modules/@babel/core/node_modules/lodash/takeWhile.js
index e88f5910d3c..e88f5910d3c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/takeWhile.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/takeWhile.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/tap.js b/tools/node_modules/@babel/core/node_modules/lodash/tap.js
index d00728525ee..d00728525ee 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/tap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/tap.js
diff --git a/tools/node_modules/@babel/core/node_modules/lodash/template.js b/tools/node_modules/@babel/core/node_modules/lodash/template.js
new file mode 100644
index 00000000000..1556a099afe
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/lodash/template.js
@@ -0,0 +1,251 @@
+var assignInWith = require('./assignInWith'),
+ attempt = require('./attempt'),
+ baseValues = require('./_baseValues'),
+ customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
+ escapeStringChar = require('./_escapeStringChar'),
+ isError = require('./isError'),
+ isIterateeCall = require('./_isIterateeCall'),
+ keys = require('./keys'),
+ reInterpolate = require('./_reInterpolate'),
+ templateSettings = require('./templateSettings'),
+ toString = require('./toString');
+
+/** Used to match empty string literals in compiled template source. */
+var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+/**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
+ */
+var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+/** Used to ensure capturing order of template delimiters. */
+var reNoMatch = /($^)/;
+
+/** Used to match unescaped characters in compiled string literals. */
+var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b>&lt;script&gt;</b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
+ * // Disable support by replacing the "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = templateSettings.imports._.templateSettings || templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
+
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ // The sourceURL gets injected into the source that's eval-ed, so be careful
+ // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
+ // and escape the comment, thus injecting code that gets evaled.
+ var sourceURL = hasOwnProperty.call(options, 'sourceURL')
+ ? ('//# sourceURL=' +
+ (options.sourceURL + '').replace(/\s/g, ' ') +
+ '\n')
+ : '';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = hasOwnProperty.call(options, 'variable') && options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+}
+
+module.exports = template;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/templateSettings.js b/tools/node_modules/@babel/core/node_modules/lodash/templateSettings.js
index 5aa5924fabd..5aa5924fabd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/templateSettings.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/templateSettings.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/throttle.js b/tools/node_modules/@babel/core/node_modules/lodash/throttle.js
index e2bb806bc8a..e2bb806bc8a 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/throttle.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/throttle.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/thru.js b/tools/node_modules/@babel/core/node_modules/lodash/thru.js
index 91e132e52cf..91e132e52cf 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/thru.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/thru.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/times.js b/tools/node_modules/@babel/core/node_modules/lodash/times.js
index 266c90c6816..266c90c6816 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/times.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/times.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toArray.js b/tools/node_modules/@babel/core/node_modules/lodash/toArray.js
index 98095848e73..98095848e73 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toArray.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toArray.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toFinite.js b/tools/node_modules/@babel/core/node_modules/lodash/toFinite.js
index 3b5bba6b4ed..3b5bba6b4ed 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toFinite.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toFinite.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/toInteger.js
index c6aadf8f942..c6aadf8f942 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toIterator.js b/tools/node_modules/@babel/core/node_modules/lodash/toIterator.js
index beeed5d55c6..beeed5d55c6 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toIterator.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toIterator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toJSON.js b/tools/node_modules/@babel/core/node_modules/lodash/toJSON.js
index 5e751a2c32e..5e751a2c32e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toJSON.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toJSON.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toLength.js b/tools/node_modules/@babel/core/node_modules/lodash/toLength.js
index be8f2a74465..be8f2a74465 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toLength.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toLength.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toLower.js b/tools/node_modules/@babel/core/node_modules/lodash/toLower.js
index b4b7858eb03..b4b7858eb03 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toLower.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toLower.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toNumber.js b/tools/node_modules/@babel/core/node_modules/lodash/toNumber.js
index b0f72de302d..b0f72de302d 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toNumber.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toNumber.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPairs.js b/tools/node_modules/@babel/core/node_modules/lodash/toPairs.js
index c4f52ae00e0..c4f52ae00e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toPairs.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toPairs.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPairsIn.js b/tools/node_modules/@babel/core/node_modules/lodash/toPairsIn.js
index 32c562ca7cb..32c562ca7cb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toPairsIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toPairsIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPath.js b/tools/node_modules/@babel/core/node_modules/lodash/toPath.js
index d3e96eea980..d3e96eea980 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toPath.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toPath.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toPlainObject.js b/tools/node_modules/@babel/core/node_modules/lodash/toPlainObject.js
index 5de79b8b3cd..5de79b8b3cd 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toPlainObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toPlainObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toSafeInteger.js b/tools/node_modules/@babel/core/node_modules/lodash/toSafeInteger.js
index f564623d1f7..f564623d1f7 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toSafeInteger.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toSafeInteger.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toString.js b/tools/node_modules/@babel/core/node_modules/lodash/toString.js
index daaf681c914..daaf681c914 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toString.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toString.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/toUpper.js b/tools/node_modules/@babel/core/node_modules/lodash/toUpper.js
index b3648e8bf9c..b3648e8bf9c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/toUpper.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/toUpper.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/transform.js b/tools/node_modules/@babel/core/node_modules/lodash/transform.js
index d755a154898..d755a154898 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/transform.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/transform.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trim.js b/tools/node_modules/@babel/core/node_modules/lodash/trim.js
index 5e38c8ef6e9..5e38c8ef6e9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/trim.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/trim.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trimEnd.js b/tools/node_modules/@babel/core/node_modules/lodash/trimEnd.js
index 82c54a98675..82c54a98675 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/trimEnd.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/trimEnd.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/trimStart.js b/tools/node_modules/@babel/core/node_modules/lodash/trimStart.js
index 30f4f47a2df..30f4f47a2df 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/trimStart.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/trimStart.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/truncate.js b/tools/node_modules/@babel/core/node_modules/lodash/truncate.js
index 21fcdfef6ec..21fcdfef6ec 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/truncate.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/truncate.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unary.js b/tools/node_modules/@babel/core/node_modules/lodash/unary.js
index 76f48f6e35f..76f48f6e35f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unary.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unary.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unescape.js b/tools/node_modules/@babel/core/node_modules/lodash/unescape.js
index 3b6efd583a4..3b6efd583a4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unescape.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unescape.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/union.js b/tools/node_modules/@babel/core/node_modules/lodash/union.js
index e676dfe493c..e676dfe493c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/union.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/union.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unionBy.js b/tools/node_modules/@babel/core/node_modules/lodash/unionBy.js
index 6ae8ccd6ef8..6ae8ccd6ef8 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unionBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unionBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unionWith.js b/tools/node_modules/@babel/core/node_modules/lodash/unionWith.js
index 78736b27cda..78736b27cda 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unionWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unionWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniq.js b/tools/node_modules/@babel/core/node_modules/lodash/uniq.js
index 157d1cd3800..157d1cd3800 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/uniq.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/uniq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqBy.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqBy.js
index 53402a9bf8b..53402a9bf8b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/uniqBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/uniqBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqWith.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqWith.js
index 18d72aabcdc..18d72aabcdc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/uniqWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/uniqWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/uniqueId.js b/tools/node_modules/@babel/core/node_modules/lodash/uniqueId.js
index ffa8c034722..ffa8c034722 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/uniqueId.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/uniqueId.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unset.js b/tools/node_modules/@babel/core/node_modules/lodash/unset.js
index 723c3d44b2c..723c3d44b2c 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unset.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unset.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unzip.js b/tools/node_modules/@babel/core/node_modules/lodash/unzip.js
index fce0ec78d10..fce0ec78d10 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unzip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unzip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/unzipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/unzipWith.js
index 926c8993d90..926c8993d90 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/unzipWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/unzipWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/update.js b/tools/node_modules/@babel/core/node_modules/lodash/update.js
index b90098e6da9..b90098e6da9 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/update.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/update.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/updateWith.js b/tools/node_modules/@babel/core/node_modules/lodash/updateWith.js
index a2f4a2cfbf1..a2f4a2cfbf1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/updateWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/updateWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/upperCase.js b/tools/node_modules/@babel/core/node_modules/lodash/upperCase.js
index efbb8b06cf4..efbb8b06cf4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/upperCase.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/upperCase.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/upperFirst.js b/tools/node_modules/@babel/core/node_modules/lodash/upperFirst.js
index 1dd64e13561..1dd64e13561 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/upperFirst.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/upperFirst.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/util.js b/tools/node_modules/@babel/core/node_modules/lodash/util.js
index d244dc27efe..d244dc27efe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/util.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/util.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/value.js b/tools/node_modules/@babel/core/node_modules/lodash/value.js
index 5e751a2c32e..5e751a2c32e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/value.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/value.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/valueOf.js b/tools/node_modules/@babel/core/node_modules/lodash/valueOf.js
index 5e751a2c32e..5e751a2c32e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/valueOf.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/valueOf.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/values.js b/tools/node_modules/@babel/core/node_modules/lodash/values.js
index b069654181e..b069654181e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/values.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/values.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/valuesIn.js b/tools/node_modules/@babel/core/node_modules/lodash/valuesIn.js
index 62960942079..62960942079 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/valuesIn.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/valuesIn.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/without.js b/tools/node_modules/@babel/core/node_modules/lodash/without.js
index 3a28e8ae4cc..3a28e8ae4cc 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/without.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/without.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/words.js b/tools/node_modules/@babel/core/node_modules/lodash/words.js
index 6d7cdd1857f..6d7cdd1857f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/words.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/words.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrap.js b/tools/node_modules/@babel/core/node_modules/lodash/wrap.js
index cad3c501d83..cad3c501d83 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrap.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrap.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperAt.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperAt.js
index 6f6a1d0806b..6f6a1d0806b 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperAt.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrapperAt.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperChain.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperChain.js
index bda2ce69c97..bda2ce69c97 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperChain.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrapperChain.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperLodash.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperLodash.js
index bd6e8ad9ab3..bd6e8ad9ab3 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperLodash.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrapperLodash.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperReverse.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperReverse.js
index e93112a21ac..e93112a21ac 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperReverse.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrapperReverse.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperValue.js b/tools/node_modules/@babel/core/node_modules/lodash/wrapperValue.js
index f56c2dadedb..f56c2dadedb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/wrapperValue.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/wrapperValue.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xor.js b/tools/node_modules/@babel/core/node_modules/lodash/xor.js
index d4d286045fe..d4d286045fe 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/xor.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/xor.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xorBy.js b/tools/node_modules/@babel/core/node_modules/lodash/xorBy.js
index e0478950c66..e0478950c66 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/xorBy.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/xorBy.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/xorWith.js b/tools/node_modules/@babel/core/node_modules/lodash/xorWith.js
index e3a8ac67feb..e3a8ac67feb 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/xorWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/xorWith.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zip.js b/tools/node_modules/@babel/core/node_modules/lodash/zip.js
index c800ab3d10f..c800ab3d10f 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/zip.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/zip.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipObject.js b/tools/node_modules/@babel/core/node_modules/lodash/zipObject.js
index 23fdf1417d1..23fdf1417d1 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/zipObject.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/zipObject.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipObjectDeep.js b/tools/node_modules/@babel/core/node_modules/lodash/zipObjectDeep.js
index 7c858f844f4..7c858f844f4 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/zipObjectDeep.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/zipObjectDeep.js
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/zipWith.js b/tools/node_modules/@babel/core/node_modules/lodash/zipWith.js
index d7a1f91971e..d7a1f91971e 100644
--- a/tools/node_modules/babel-eslint/node_modules/lodash/zipWith.js
+++ b/tools/node_modules/@babel/core/node_modules/lodash/zipWith.js
diff --git a/tools/node_modules/@babel/core/node_modules/minimist/LICENSE b/tools/node_modules/@babel/core/node_modules/minimist/LICENSE
new file mode 100644
index 00000000000..ee27ba4b441
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/minimist/LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/minimist/index.js b/tools/node_modules/@babel/core/node_modules/minimist/index.js
new file mode 100644
index 00000000000..d2afe5e4d40
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/minimist/index.js
@@ -0,0 +1,245 @@
+module.exports = function (args, opts) {
+ if (!opts) opts = {};
+
+ var flags = { bools : {}, strings : {}, unknownFn: null };
+
+ if (typeof opts['unknown'] === 'function') {
+ flags.unknownFn = opts['unknown'];
+ }
+
+ if (typeof opts['boolean'] === 'boolean' && opts['boolean']) {
+ flags.allBools = true;
+ } else {
+ [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+ flags.bools[key] = true;
+ });
+ }
+
+ var aliases = {};
+ Object.keys(opts.alias || {}).forEach(function (key) {
+ aliases[key] = [].concat(opts.alias[key]);
+ aliases[key].forEach(function (x) {
+ aliases[x] = [key].concat(aliases[key].filter(function (y) {
+ return x !== y;
+ }));
+ });
+ });
+
+ [].concat(opts.string).filter(Boolean).forEach(function (key) {
+ flags.strings[key] = true;
+ if (aliases[key]) {
+ flags.strings[aliases[key]] = true;
+ }
+ });
+
+ var defaults = opts['default'] || {};
+
+ var argv = { _ : [] };
+ Object.keys(flags.bools).forEach(function (key) {
+ setArg(key, defaults[key] === undefined ? false : defaults[key]);
+ });
+
+ var notFlags = [];
+
+ if (args.indexOf('--') !== -1) {
+ notFlags = args.slice(args.indexOf('--')+1);
+ args = args.slice(0, args.indexOf('--'));
+ }
+
+ function argDefined(key, arg) {
+ return (flags.allBools && /^--[^=]+$/.test(arg)) ||
+ flags.strings[key] || flags.bools[key] || aliases[key];
+ }
+
+ function setArg (key, val, arg) {
+ if (arg && flags.unknownFn && !argDefined(key, arg)) {
+ if (flags.unknownFn(arg) === false) return;
+ }
+
+ var value = !flags.strings[key] && isNumber(val)
+ ? Number(val) : val
+ ;
+ setKey(argv, key.split('.'), value);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), value);
+ });
+ }
+
+ function setKey (obj, keys, value) {
+ var o = obj;
+ for (var i = 0; i < keys.length-1; i++) {
+ var key = keys[i];
+ if (key === '__proto__') return;
+ if (o[key] === undefined) o[key] = {};
+ if (o[key] === Object.prototype || o[key] === Number.prototype
+ || o[key] === String.prototype) o[key] = {};
+ if (o[key] === Array.prototype) o[key] = [];
+ o = o[key];
+ }
+
+ var key = keys[keys.length - 1];
+ if (key === '__proto__') return;
+ if (o === Object.prototype || o === Number.prototype
+ || o === String.prototype) o = {};
+ if (o === Array.prototype) o = [];
+ if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
+ o[key] = value;
+ }
+ else if (Array.isArray(o[key])) {
+ o[key].push(value);
+ }
+ else {
+ o[key] = [ o[key], value ];
+ }
+ }
+
+ function aliasIsBoolean(key) {
+ return aliases[key].some(function (x) {
+ return flags.bools[x];
+ });
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ var arg = args[i];
+
+ if (/^--.+=/.test(arg)) {
+ // Using [\s\S] instead of . because js doesn't support the
+ // 'dotall' regex modifier. See:
+ // http://stackoverflow.com/a/1068308/13216
+ var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+ var key = m[1];
+ var value = m[2];
+ if (flags.bools[key]) {
+ value = value !== 'false';
+ }
+ setArg(key, value, arg);
+ }
+ else if (/^--no-.+/.test(arg)) {
+ var key = arg.match(/^--no-(.+)/)[1];
+ setArg(key, false, arg);
+ }
+ else if (/^--.+/.test(arg)) {
+ var key = arg.match(/^--(.+)/)[1];
+ var next = args[i + 1];
+ if (next !== undefined && !/^-/.test(next)
+ && !flags.bools[key]
+ && !flags.allBools
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, next, arg);
+ i++;
+ }
+ else if (/^(true|false)$/.test(next)) {
+ setArg(key, next === 'true', arg);
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true, arg);
+ }
+ }
+ else if (/^-[^-]+/.test(arg)) {
+ var letters = arg.slice(1,-1).split('');
+
+ var broken = false;
+ for (var j = 0; j < letters.length; j++) {
+ var next = arg.slice(j+2);
+
+ if (next === '-') {
+ setArg(letters[j], next, arg)
+ continue;
+ }
+
+ if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
+ setArg(letters[j], next.split('=')[1], arg);
+ broken = true;
+ break;
+ }
+
+ if (/[A-Za-z]/.test(letters[j])
+ && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+ setArg(letters[j], next, arg);
+ broken = true;
+ break;
+ }
+
+ if (letters[j+1] && letters[j+1].match(/\W/)) {
+ setArg(letters[j], arg.slice(j+2), arg);
+ broken = true;
+ break;
+ }
+ else {
+ setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
+ }
+ }
+
+ var key = arg.slice(-1)[0];
+ if (!broken && key !== '-') {
+ if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+ && !flags.bools[key]
+ && (aliases[key] ? !aliasIsBoolean(key) : true)) {
+ setArg(key, args[i+1], arg);
+ i++;
+ }
+ else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
+ setArg(key, args[i+1] === 'true', arg);
+ i++;
+ }
+ else {
+ setArg(key, flags.strings[key] ? '' : true, arg);
+ }
+ }
+ }
+ else {
+ if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
+ argv._.push(
+ flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+ );
+ }
+ if (opts.stopEarly) {
+ argv._.push.apply(argv._, args.slice(i + 1));
+ break;
+ }
+ }
+ }
+
+ Object.keys(defaults).forEach(function (key) {
+ if (!hasKey(argv, key.split('.'))) {
+ setKey(argv, key.split('.'), defaults[key]);
+
+ (aliases[key] || []).forEach(function (x) {
+ setKey(argv, x.split('.'), defaults[key]);
+ });
+ }
+ });
+
+ if (opts['--']) {
+ argv['--'] = new Array();
+ notFlags.forEach(function(key) {
+ argv['--'].push(key);
+ });
+ }
+ else {
+ notFlags.forEach(function(key) {
+ argv._.push(key);
+ });
+ }
+
+ return argv;
+};
+
+function hasKey (obj, keys) {
+ var o = obj;
+ keys.slice(0,-1).forEach(function (key) {
+ o = (o[key] || {});
+ });
+
+ var key = keys[keys.length - 1];
+ return key in o;
+}
+
+function isNumber (x) {
+ if (typeof x === 'number') return true;
+ if (/^0x[0-9a-f]+$/i.test(x)) return true;
+ return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
diff --git a/tools/node_modules/@babel/core/node_modules/minimist/package.json b/tools/node_modules/@babel/core/node_modules/minimist/package.json
new file mode 100644
index 00000000000..c091d41375f
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/minimist/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "minimist",
+ "version": "1.2.5",
+ "description": "parse argument options",
+ "main": "index.js",
+ "devDependencies": {
+ "covert": "^1.0.0",
+ "tap": "~0.4.0",
+ "tape": "^3.5.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "coverage": "covert test/*.js"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/6..latest",
+ "ff/5",
+ "firefox/latest",
+ "chrome/10",
+ "chrome/latest",
+ "safari/5.1",
+ "safari/latest",
+ "opera/12"
+ ]
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/substack/minimist.git"
+ },
+ "homepage": "https://github.com/substack/minimist",
+ "keywords": [
+ "argv",
+ "getopt",
+ "parser",
+ "optimist"
+ ],
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "license": "MIT"
+}
diff --git a/tools/node_modules/@babel/core/node_modules/minimist/readme.markdown b/tools/node_modules/@babel/core/node_modules/minimist/readme.markdown
new file mode 100644
index 00000000000..5fd97ab11ee
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/minimist/readme.markdown
@@ -0,0 +1,95 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.log(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+ x: 3,
+ y: 4,
+ n: 5,
+ a: true,
+ b: true,
+ c: true,
+ beep: 'boop' }
+```
+
+# security
+
+Previous versions had a prototype pollution bug that could cause privilege
+escalation in some circumstances when handling untrusted user input.
+
+Please use version 1.2.3 or later: https://snyk.io/vuln/SNYK-JS-MINIMIST-559764
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a boolean, string or array of strings to always treat as
+booleans. if `true` will treat all double hyphenated arguments without equal signs
+as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+* `opts.stopEarly` - when true, populate `argv._` with everything after the
+first non-option
+* `opts['--']` - when true, populate `argv._` with everything before the `--`
+and `argv['--']` with everything after the `--`. Here's an example:
+
+ ```
+ > require('./')('one two three -- four five --six'.split(' '), { '--': true })
+ { _: [ 'one', 'two', 'three' ],
+ '--': [ 'four', 'five', '--six' ] }
+ ```
+
+ Note that with `opts['--']` set, parsing for arguments still stops after the
+ `--`.
+
+* `opts.unknown` - a function which is invoked with a command line parameter not
+defined in the `opts` configuration object. If the function returns `false`, the
+unknown option is not added to `argv`.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/index.js b/tools/node_modules/@babel/core/node_modules/ms/index.js
index c4498bcc212..c4498bcc212 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/index.js
+++ b/tools/node_modules/@babel/core/node_modules/ms/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/license.md b/tools/node_modules/@babel/core/node_modules/ms/license.md
index 69b61253a38..69b61253a38 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/license.md
+++ b/tools/node_modules/@babel/core/node_modules/ms/license.md
diff --git a/tools/node_modules/@babel/core/node_modules/ms/package.json b/tools/node_modules/@babel/core/node_modules/ms/package.json
new file mode 100644
index 00000000000..eea666e1fb0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/ms/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "ms",
+ "version": "2.1.2",
+ "description": "Tiny millisecond conversion utility",
+ "repository": "zeit/ms",
+ "main": "./index",
+ "files": [
+ "index.js"
+ ],
+ "scripts": {
+ "precommit": "lint-staged",
+ "lint": "eslint lib/* bin/*",
+ "test": "mocha tests.js"
+ },
+ "eslintConfig": {
+ "extends": "eslint:recommended",
+ "env": {
+ "node": true,
+ "es6": true
+ }
+ },
+ "lint-staged": {
+ "*.js": [
+ "npm run lint",
+ "prettier --single-quote --write",
+ "git add"
+ ]
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "eslint": "4.12.1",
+ "expect.js": "0.3.1",
+ "husky": "0.14.3",
+ "lint-staged": "5.0.0",
+ "mocha": "4.0.1"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/readme.md b/tools/node_modules/@babel/core/node_modules/ms/readme.md
index 9a1996b17e0..9a1996b17e0 100644
--- a/tools/node_modules/babel-eslint/node_modules/ms/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/ms/readme.md
diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/LICENSE b/tools/node_modules/@babel/core/node_modules/path-parse/LICENSE
index 810f3dbea83..810f3dbea83 100644
--- a/tools/node_modules/babel-eslint/node_modules/path-parse/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/path-parse/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/README.md b/tools/node_modules/@babel/core/node_modules/path-parse/README.md
index 05097f86aef..05097f86aef 100644
--- a/tools/node_modules/babel-eslint/node_modules/path-parse/README.md
+++ b/tools/node_modules/@babel/core/node_modules/path-parse/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/index.js b/tools/node_modules/@babel/core/node_modules/path-parse/index.js
index 3b7601fe494..3b7601fe494 100644
--- a/tools/node_modules/babel-eslint/node_modules/path-parse/index.js
+++ b/tools/node_modules/@babel/core/node_modules/path-parse/index.js
diff --git a/tools/node_modules/@babel/core/node_modules/path-parse/package.json b/tools/node_modules/@babel/core/node_modules/path-parse/package.json
new file mode 100644
index 00000000000..21332bb14f8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/path-parse/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "path-parse",
+ "version": "1.0.6",
+ "description": "Node.js path.parse() ponyfill",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jbgutierrez/path-parse.git"
+ },
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "parse",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim"
+ ],
+ "author": "Javier Blanco <http://jbgutierrez.info>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/jbgutierrez/path-parse/issues"
+ },
+ "homepage": "https://github.com/jbgutierrez/path-parse#readme"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/LICENSE b/tools/node_modules/@babel/core/node_modules/resolve/LICENSE
index ff4fce28af3..ff4fce28af3 100644
--- a/tools/node_modules/babel-eslint/node_modules/resolve/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/resolve/LICENSE
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/index.js b/tools/node_modules/@babel/core/node_modules/resolve/index.js
new file mode 100644
index 00000000000..125d8146423
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/index.js
@@ -0,0 +1,6 @@
+var async = require('./lib/async');
+async.core = require('./lib/core');
+async.isCore = require('./lib/is-core');
+async.sync = require('./lib/sync');
+
+module.exports = async;
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js
new file mode 100644
index 00000000000..29285079451
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/async.js
@@ -0,0 +1,299 @@
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller');
+var nodeModulesPaths = require('./node-modules-paths');
+var normalizeOptions = require('./normalize-options');
+var isCore = require('is-core-module');
+
+var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+
+var defaultIsFile = function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultIsDir = function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+};
+
+var defaultRealpath = function realpath(x, cb) {
+ realpathFS(x, function (realpathErr, realPath) {
+ if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);
+ else cb(null, realpathErr ? x : realPath);
+ });
+};
+
+var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {
+ if (opts && opts.preserveSymlinks === false) {
+ realpath(x, cb);
+ } else {
+ cb(null, x);
+ }
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolve(x, options, callback) {
+ var cb = callback;
+ var opts = options;
+ if (typeof options === 'function') {
+ cb = opts;
+ opts = {};
+ }
+ if (typeof x !== 'string') {
+ var err = new TypeError('Path must be a string.');
+ return process.nextTick(function () {
+ cb(err);
+ });
+ }
+
+ opts = normalizeOptions(x, opts);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var readFile = opts.readFile || fs.readFile;
+ var realpath = opts.realpath || defaultRealpath;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var includeCoreModules = opts.includeCoreModules !== false;
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = path.resolve(basedir);
+
+ maybeRealpath(
+ realpath,
+ absoluteStart,
+ opts,
+ function (err, realStart) {
+ if (err) cb(err);
+ else init(realStart);
+ }
+ );
+
+ var res;
+ function init(basedir) {
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ res = path.resolve(basedir, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ if ((/\/$/).test(x) && res === basedir) {
+ loadAsDirectory(res, opts.package, onfile);
+ } else loadAsFile(res, opts.package, onfile);
+ } else if (includeCoreModules && isCore(x)) {
+ return cb(null, x);
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
+ if (err) cb(err);
+ else if (n) {
+ return maybeRealpath(realpath, n, opts, function (err, realN) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realN, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) cb(err);
+ else if (m) cb(null, m, pkg);
+ else loadAsDirectory(res, function (err, d, pkg) {
+ if (err) cb(err);
+ else if (d) {
+ maybeRealpath(realpath, d, opts, function (err, realD) {
+ if (err) {
+ cb(err);
+ } else {
+ cb(null, realD, pkg);
+ }
+ });
+ } else {
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ moduleError.code = 'MODULE_NOT_FOUND';
+ cb(moduleError);
+ }
+ });
+ }
+
+ function loadAsFile(x, thePackage, callback) {
+ var loadAsFilePackage = thePackage;
+ var cb = callback;
+ if (typeof loadAsFilePackage === 'function') {
+ cb = loadAsFilePackage;
+ loadAsFilePackage = undefined;
+ }
+
+ var exts = [''].concat(extensions);
+ load(exts, x, loadAsFilePackage);
+
+ function load(exts, x, loadPackage) {
+ if (exts.length === 0) return cb(null, undefined, loadPackage);
+ var file = x + exts[0];
+
+ var pkg = loadPackage;
+ if (pkg) onpkg(null, pkg);
+ else loadpkg(path.dirname(file), onpkg);
+
+ function onpkg(err, pkg_, dir) {
+ pkg = pkg_;
+ if (err) return cb(err);
+ if (dir && pkg && opts.pathFilter) {
+ var rfile = path.relative(dir, file);
+ var rel = rfile.slice(0, rfile.length - exts[0].length);
+ var r = opts.pathFilter(pkg, x, rel);
+ if (r) return load(
+ [''].concat(extensions.slice()),
+ path.resolve(dir, r),
+ pkg
+ );
+ }
+ isFile(file, onex);
+ }
+ function onex(err, ex) {
+ if (err) return cb(err);
+ if (ex) return cb(null, file, pkg);
+ load(exts.slice(1), x, pkg);
+ }
+ }
+ }
+
+ function loadpkg(dir, cb) {
+ if (dir === '' || dir === '/') return cb(null);
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return cb(null);
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
+
+ maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return loadpkg(path.dirname(dir), cb);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ // on err, ex is false
+ if (!ex) return loadpkg(path.dirname(dir), cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) cb(err);
+ try { var pkg = JSON.parse(body); } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+ cb(null, pkg, dir);
+ });
+ });
+ });
+ }
+
+ function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
+ var cb = callback;
+ var fpkg = loadAsDirectoryPackage;
+ if (typeof fpkg === 'function') {
+ cb = fpkg;
+ fpkg = opts.package;
+ }
+
+ maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {
+ if (unwrapErr) return cb(unwrapErr);
+ var pkgfile = path.join(pkgdir, 'package.json');
+ isFile(pkgfile, function (err, ex) {
+ if (err) return cb(err);
+ if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
+
+ readFile(pkgfile, function (err, body) {
+ if (err) return cb(err);
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ pkg = opts.packageFilter(pkg, pkgfile);
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ return cb(mainError);
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
+
+ var dir = path.resolve(x, pkg.main);
+ loadAsDirectory(dir, pkg, function (err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ loadAsFile(path.join(x, 'index'), pkg, cb);
+ });
+ });
+ return;
+ }
+
+ loadAsFile(path.join(x, '/index'), pkg, cb);
+ });
+ });
+ });
+ }
+
+ function processDirs(cb, dirs) {
+ if (dirs.length === 0) return cb(null, undefined);
+ var dir = dirs[0];
+
+ isDirectory(path.dirname(dir), isdir);
+
+ function isdir(err, isdir) {
+ if (err) return cb(err);
+ if (!isdir) return processDirs(cb, dirs.slice(1));
+ loadAsFile(dir, opts.package, onfile);
+ }
+
+ function onfile(err, m, pkg) {
+ if (err) return cb(err);
+ if (m) return cb(null, m, pkg);
+ loadAsDirectory(dir, opts.package, ondir);
+ }
+
+ function ondir(err, n, pkg) {
+ if (err) return cb(err);
+ if (n) return cb(null, n, pkg);
+ processDirs(cb, dirs.slice(1));
+ }
+ }
+ function loadNodeModules(x, start, cb) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ processDirs(
+ cb,
+ packageIterator ? packageIterator(x, start, thunk, opts) : thunk()
+ );
+ }
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/caller.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/caller.js
index b14a2804ae8..b14a2804ae8 100644
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/caller.js
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/caller.js
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js
new file mode 100644
index 00000000000..c417d23c5a8
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.js
@@ -0,0 +1,53 @@
+var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];
+
+function specifierIncluded(specifier) {
+ var parts = specifier.split(' ');
+ var op = parts.length > 1 ? parts[0] : '=';
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
+
+ for (var i = 0; i < 3; ++i) {
+ var cur = parseInt(current[i] || 0, 10);
+ var ver = parseInt(versionParts[i] || 0, 10);
+ if (cur === ver) {
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
+ }
+ if (op === '<') {
+ return cur < ver;
+ } else if (op === '>=') {
+ return cur >= ver;
+ } else {
+ return false;
+ }
+ }
+ return op === '>=';
+}
+
+function matchesRange(range) {
+ var specifiers = range.split(/ ?&& ?/);
+ if (specifiers.length === 0) { return false; }
+ for (var i = 0; i < specifiers.length; ++i) {
+ if (!specifierIncluded(specifiers[i])) { return false; }
+ }
+ return true;
+}
+
+function versionIncluded(specifierValue) {
+ if (typeof specifierValue === 'boolean') { return specifierValue; }
+ if (specifierValue && typeof specifierValue === 'object') {
+ for (var i = 0; i < specifierValue.length; ++i) {
+ if (matchesRange(specifierValue[i])) { return true; }
+ }
+ return false;
+ }
+ return matchesRange(specifierValue);
+}
+
+var data = require('./core.json');
+
+var core = {};
+for (var mod in data) { // eslint-disable-line no-restricted-syntax
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
+ core[mod] = versionIncluded(data[mod]);
+ }
+}
+module.exports = core;
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json
new file mode 100644
index 00000000000..226198f89b5
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/core.json
@@ -0,0 +1,80 @@
+{
+ "assert": true,
+ "assert/strict": ">= 15",
+ "async_hooks": ">= 8",
+ "buffer_ieee754": "< 0.9.7",
+ "buffer": true,
+ "child_process": true,
+ "cluster": true,
+ "console": true,
+ "constants": true,
+ "crypto": true,
+ "_debug_agent": ">= 1 && < 8",
+ "_debugger": "< 8",
+ "dgram": true,
+ "diagnostics_channel": ">= 15.1",
+ "dns": true,
+ "dns/promises": ">= 15",
+ "domain": ">= 0.7.12",
+ "events": true,
+ "freelist": "< 6",
+ "fs": true,
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
+ "_http_agent": ">= 0.11.1",
+ "_http_client": ">= 0.11.1",
+ "_http_common": ">= 0.11.1",
+ "_http_incoming": ">= 0.11.1",
+ "_http_outgoing": ">= 0.11.1",
+ "_http_server": ">= 0.11.1",
+ "http": true,
+ "http2": ">= 8.8",
+ "https": true,
+ "inspector": ">= 8.0.0",
+ "_linklist": "< 8",
+ "module": true,
+ "net": true,
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
+ "os": true,
+ "path": true,
+ "perf_hooks": ">= 8.5",
+ "process": ">= 1",
+ "punycode": true,
+ "querystring": true,
+ "readline": true,
+ "repl": true,
+ "smalloc": ">= 0.11.5 && < 3",
+ "_stream_duplex": ">= 0.9.4",
+ "_stream_transform": ">= 0.9.4",
+ "_stream_wrap": ">= 1.4.1",
+ "_stream_passthrough": ">= 0.9.4",
+ "_stream_readable": ">= 0.9.4",
+ "_stream_writable": ">= 0.9.4",
+ "stream": true,
+ "stream/promises": ">= 15",
+ "string_decoder": true,
+ "sys": [">= 0.6 && < 0.7", ">= 0.8"],
+ "timers": true,
+ "timers/promises": ">= 15",
+ "_tls_common": ">= 0.11.13",
+ "_tls_legacy": ">= 0.11.3 && < 10",
+ "_tls_wrap": ">= 0.11.3",
+ "tls": true,
+ "trace_events": ">= 10",
+ "tty": true,
+ "url": true,
+ "util": true,
+ "v8/tools/arguments": ">= 10 && < 12",
+ "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
+ "v8": ">= 1",
+ "vm": true,
+ "wasi": ">= 13.4 && < 13.5",
+ "worker_threads": ">= 11.7",
+ "zlib": true
+}
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js
new file mode 100644
index 00000000000..537f5c782ff
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/is-core.js
@@ -0,0 +1,5 @@
+var isCoreModule = require('is-core-module');
+
+module.exports = function isCore(x) {
+ return isCoreModule(x);
+};
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/node-modules-paths.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/node-modules-paths.js
index 2b43813a7a5..2b43813a7a5 100644
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/node-modules-paths.js
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/node-modules-paths.js
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/normalize-options.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/normalize-options.js
index 4b56904eaea..4b56904eaea 100644
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/normalize-options.js
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/normalize-options.js
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js b/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js
new file mode 100644
index 00000000000..d5308c926e4
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/lib/sync.js
@@ -0,0 +1,192 @@
+var isCore = require('is-core-module');
+var fs = require('fs');
+var path = require('path');
+var caller = require('./caller');
+var nodeModulesPaths = require('./node-modules-paths');
+var normalizeOptions = require('./normalize-options');
+
+var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+
+var defaultIsFile = function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+};
+
+var defaultIsDir = function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+};
+
+var defaultRealpathSync = function realpathSync(x) {
+ try {
+ return realpathFS(x);
+ } catch (realpathErr) {
+ if (realpathErr.code !== 'ENOENT') {
+ throw realpathErr;
+ }
+ }
+ return x;
+};
+
+var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {
+ if (opts && opts.preserveSymlinks === false) {
+ return realpathSync(x);
+ }
+ return x;
+};
+
+var getPackageCandidates = function getPackageCandidates(x, start, opts) {
+ var dirs = nodeModulesPaths(start, opts, x);
+ for (var i = 0; i < dirs.length; i++) {
+ dirs[i] = path.join(dirs[i], x);
+ }
+ return dirs;
+};
+
+module.exports = function resolveSync(x, options) {
+ if (typeof x !== 'string') {
+ throw new TypeError('Path must be a string.');
+ }
+ var opts = normalizeOptions(x, options);
+
+ var isFile = opts.isFile || defaultIsFile;
+ var readFileSync = opts.readFileSync || fs.readFileSync;
+ var isDirectory = opts.isDirectory || defaultIsDir;
+ var realpathSync = opts.realpathSync || defaultRealpathSync;
+ var packageIterator = opts.packageIterator;
+
+ var extensions = opts.extensions || ['.js'];
+ var includeCoreModules = opts.includeCoreModules !== false;
+ var basedir = opts.basedir || path.dirname(caller());
+ var parent = opts.filename || basedir;
+
+ opts.paths = opts.paths || [];
+
+ // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
+ var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
+
+ if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
+ var res = path.resolve(absoluteStart, x);
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
+ if (m) return maybeRealpathSync(realpathSync, m, opts);
+ } else if (includeCoreModules && isCore(x)) {
+ return x;
+ } else {
+ var n = loadNodeModulesSync(x, absoluteStart);
+ if (n) return maybeRealpathSync(realpathSync, n, opts);
+ }
+
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+
+ function loadAsFileSync(x) {
+ var pkg = loadpkg(path.dirname(x));
+
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
+ var rfile = path.relative(pkg.dir, x);
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
+ if (r) {
+ x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
+ }
+ }
+
+ if (isFile(x)) {
+ return x;
+ }
+
+ for (var i = 0; i < extensions.length; i++) {
+ var file = x + extensions[i];
+ if (isFile(file)) {
+ return file;
+ }
+ }
+ }
+
+ function loadpkg(dir) {
+ if (dir === '' || dir === '/') return;
+ if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
+ return;
+ }
+ if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
+
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
+
+ if (!isFile(pkgfile)) {
+ return loadpkg(path.dirname(dir));
+ }
+
+ var body = readFileSync(pkgfile);
+
+ try {
+ var pkg = JSON.parse(body);
+ } catch (jsonErr) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment
+ }
+
+ return { pkg: pkg, dir: dir };
+ }
+
+ function loadAsDirectorySync(x) {
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
+ if (isFile(pkgfile)) {
+ try {
+ var body = readFileSync(pkgfile, 'UTF8');
+ var pkg = JSON.parse(body);
+ } catch (e) {}
+
+ if (pkg && opts.packageFilter) {
+ // v2 will pass pkgfile
+ pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment
+ }
+
+ if (pkg && pkg.main) {
+ if (typeof pkg.main !== 'string') {
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
+ mainError.code = 'INVALID_PACKAGE_MAIN';
+ throw mainError;
+ }
+ if (pkg.main === '.' || pkg.main === './') {
+ pkg.main = 'index';
+ }
+ try {
+ var m = loadAsFileSync(path.resolve(x, pkg.main));
+ if (m) return m;
+ var n = loadAsDirectorySync(path.resolve(x, pkg.main));
+ if (n) return n;
+ } catch (e) {}
+ }
+ }
+
+ return loadAsFileSync(path.join(x, '/index'));
+ }
+
+ function loadNodeModulesSync(x, start) {
+ var thunk = function () { return getPackageCandidates(x, start, opts); };
+ var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
+
+ for (var i = 0; i < dirs.length; i++) {
+ var dir = dirs[i];
+ if (isDirectory(path.dirname(dir))) {
+ var m = loadAsFileSync(dir);
+ if (m) return m;
+ var n = loadAsDirectorySync(dir);
+ if (n) return n;
+ }
+ }
+ }
+};
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/package.json b/tools/node_modules/@babel/core/node_modules/resolve/package.json
new file mode 100644
index 00000000000..dfcfc497b34
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/package.json
@@ -0,0 +1,51 @@
+{
+ "name": "resolve",
+ "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
+ "version": "1.19.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/browserify/resolve.git"
+ },
+ "main": "index.js",
+ "keywords": [
+ "resolve",
+ "require",
+ "node",
+ "module"
+ ],
+ "scripts": {
+ "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/",
+ "prelint": "eclint check '**/*'",
+ "lint": "eslint --ext=js,mjs .",
+ "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
+ "tests-only": "tape test/*.js",
+ "pretest": "npm run lint",
+ "test": "npm run --silent tests-only",
+ "posttest": "npm run test:multirepo && aud --production",
+ "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^17.2.0",
+ "array.prototype.map": "^1.0.2",
+ "aud": "^1.1.3",
+ "eclint": "^2.8.1",
+ "eslint": "^7.13.0",
+ "object-keys": "^1.1.1",
+ "safe-publish-latest": "^1.1.4",
+ "tap": "0.4.13",
+ "tape": "^5.0.1"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "dependencies": {
+ "is-core-module": "^2.1.0",
+ "path-parse": "^1.0.6"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown b/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown
new file mode 100644
index 00000000000..f742c38dd48
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/resolve/readme.markdown
@@ -0,0 +1,250 @@
+# resolve
+
+implements the [node `require.resolve()`
+algorithm](https://nodejs.org/api/modules.html#modules_all_together)
+such that you can `require.resolve()` on behalf of a file asynchronously and
+synchronously
+
+[![build status](https://secure.travis-ci.org/browserify/resolve.png)](http://travis-ci.org/browserify/resolve)
+
+# example
+
+asynchronously resolve:
+
+```js
+var resolve = require('resolve');
+resolve('tap', { basedir: __dirname }, function (err, res) {
+ if (err) console.error(err);
+ else console.log(res);
+});
+```
+
+```
+$ node example/async.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+synchronously resolve:
+
+```js
+var resolve = require('resolve');
+var res = resolve.sync('tap', { basedir: __dirname });
+console.log(res);
+```
+
+```
+$ node example/sync.js
+/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
+```
+
+# methods
+
+```js
+var resolve = require('resolve');
+```
+
+For both the synchronous and asynchronous methods, errors may have any of the following `err.code` values:
+
+- `MODULE_NOT_FOUND`: the given path string (`id`) could not be resolved to a module
+- `INVALID_BASEDIR`: the specified `opts.basedir` doesn't exist, or is not a directory
+- `INVALID_PACKAGE_MAIN`: a `package.json` was encountered with an invalid `main` property (eg. not a string)
+
+## resolve(id, opts={}, cb)
+
+Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.package - `package.json` data applicable to the module being loaded
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
+
+* opts.readFile - how to read files asynchronously
+
+* opts.isFile - function to asynchronously test whether a file exists
+
+* opts.isDirectory - function to asynchronously test whether a directory exists
+
+* opts.realpath - function to asynchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, pkgfile, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * pkgfile - path to package.json
+ * dir - directory for package.json
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ includeCoreModules: true,
+ readFile: fs.readFile,
+ isFile: function isFile(file, cb) {
+ fs.stat(file, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isFile() || stat.isFIFO());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ isDirectory: function isDirectory(dir, cb) {
+ fs.stat(dir, function (err, stat) {
+ if (!err) {
+ return cb(null, stat.isDirectory());
+ }
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
+ return cb(err);
+ });
+ },
+ realpath: function realpath(file, cb) {
+ var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
+ realpath(file, function (realPathErr, realPath) {
+ if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
+ else cb(null, realPathErr ? file : realPath);
+ });
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+## resolve.sync(id, opts)
+
+Synchronously resolve the module path string `id`, returning the result and
+throwing an error when `id` can't be resolved.
+
+options are:
+
+* opts.basedir - directory to begin resolving from
+
+* opts.extensions - array of file extensions to search in order
+
+* opts.includeCoreModules - set to `false` to exclude node core modules (e.g. `fs`) from the search
+
+* opts.readFile - how to read files synchronously
+
+* opts.isFile - function to synchronously test whether a file exists
+
+* opts.isDirectory - function to synchronously test whether a directory exists
+
+* opts.realpathSync - function to synchronously resolve a potential symlink to its real path
+
+* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field
+ * pkg - package data
+ * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2)
+
+* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
+ * pkg - package data
+ * path - the path being resolved
+ * relativePath - the path relative from the package.json location
+ * returns - a relative path that will be joined from the package.json location
+
+* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
+
+ For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* `opts.packageIterator(request, start, opts)` - return the list of candidate paths where the packages sources may be found (probably don't use this)
+ * request - the import specifier being resolved
+ * start - lookup path
+ * getPackageCandidates - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
+ * opts - the resolution options
+
+* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
+
+* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
+This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
+**Note:** this property is currently `true` by default but it will be changed to
+`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
+
+default `opts` values:
+
+```js
+{
+ paths: [],
+ basedir: __dirname,
+ extensions: ['.js'],
+ includeCoreModules: true,
+ readFileSync: fs.readFileSync,
+ isFile: function isFile(file) {
+ try {
+ var stat = fs.statSync(file);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isFile() || stat.isFIFO();
+ },
+ isDirectory: function isDirectory(dir) {
+ try {
+ var stat = fs.statSync(dir);
+ } catch (e) {
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
+ throw e;
+ }
+ return stat.isDirectory();
+ },
+ realpathSync: function realpathSync(file) {
+ try {
+ var realpath = typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
+ return realpath(file);
+ } catch (realPathErr) {
+ if (realPathErr.code !== 'ENOENT') {
+ throw realPathErr;
+ }
+ }
+ return file;
+ },
+ moduleDirectory: 'node_modules',
+ preserveSymlinks: true
+}
+```
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```sh
+npm install resolve
+```
+
+# license
+
+MIT
diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE b/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE
new file mode 100644
index 00000000000..0c068ceecbd
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Feross Aboukhadijeh
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md b/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md
new file mode 100644
index 00000000000..e9a81afd040
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/README.md
@@ -0,0 +1,584 @@
+# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
+
+[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg
+[travis-url]: https://travis-ci.org/feross/safe-buffer
+[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg
+[npm-url]: https://npmjs.org/package/safe-buffer
+[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg
+[downloads-url]: https://npmjs.org/package/safe-buffer
+[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
+[standard-url]: https://standardjs.com
+
+#### Safer Node.js Buffer API
+
+**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,
+`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**
+
+**Uses the built-in implementation when available.**
+
+## install
+
+```
+npm install safe-buffer
+```
+
+## usage
+
+The goal of this package is to provide a safe replacement for the node.js `Buffer`.
+
+It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to
+the top of your node.js modules:
+
+```js
+var Buffer = require('safe-buffer').Buffer
+
+// Existing buffer code will continue to work without issues:
+
+new Buffer('hey', 'utf8')
+new Buffer([1, 2, 3], 'utf8')
+new Buffer(obj)
+new Buffer(16) // create an uninitialized buffer (potentially unsafe)
+
+// But you can use these new explicit APIs to make clear what you want:
+
+Buffer.from('hey', 'utf8') // convert from many types to a Buffer
+Buffer.alloc(16) // create a zero-filled buffer (safe)
+Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
+```
+
+## api
+
+### Class Method: Buffer.from(array)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `array` {Array}
+
+Allocates a new `Buffer` using an `array` of octets.
+
+```js
+const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);
+ // creates a new Buffer containing ASCII bytes
+ // ['b','u','f','f','e','r']
+```
+
+A `TypeError` will be thrown if `array` is not an `Array`.
+
+### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or
+ a `new ArrayBuffer()`
+* `byteOffset` {Number} Default: `0`
+* `length` {Number} Default: `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a `TypedArray` instance,
+the newly created `Buffer` will share the same allocated memory as the
+TypedArray.
+
+```js
+const arr = new Uint16Array(2);
+arr[0] = 5000;
+arr[1] = 4000;
+
+const buf = Buffer.from(arr.buffer); // shares the memory with arr;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 a0 0f>
+
+// changing the TypedArray changes the Buffer also
+arr[1] = 6000;
+
+console.log(buf);
+ // Prints: <Buffer 88 13 70 17>
+```
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+```js
+const ab = new ArrayBuffer(10);
+const buf = Buffer.from(ab, 0, 2);
+console.log(buf.length);
+ // Prints: 2
+```
+
+A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.
+
+### Class Method: Buffer.from(buffer)
+<!-- YAML
+added: v3.0.0
+-->
+
+* `buffer` {Buffer}
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+```js
+const buf1 = Buffer.from('buffer');
+const buf2 = Buffer.from(buf1);
+
+buf1[0] = 0x61;
+console.log(buf1.toString());
+ // 'auffer'
+console.log(buf2.toString());
+ // 'buffer' (copy is not changed)
+```
+
+A `TypeError` will be thrown if `buffer` is not a `Buffer`.
+
+### Class Method: Buffer.from(str[, encoding])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `str` {String} String to encode.
+* `encoding` {String} Encoding to use, Default: `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `str`. If
+provided, the `encoding` parameter identifies the character encoding.
+If not provided, `encoding` defaults to `'utf8'`.
+
+```js
+const buf1 = Buffer.from('this is a tést');
+console.log(buf1.toString());
+ // prints: this is a tést
+console.log(buf1.toString('ascii'));
+ // prints: this is a tC)st
+
+const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+console.log(buf2.toString());
+ // prints: this is a tést
+```
+
+A `TypeError` will be thrown if `str` is not a string.
+
+### Class Method: Buffer.alloc(size[, fill[, encoding]])
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+* `fill` {Value} Default: `undefined`
+* `encoding` {String} Default: `utf8`
+
+Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the
+`Buffer` will be *zero-filled*.
+
+```js
+const buf = Buffer.alloc(5);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+The `size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+If `fill` is specified, the allocated `Buffer` will be initialized by calling
+`buf.fill(fill)`. See [`buf.fill()`][] for more information.
+
+```js
+const buf = Buffer.alloc(5, 'a');
+console.log(buf);
+ // <Buffer 61 61 61 61 61>
+```
+
+If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+initialized by calling `buf.fill(fill, encoding)`. For example:
+
+```js
+const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+console.log(buf);
+ // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+```
+
+Calling `Buffer.alloc(size)` can be significantly slower than the alternative
+`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance
+contents will *never contain sensitive data*.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### Class Method: Buffer.allocUnsafe(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must
+be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit
+architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is
+thrown. A zero-length Buffer will be created if a `size` less than or equal to
+0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+```js
+const buf = Buffer.allocUnsafe(5);
+console.log(buf);
+ // <Buffer 78 e0 82 02 01>
+ // (octets will be different, every time)
+buf.fill(0);
+console.log(buf);
+ // <Buffer 00 00 00 00 00>
+```
+
+A `TypeError` will be thrown if `size` is not a number.
+
+Note that the `Buffer` module pre-allocates an internal `Buffer` instance of
+size `Buffer.poolSize` that is used as a pool for the fast allocation of new
+`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated
+`new Buffer(size)` constructor) only when `size` is less than or equal to
+`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default
+value of `Buffer.poolSize` is `8192` but can be modified.
+
+Use of this pre-allocated internal memory pool is a key difference between
+calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer
+pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal
+Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The
+difference is subtle but can be important when an application requires the
+additional performance that `Buffer.allocUnsafe(size)` provides.
+
+### Class Method: Buffer.allocUnsafeSlow(size)
+<!-- YAML
+added: v5.10.0
+-->
+
+* `size` {Number}
+
+Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The
+`size` must be less than or equal to the value of
+`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is
+`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will
+be created if a `size` less than or equal to 0 is specified.
+
+The underlying memory for `Buffer` instances created in this way is *not
+initialized*. The contents of the newly created `Buffer` are unknown and
+*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such
+`Buffer` instances to zeroes.
+
+When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+allocations under 4KB are, by default, sliced from a single pre-allocated
+`Buffer`. This allows applications to avoid the garbage collection overhead of
+creating many individually allocated Buffers. This approach improves both
+performance and memory usage by eliminating the need to track and cleanup as
+many `Persistent` objects.
+
+However, in the case where a developer may need to retain a small chunk of
+memory from a pool for an indeterminate amount of time, it may be appropriate
+to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then
+copy out the relevant bits.
+
+```js
+// need to keep around a few small chunks of memory
+const store = [];
+
+socket.on('readable', () => {
+ const data = socket.read();
+ // allocate for retained data
+ const sb = Buffer.allocUnsafeSlow(10);
+ // copy the data into the new allocation
+ data.copy(sb, 0, 0, 10);
+ store.push(sb);
+});
+```
+
+Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*
+a developer has observed undue memory retention in their applications.
+
+A `TypeError` will be thrown if `size` is not a number.
+
+### All the Rest
+
+The rest of the `Buffer` API is exactly the same as in node.js.
+[See the docs](https://nodejs.org/api/buffer.html).
+
+
+## Related links
+
+- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)
+- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)
+
+## Why is `Buffer` unsafe?
+
+Today, the node.js `Buffer` constructor is overloaded to handle many different argument
+types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),
+`ArrayBuffer`, and also `Number`.
+
+The API is optimized for convenience: you can throw any type at it, and it will try to do
+what you want.
+
+Because the Buffer constructor is so powerful, you often see code like this:
+
+```js
+// Convert UTF-8 strings to hex
+function toHex (str) {
+ return new Buffer(str).toString('hex')
+}
+```
+
+***But what happens if `toHex` is called with a `Number` argument?***
+
+### Remote Memory Disclosure
+
+If an attacker can make your program call the `Buffer` constructor with a `Number`
+argument, then they can make it allocate uninitialized memory from the node.js process.
+This could potentially disclose TLS private keys, user data, or database passwords.
+
+When the `Buffer` constructor is passed a `Number` argument, it returns an
+**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like
+this, you **MUST** overwrite the contents before returning it to the user.
+
+From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):
+
+> `new Buffer(size)`
+>
+> - `size` Number
+>
+> The underlying memory for `Buffer` instances created in this way is not initialized.
+> **The contents of a newly created `Buffer` are unknown and could contain sensitive
+> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.
+
+(Emphasis our own.)
+
+Whenever the programmer intended to create an uninitialized `Buffer` you often see code
+like this:
+
+```js
+var buf = new Buffer(16)
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### Would this ever be a problem in real code?
+
+Yes. It's surprisingly common to forget to check the type of your variables in a
+dynamically-typed language like JavaScript.
+
+Usually the consequences of assuming the wrong type is that your program crashes with an
+uncaught exception. But the failure mode for forgetting to check the type of arguments to
+the `Buffer` constructor is more catastrophic.
+
+Here's an example of a vulnerable service that takes a JSON payload and converts it to
+hex:
+
+```js
+// Take a JSON payload {str: "some string"} and convert it to hex
+var server = http.createServer(function (req, res) {
+ var data = ''
+ req.setEncoding('utf8')
+ req.on('data', function (chunk) {
+ data += chunk
+ })
+ req.on('end', function () {
+ var body = JSON.parse(data)
+ res.end(new Buffer(body.str).toString('hex'))
+ })
+})
+
+server.listen(8080)
+```
+
+In this example, an http client just has to send:
+
+```json
+{
+ "str": 1000
+}
+```
+
+and it will get back 1,000 bytes of uninitialized memory from the server.
+
+This is a very serious bug. It's similar in severity to the
+[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process
+memory by remote attackers.
+
+
+### Which real-world packages were vulnerable?
+
+#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)
+
+[Mathias Buus](https://github.com/mafintosh) and I
+([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,
+[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow
+anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get
+them to reveal 20 bytes at a time of uninitialized memory from the node.js process.
+
+Here's
+[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)
+that fixed it. We released a new fixed version, created a
+[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all
+vulnerable versions on npm so users will get a warning to upgrade to a newer version.
+
+#### [`ws`](https://www.npmjs.com/package/ws)
+
+That got us wondering if there were other vulnerable packages. Sure enough, within a short
+period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the
+most popular WebSocket implementation in node.js.
+
+If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as
+expected, then uninitialized server memory would be disclosed to the remote peer.
+
+These were the vulnerable methods:
+
+```js
+socket.send(number)
+socket.ping(number)
+socket.pong(number)
+```
+
+Here's a vulnerable socket server with some echo functionality:
+
+```js
+server.on('connection', function (socket) {
+ socket.on('message', function (message) {
+ message = JSON.parse(message)
+ if (message.type === 'echo') {
+ socket.send(message.data) // send back the user's message
+ }
+ })
+})
+```
+
+`socket.send(number)` called on the server, will disclose server memory.
+
+Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue
+was fixed, with a more detailed explanation. Props to
+[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the
+[Node Security Project disclosure](https://nodesecurity.io/advisories/67).
+
+
+### What's the solution?
+
+It's important that node.js offers a fast way to get memory otherwise performance-critical
+applications would needlessly get a lot slower.
+
+But we need a better way to *signal our intent* as programmers. **When we want
+uninitialized memory, we should request it explicitly.**
+
+Sensitive functionality should not be packed into a developer-friendly API that loosely
+accepts many different types. This type of API encourages the lazy practice of passing
+variables in without checking the type very carefully.
+
+#### A new API: `Buffer.allocUnsafe(number)`
+
+The functionality of creating buffers with uninitialized memory should be part of another
+API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that
+frequently gets user input of all sorts of different types passed into it.
+
+```js
+var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!
+
+// Immediately overwrite the uninitialized buffer with data from another buffer
+for (var i = 0; i < buf.length; i++) {
+ buf[i] = otherBuf[i]
+}
+```
+
+
+### How do we fix node.js core?
+
+We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as
+`semver-major`) which defends against one case:
+
+```js
+var str = 16
+new Buffer(str, 'utf8')
+```
+
+In this situation, it's implied that the programmer intended the first argument to be a
+string, since they passed an encoding as a second argument. Today, node.js will allocate
+uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not
+what the programmer intended.
+
+But this is only a partial solution, since if the programmer does `new Buffer(variable)`
+(without an `encoding` parameter) there's no way to know what they intended. If `variable`
+is sometimes a number, then uninitialized memory will sometimes be returned.
+
+### What's the real long-term fix?
+
+We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when
+we need uninitialized memory. But that would break 1000s of packages.
+
+~~We believe the best solution is to:~~
+
+~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~
+
+~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~
+
+#### Update
+
+We now support adding three new APIs:
+
+- `Buffer.from(value)` - convert from any type to a buffer
+- `Buffer.alloc(size)` - create a zero-filled buffer
+- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size
+
+This solves the core problem that affected `ws` and `bittorrent-dht` which is
+`Buffer(variable)` getting tricked into taking a number argument.
+
+This way, existing code continues working and the impact on the npm ecosystem will be
+minimal. Over time, npm maintainers can migrate performance-critical code to use
+`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.
+
+
+### Conclusion
+
+We think there's a serious design issue with the `Buffer` API as it exists today. It
+promotes insecure software by putting high-risk functionality into a convenient API
+with friendly "developer ergonomics".
+
+This wasn't merely a theoretical exercise because we found the issue in some of the
+most popular npm packages.
+
+Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of
+`buffer`.
+
+```js
+var Buffer = require('safe-buffer').Buffer
+```
+
+Eventually, we hope that node.js core can switch to this new, safer behavior. We believe
+the impact on the ecosystem would be minimal since it's not a breaking change.
+Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while
+older, insecure packages would magically become safe from this attack vector.
+
+
+## links
+
+- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)
+- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)
+- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)
+
+
+## credit
+
+The original issues in `bittorrent-dht`
+([disclosure](https://nodesecurity.io/advisories/68)) and
+`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by
+[Mathias Buus](https://github.com/mafintosh) and
+[Feross Aboukhadijeh](http://feross.org/).
+
+Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues
+and for his work running the [Node Security Project](https://nodesecurity.io/).
+
+Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and
+auditing the code.
+
+
+## license
+
+MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js b/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js
new file mode 100644
index 00000000000..22438dabbbc
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/index.js
@@ -0,0 +1,62 @@
+/* eslint-disable node/no-deprecated-api */
+var buffer = require('buffer')
+var Buffer = buffer.Buffer
+
+// alternative to using Object.keys for old browsers
+function copyProps (src, dst) {
+ for (var key in src) {
+ dst[key] = src[key]
+ }
+}
+if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
+ module.exports = buffer
+} else {
+ // Copy properties from require('buffer')
+ copyProps(buffer, exports)
+ exports.Buffer = SafeBuffer
+}
+
+function SafeBuffer (arg, encodingOrOffset, length) {
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+// Copy static methods from Buffer
+copyProps(Buffer, SafeBuffer)
+
+SafeBuffer.from = function (arg, encodingOrOffset, length) {
+ if (typeof arg === 'number') {
+ throw new TypeError('Argument must not be a number')
+ }
+ return Buffer(arg, encodingOrOffset, length)
+}
+
+SafeBuffer.alloc = function (size, fill, encoding) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ var buf = Buffer(size)
+ if (fill !== undefined) {
+ if (typeof encoding === 'string') {
+ buf.fill(fill, encoding)
+ } else {
+ buf.fill(fill)
+ }
+ } else {
+ buf.fill(0)
+ }
+ return buf
+}
+
+SafeBuffer.allocUnsafe = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return Buffer(size)
+}
+
+SafeBuffer.allocUnsafeSlow = function (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('Argument must be a number')
+ }
+ return buffer.SlowBuffer(size)
+}
diff --git a/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json b/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json
new file mode 100644
index 00000000000..623fbc3f6b0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/safe-buffer/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "safe-buffer",
+ "description": "Safer Node.js Buffer API",
+ "version": "5.1.2",
+ "author": {
+ "name": "Feross Aboukhadijeh",
+ "email": "feross@feross.org",
+ "url": "http://feross.org"
+ },
+ "bugs": {
+ "url": "https://github.com/feross/safe-buffer/issues"
+ },
+ "devDependencies": {
+ "standard": "*",
+ "tape": "^4.0.0"
+ },
+ "homepage": "https://github.com/feross/safe-buffer",
+ "keywords": [
+ "buffer",
+ "buffer allocate",
+ "node security",
+ "safe",
+ "safe-buffer",
+ "security",
+ "uninitialized"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/feross/safe-buffer.git"
+ },
+ "scripts": {
+ "test": "standard && tape test/*.js"
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/semver/LICENSE b/tools/node_modules/@babel/core/node_modules/semver/LICENSE
new file mode 100644
index 00000000000..19129e315fe
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tools/node_modules/@babel/core/node_modules/semver/README.md b/tools/node_modules/@babel/core/node_modules/semver/README.md
new file mode 100644
index 00000000000..f8dfa5a0df5
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/README.md
@@ -0,0 +1,412 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install --save semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero digit in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
diff --git a/tools/node_modules/@babel/core/node_modules/semver/bin/semver b/tools/node_modules/@babel/core/node_modules/semver/bin/semver
new file mode 100755
index 00000000000..801e77f1303
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/bin/semver
@@ -0,0 +1,160 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+
+var versions = []
+
+var range = []
+
+var inc = null
+
+var version = require('../package.json').version
+
+var loose = false
+
+var includePrerelease = false
+
+var coerce = false
+
+var identifier
+
+var semver = require('../semver')
+
+var reverse = false
+
+var options = {}
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(a.slice(indexOfEqualSign + 1))
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ var options = { loose: loose, includePrerelease: includePrerelease }
+
+ versions = versions.map(function (v) {
+ return coerce ? (semver.coerce(v) || { version: v }).version : v
+ }).filter(function (v) {
+ return semver.valid(v)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length)) { return failInc() }
+
+ for (var i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? 'rcompare' : 'compare'
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, options)
+ }).map(function (v) {
+ return semver.clean(v, options)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach(function (v, i, _) { console.log(v) })
+}
+
+function help () {
+ console.log(['SemVer ' + version,
+ '',
+ 'A JavaScript implementation of the https://semver.org/ specification',
+ 'Copyright Isaac Z. Schlueter',
+ '',
+ 'Usage: semver [options] <version> [<version> [...]]',
+ 'Prints valid versions sorted by SemVer precedence',
+ '',
+ 'Options:',
+ '-r --range <range>',
+ ' Print versions that match the specified range.',
+ '',
+ '-i --increment [<level>]',
+ ' Increment a version by the specified level. Level can',
+ ' be one of: major, minor, patch, premajor, preminor,',
+ " prepatch, or prerelease. Default level is 'patch'.",
+ ' Only one version may be specified.',
+ '',
+ '--preid <identifier>',
+ ' Identifier to be used to prefix premajor, preminor,',
+ ' prepatch or prerelease version increments.',
+ '',
+ '-l --loose',
+ ' Interpret versions and ranges loosely',
+ '',
+ '-p --include-prerelease',
+ ' Always include prerelease versions in range matching',
+ '',
+ '-c --coerce',
+ ' Coerce a string into SemVer if possible',
+ ' (does not imply --loose)',
+ '',
+ 'Program exits successfully if any valid version satisfies',
+ 'all supplied ranges, and prints all satisfying versions.',
+ '',
+ 'If no satisfying versions are found, then exits failure.',
+ '',
+ 'Versions are printed in ascending order, so supplying',
+ 'multiple versions to the utility will just sort them.'
+ ].join('\n'))
+}
diff --git a/tools/node_modules/@babel/core/node_modules/semver/package.json b/tools/node_modules/@babel/core/node_modules/semver/package.json
new file mode 100644
index 00000000000..69d2db162c9
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "semver",
+ "version": "5.7.1",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --all; git push origin --tags"
+ },
+ "devDependencies": {
+ "tap": "^13.0.0-rc.18"
+ },
+ "license": "ISC",
+ "repository": "https://github.com/npm/node-semver",
+ "bin": {
+ "semver": "./bin/semver"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "tap": {
+ "check-coverage": true
+ }
+}
diff --git a/tools/node_modules/@babel/core/node_modules/semver/range.bnf b/tools/node_modules/@babel/core/node_modules/semver/range.bnf
new file mode 100644
index 00000000000..d4c6ae0d76c
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/tools/node_modules/@babel/core/node_modules/semver/semver.js b/tools/node_modules/@babel/core/node_modules/semver/semver.js
new file mode 100644
index 00000000000..d315d5d68b1
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/semver/semver.js
@@ -0,0 +1,1483 @@
+exports = module.exports = SemVer
+
+var debug
+/* istanbul ignore next */
+if (typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function () {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift('SEMVER')
+ console.log.apply(console, args)
+ }
+} else {
+ debug = function () {}
+}
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0'
+
+var MAX_LENGTH = 256
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+ /* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16
+
+// The actual regexps go on exports.re
+var re = exports.re = []
+var src = exports.src = []
+var R = 0
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+var NUMERICIDENTIFIER = R++
+src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
+var NUMERICIDENTIFIERLOOSE = R++
+src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+var NONNUMERICIDENTIFIER = R++
+src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+var MAINVERSION = R++
+src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIER] + ')'
+
+var MAINVERSIONLOOSE = R++
+src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+var PRERELEASEIDENTIFIER = R++
+src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')'
+
+var PRERELEASEIDENTIFIERLOOSE = R++
+src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
+ '|' + src[NONNUMERICIDENTIFIER] + ')'
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+var PRERELEASE = R++
+src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
+
+var PRERELEASELOOSE = R++
+src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+var BUILDIDENTIFIER = R++
+src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+var BUILD = R++
+src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
+ '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+var FULL = R++
+var FULLPLAIN = 'v?' + src[MAINVERSION] +
+ src[PRERELEASE] + '?' +
+ src[BUILD] + '?'
+
+src[FULL] = '^' + FULLPLAIN + '$'
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
+ src[PRERELEASELOOSE] + '?' +
+ src[BUILD] + '?'
+
+var LOOSE = R++
+src[LOOSE] = '^' + LOOSEPLAIN + '$'
+
+var GTLT = R++
+src[GTLT] = '((?:<|>)?=?)'
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+var XRANGEIDENTIFIERLOOSE = R++
+src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
+var XRANGEIDENTIFIER = R++
+src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
+
+var XRANGEPLAIN = R++
+src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[PRERELEASE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?'
+
+var XRANGEPLAINLOOSE = R++
+src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[PRERELEASELOOSE] + ')?' +
+ src[BUILD] + '?' +
+ ')?)?'
+
+var XRANGE = R++
+src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
+var XRANGELOOSE = R++
+src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+var COERCE = R++
+src[COERCE] = '(?:^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])'
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+var LONETILDE = R++
+src[LONETILDE] = '(?:~>?)'
+
+var TILDETRIM = R++
+src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
+re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
+var tildeTrimReplace = '$1~'
+
+var TILDE = R++
+src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
+var TILDELOOSE = R++
+src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+var LONECARET = R++
+src[LONECARET] = '(?:\\^)'
+
+var CARETTRIM = R++
+src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
+re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
+var caretTrimReplace = '$1^'
+
+var CARET = R++
+src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
+var CARETLOOSE = R++
+src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+var COMPARATORLOOSE = R++
+src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
+var COMPARATOR = R++
+src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+var COMPARATORTRIM = R++
+src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
+ '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
+
+// this one has to use the /g flag
+re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
+var comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+var HYPHENRANGE = R++
+src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAIN] + ')' +
+ '\\s*$'
+
+var HYPHENRANGELOOSE = R++
+src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[XRANGEPLAINLOOSE] + ')' +
+ '\\s*$'
+
+// Star ranges basically just allow anything at all.
+var STAR = R++
+src[STAR] = '(<|>)?=?\\s*\\*'
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i])
+ if (!re[i]) {
+ re[i] = new RegExp(src[i])
+ }
+}
+
+exports.parse = parse
+function parse (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ var r = options.loose ? re[LOOSE] : re[FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+exports.valid = valid
+function valid (version, options) {
+ var v = parse(version, options)
+ return v ? v.version : null
+}
+
+exports.clean = clean
+function clean (version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+
+exports.SemVer = SemVer
+
+function SemVer (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+ }
+
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options)
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+
+ var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
+
+ if (!m) {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map(function (id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+}
+
+SemVer.prototype.format = function () {
+ this.version = this.major + '.' + this.minor + '.' + this.patch
+ if (this.prerelease.length) {
+ this.version += '-' + this.prerelease.join('.')
+ }
+ return this.version
+}
+
+SemVer.prototype.toString = function () {
+ return this.version
+}
+
+SemVer.prototype.compare = function (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+}
+
+SemVer.prototype.compareMain = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+}
+
+SemVer.prototype.comparePre = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ var i = 0
+ do {
+ var a = this.prerelease[i]
+ var b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ var i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error('invalid increment argument: ' + release)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+}
+
+exports.inc = inc
+function inc (version, release, loose, identifier) {
+ if (typeof (loose) === 'string') {
+ identifier = loose
+ loose = undefined
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+
+exports.diff = diff
+function diff (version1, version2) {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ var v1 = parse(version1)
+ var v2 = parse(version2)
+ var prefix = ''
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = 'pre'
+ var defaultResult = 'prerelease'
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers
+
+var numeric = /^[0-9]+$/
+function compareIdentifiers (a, b) {
+ var anum = numeric.test(a)
+ var bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers
+function rcompareIdentifiers (a, b) {
+ return compareIdentifiers(b, a)
+}
+
+exports.major = major
+function major (a, loose) {
+ return new SemVer(a, loose).major
+}
+
+exports.minor = minor
+function minor (a, loose) {
+ return new SemVer(a, loose).minor
+}
+
+exports.patch = patch
+function patch (a, loose) {
+ return new SemVer(a, loose).patch
+}
+
+exports.compare = compare
+function compare (a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose))
+}
+
+exports.compareLoose = compareLoose
+function compareLoose (a, b) {
+ return compare(a, b, true)
+}
+
+exports.rcompare = rcompare
+function rcompare (a, b, loose) {
+ return compare(b, a, loose)
+}
+
+exports.sort = sort
+function sort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compare(a, b, loose)
+ })
+}
+
+exports.rsort = rsort
+function rsort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.rcompare(a, b, loose)
+ })
+}
+
+exports.gt = gt
+function gt (a, b, loose) {
+ return compare(a, b, loose) > 0
+}
+
+exports.lt = lt
+function lt (a, b, loose) {
+ return compare(a, b, loose) < 0
+}
+
+exports.eq = eq
+function eq (a, b, loose) {
+ return compare(a, b, loose) === 0
+}
+
+exports.neq = neq
+function neq (a, b, loose) {
+ return compare(a, b, loose) !== 0
+}
+
+exports.gte = gte
+function gte (a, b, loose) {
+ return compare(a, b, loose) >= 0
+}
+
+exports.lte = lte
+function lte (a, b, loose) {
+ return compare(a, b, loose) <= 0
+}
+
+exports.cmp = cmp
+function cmp (a, op, b, loose) {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError('Invalid operator: ' + op)
+ }
+}
+
+exports.Comparator = Comparator
+function Comparator (comp, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options)
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+}
+
+var ANY = {}
+Comparator.prototype.parse = function (comp) {
+ var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
+ var m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError('Invalid comparator: ' + comp)
+ }
+
+ this.operator = m[1]
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+}
+
+Comparator.prototype.toString = function () {
+ return this.value
+}
+
+Comparator.prototype.test = function (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ version = new SemVer(version, this.options)
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+}
+
+Comparator.prototype.intersects = function (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ var rangeTmp
+
+ if (this.operator === '') {
+ rangeTmp = new Range(comp.value, options)
+ return satisfies(this.value, rangeTmp, options)
+ } else if (comp.operator === '') {
+ rangeTmp = new Range(this.value, options)
+ return satisfies(comp.semver, rangeTmp, options)
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ var sameSemVer = this.semver.version === comp.semver.version
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'))
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'))
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
+}
+
+exports.Range = Range
+function Range (range, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, options)
+ }
+
+ if (!(this instanceof Range)) {
+ return new Range(range, options)
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range.split(/\s*\|\|\s*/).map(function (range) {
+ return this.parseRange(range.trim())
+ }, this).filter(function (c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length
+ })
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range)
+ }
+
+ this.format()
+}
+
+Range.prototype.format = function () {
+ this.range = this.set.map(function (comps) {
+ return comps.join(' ').trim()
+ }).join('||').trim()
+ return this.range
+}
+
+Range.prototype.toString = function () {
+ return this.range
+}
+
+Range.prototype.parseRange = function (range) {
+ var loose = this.options.loose
+ range = range.trim()
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace)
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range, re[COMPARATORTRIM])
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
+ var set = range.split(' ').map(function (comp) {
+ return parseComparator(comp, this.options)
+ }, this).join(' ').split(/\s+/)
+ if (this.options.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function (comp) {
+ return !!comp.match(compRe)
+ })
+ }
+ set = set.map(function (comp) {
+ return new Comparator(comp, this.options)
+ }, this)
+
+ return set
+}
+
+Range.prototype.intersects = function (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some(function (thisComparators) {
+ return thisComparators.every(function (thisComparator) {
+ return range.set.some(function (rangeComparators) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ })
+ })
+}
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators
+function toComparators (range, options) {
+ return new Range(range, options).set.map(function (comp) {
+ return comp.map(function (c) {
+ return c.value
+ }).join(' ').trim().split(' ')
+ })
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator (comp, options) {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+function isX (id) {
+ return !id || id.toLowerCase() === 'x' || id === '*'
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceTilde(comp, options)
+ }).join(' ')
+}
+
+function replaceTilde (comp, options) {
+ var r = options.loose ? re[TILDELOOSE] : re[TILDE]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceCaret(comp, options)
+ }).join(' ')
+}
+
+function replaceCaret (comp, options) {
+ debug('caret', comp, options)
+ var r = options.loose ? re[CARETLOOSE] : re[CARET]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+function replaceXRanges (comp, options) {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map(function (comp) {
+ return replaceXRange(comp, options)
+ }).join(' ')
+}
+
+function replaceXRange (comp, options) {
+ comp = comp.trim()
+ var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
+ return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ var xM = isX(M)
+ var xm = xM || isX(m)
+ var xp = xm || isX(p)
+ var anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p
+ } else if (xm) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars (comp, options) {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[STAR], '')
+}
+
+// This function is passed to string.replace(re[HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = '>=' + fM + '.0.0'
+ } else if (isX(fp)) {
+ from = '>=' + fM + '.' + fm + '.0'
+ } else {
+ from = '>=' + from
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = '<' + (+tM + 1) + '.0.0'
+ } else if (isX(tp)) {
+ to = '<' + tM + '.' + (+tm + 1) + '.0'
+ } else if (tpr) {
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
+ } else {
+ to = '<=' + to
+ }
+
+ return (from + ' ' + to).trim()
+}
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ version = new SemVer(version, this.options)
+ }
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+}
+
+function testSet (set, version, options) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
+
+exports.satisfies = satisfies
+function satisfies (version, range, options) {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+
+exports.maxSatisfying = maxSatisfying
+function maxSatisfying (versions, range, options) {
+ var max = null
+ var maxSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+
+exports.minSatisfying = minSatisfying
+function minSatisfying (versions, range, options) {
+ var min = null
+ var minSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+
+exports.minVersion = minVersion
+function minVersion (range, loose) {
+ range = new Range(range, loose)
+
+ var minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ comparators.forEach(function (comparator) {
+ // Clone to avoid manipulating the comparator's semver object.
+ var compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!minver || gt(minver, compver)) {
+ minver = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error('Unexpected operation: ' + comparator.operator)
+ }
+ })
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+
+exports.validRange = validRange
+function validRange (range, options) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr
+function ltr (version, range, options) {
+ return outside(version, range, '<', options)
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr
+function gtr (version, range, options) {
+ return outside(version, range, '>', options)
+}
+
+exports.outside = outside
+function outside (version, range, hilo, options) {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ var gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ var high = null
+ var low = null
+
+ comparators.forEach(function (comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+exports.prerelease = prerelease
+function prerelease (version, options) {
+ var parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+
+exports.intersects = intersects
+function intersects (r1, r2, options) {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+
+exports.coerce = coerce
+function coerce (version) {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ var match = version.match(re[COERCE])
+
+ if (match == null) {
+ return null
+ }
+
+ return parse(match[1] +
+ '.' + (match[2] || '0') +
+ '.' + (match[3] || '0'))
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/LICENSE b/tools/node_modules/@babel/core/node_modules/source-map/LICENSE
index ed1b7cf27e9..ed1b7cf27e9 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/LICENSE
+++ b/tools/node_modules/@babel/core/node_modules/source-map/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/README.md b/tools/node_modules/@babel/core/node_modules/source-map/README.md
index 32813394ad1..32813394ad1 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/README.md
+++ b/tools/node_modules/@babel/core/node_modules/source-map/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js
index b5ab6382abb..b5ab6382abb 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.debug.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.js
index 4e630e29434..4e630e29434 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js
index f2a46bd0253..f2a46bd0253 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/dist/source-map.min.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/array-set.js
index fbd5c81cae6..fbd5c81cae6 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/array-set.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/array-set.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js
index 612b404018e..612b404018e 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64-vlq.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64.js
index 8aa86b30264..8aa86b30264 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/base64.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/base64.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js
index 010ac941e15..010ac941e15 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/binary-search.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js
index 06d1274a025..06d1274a025 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/mapping-list.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js
index 6a7caadbbdb..6a7caadbbdb 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/quick-sort.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js
index 6abcc280eea..6abcc280eea 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-consumer.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js
index aff1e7fb268..aff1e7fb268 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-map-generator.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-node.js
index d196a53f8c0..d196a53f8c0 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/source-node.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/source-node.js
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js b/tools/node_modules/@babel/core/node_modules/source-map/lib/util.js
index 44e0e452052..44e0e452052 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/lib/util.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/lib/util.js
diff --git a/tools/node_modules/@babel/core/node_modules/source-map/package.json b/tools/node_modules/@babel/core/node_modules/source-map/package.json
new file mode 100644
index 00000000000..048e3ae8609
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/source-map/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "source-map",
+ "description": "Generates and consumes source maps",
+ "version": "0.5.7",
+ "homepage": "https://github.com/mozilla/source-map",
+ "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",
+ "contributors": [
+ "Tobias Koppers <tobias.koppers@googlemail.com>",
+ "Duncan Beevers <duncan@dweebd.com>",
+ "Stephen Crane <scrane@mozilla.com>",
+ "Ryan Seddon <seddon.ryan@gmail.com>",
+ "Miles Elam <miles.elam@deem.com>",
+ "Mihai Bazon <mihai.bazon@gmail.com>",
+ "Michael Ficarra <github.public.email@michael.ficarra.me>",
+ "Todd Wolfson <todd@twolfson.com>",
+ "Alexander Solovyov <alexander@solovyov.net>",
+ "Felix Gnass <fgnass@gmail.com>",
+ "Conrad Irwin <conrad.irwin@gmail.com>",
+ "usrbincc <usrbincc@yahoo.com>",
+ "David Glasser <glasser@davidglasser.net>",
+ "Chase Douglas <chase@newrelic.com>",
+ "Evan Wallace <evan.exe@gmail.com>",
+ "Heather Arthur <fayearthur@gmail.com>",
+ "Hugh Kennedy <hughskennedy@gmail.com>",
+ "David Glasser <glasser@davidglasser.net>",
+ "Simon Lydell <simon.lydell@gmail.com>",
+ "Jmeas Smith <jellyes2@gmail.com>",
+ "Michael Z Goddard <mzgoddard@gmail.com>",
+ "azu <azu@users.noreply.github.com>",
+ "John Gozde <john@gozde.ca>",
+ "Adam Kirkton <akirkton@truefitinnovation.com>",
+ "Chris Montgomery <christopher.montgomery@dowjones.com>",
+ "J. Ryan Stinnett <jryans@gmail.com>",
+ "Jack Herrington <jherrington@walmartlabs.com>",
+ "Chris Truter <jeffpalentine@gmail.com>",
+ "Daniel Espeset <daniel@danielespeset.com>",
+ "Jamie Wong <jamie.lf.wong@gmail.com>",
+ "Eddy Bruël <ejpbruel@mozilla.com>",
+ "Hawken Rives <hawkrives@gmail.com>",
+ "Gilad Peleg <giladp007@gmail.com>",
+ "djchie <djchie.dev@gmail.com>",
+ "Gary Ye <garysye@gmail.com>",
+ "Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/mozilla/source-map.git"
+ },
+ "main": "./source-map.js",
+ "files": [
+ "source-map.js",
+ "lib/",
+ "dist/source-map.debug.js",
+ "dist/source-map.js",
+ "dist/source-map.min.js",
+ "dist/source-map.min.js.map"
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "license": "BSD-3-Clause",
+ "scripts": {
+ "test": "npm run build && node test/run-tests.js",
+ "build": "webpack --color",
+ "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
+ },
+ "devDependencies": {
+ "doctoc": "^0.15.0",
+ "webpack": "^1.12.0"
+ },
+ "typings": "source-map"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/source-map.js b/tools/node_modules/@babel/core/node_modules/source-map/source-map.js
index bc88fe820c8..bc88fe820c8 100644
--- a/tools/node_modules/babel-eslint/node_modules/source-map/source-map.js
+++ b/tools/node_modules/@babel/core/node_modules/source-map/source-map.js
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js b/tools/node_modules/@babel/core/node_modules/supports-color/browser.js
index 62afa3a7425..62afa3a7425 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/browser.js
+++ b/tools/node_modules/@babel/core/node_modules/supports-color/browser.js
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/index.js b/tools/node_modules/@babel/core/node_modules/supports-color/index.js
index 1704131bdf6..1704131bdf6 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/index.js
+++ b/tools/node_modules/@babel/core/node_modules/supports-color/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/license b/tools/node_modules/@babel/core/node_modules/supports-color/license
index e7af2f77107..e7af2f77107 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/license
+++ b/tools/node_modules/@babel/core/node_modules/supports-color/license
diff --git a/tools/node_modules/@babel/core/node_modules/supports-color/package.json b/tools/node_modules/@babel/core/node_modules/supports-color/package.json
new file mode 100644
index 00000000000..ad199f5cdb0
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/supports-color/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "supports-color",
+ "version": "5.5.0",
+ "description": "Detect whether a terminal supports color",
+ "license": "MIT",
+ "repository": "chalk/supports-color",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "browser.js"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect",
+ "truecolor",
+ "16m"
+ ],
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "^0.25.0",
+ "import-fresh": "^2.0.0",
+ "xo": "^0.20.0"
+ },
+ "browser": "browser.js"
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md b/tools/node_modules/@babel/core/node_modules/supports-color/readme.md
index f6e40195730..f6e40195730 100644
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/supports-color/readme.md
diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/index.js b/tools/node_modules/@babel/core/node_modules/to-fast-properties/index.js
index 028c88af01d..028c88af01d 100644
--- a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/index.js
+++ b/tools/node_modules/@babel/core/node_modules/to-fast-properties/index.js
diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/license b/tools/node_modules/@babel/core/node_modules/to-fast-properties/license
index cef79eff984..cef79eff984 100644
--- a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/license
+++ b/tools/node_modules/@babel/core/node_modules/to-fast-properties/license
diff --git a/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json b/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json
new file mode 100644
index 00000000000..7a64b2ccb13
--- /dev/null
+++ b/tools/node_modules/@babel/core/node_modules/to-fast-properties/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "to-fast-properties",
+ "version": "2.0.0",
+ "description": "Force V8 to use fast properties for an object",
+ "license": "MIT",
+ "repository": "sindresorhus/to-fast-properties",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "node --allow-natives-syntax test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "object",
+ "obj",
+ "properties",
+ "props",
+ "v8",
+ "optimize",
+ "fast",
+ "convert",
+ "mode"
+ ],
+ "devDependencies": {
+ "ava": "0.0.4"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/readme.md b/tools/node_modules/@babel/core/node_modules/to-fast-properties/readme.md
index 692101d661d..692101d661d 100644
--- a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/readme.md
+++ b/tools/node_modules/@babel/core/node_modules/to-fast-properties/readme.md
diff --git a/tools/node_modules/@babel/core/package.json b/tools/node_modules/@babel/core/package.json
new file mode 100644
index 00000000000..5f93e494ea7
--- /dev/null
+++ b/tools/node_modules/@babel/core/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@babel/core",
+ "version": "7.12.9",
+ "description": "Babel compiler core.",
+ "main": "lib/index.js",
+ "author": "Sebastian McKenzie <sebmck@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-core"
+ },
+ "keywords": [
+ "6to5",
+ "babel",
+ "classes",
+ "const",
+ "es6",
+ "harmony",
+ "let",
+ "modules",
+ "transpile",
+ "transpiler",
+ "var",
+ "babel-core",
+ "compiler"
+ ],
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ },
+ "browser": {
+ "./lib/config/files/index.js": "./lib/config/files/index-browser.js",
+ "./lib/transform-file.js": "./lib/transform-file-browser.js",
+ "./src/config/files/index.js": "./src/config/files/index-browser.js",
+ "./src/transform-file.js": "./src/transform-file-browser.js"
+ },
+ "dependencies": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/generator": "^7.12.5",
+ "@babel/helper-module-transforms": "^7.12.1",
+ "@babel/helpers": "^7.12.5",
+ "@babel/parser": "^7.12.7",
+ "@babel/template": "^7.12.7",
+ "@babel/traverse": "^7.12.9",
+ "@babel/types": "^7.12.7",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.1",
+ "json5": "^2.1.2",
+ "lodash": "^4.17.19",
+ "resolve": "^1.3.2",
+ "semver": "^5.4.1",
+ "source-map": "^0.5.0"
+ },
+ "devDependencies": {
+ "@babel/helper-transform-fixture-test-runner": "7.12.1"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/core/src/config/files/index-browser.js b/tools/node_modules/@babel/core/src/config/files/index-browser.js
new file mode 100644
index 00000000000..2fb0b6eba1b
--- /dev/null
+++ b/tools/node_modules/@babel/core/src/config/files/index-browser.js
@@ -0,0 +1,96 @@
+// @flow
+
+import type { Handler } from "gensync";
+
+import type {
+ ConfigFile,
+ IgnoreFile,
+ RelativeConfig,
+ FilePackageData,
+} from "./types";
+
+import type { CallerMetadata } from "../validation/options";
+
+export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };
+
+// eslint-disable-next-line require-yield
+export function* findConfigUpwards(
+ rootDir: string, // eslint-disable-line no-unused-vars
+): Handler<string | null> {
+ return null;
+}
+
+// eslint-disable-next-line require-yield
+export function* findPackageData(filepath: string): Handler<FilePackageData> {
+ return {
+ filepath,
+ directories: [],
+ pkg: null,
+ isPackage: false,
+ };
+}
+
+// eslint-disable-next-line require-yield
+export function* findRelativeConfig(
+ pkgData: FilePackageData, // eslint-disable-line no-unused-vars
+ envName: string, // eslint-disable-line no-unused-vars
+ caller: CallerMetadata | void, // eslint-disable-line no-unused-vars
+): Handler<RelativeConfig> {
+ return { pkg: null, config: null, ignore: null };
+}
+
+// eslint-disable-next-line require-yield
+export function* findRootConfig(
+ dirname: string, // eslint-disable-line no-unused-vars
+ envName: string, // eslint-disable-line no-unused-vars
+ caller: CallerMetadata | void, // eslint-disable-line no-unused-vars
+): Handler<ConfigFile | null> {
+ return null;
+}
+
+// eslint-disable-next-line require-yield
+export function* loadConfig(
+ name: string,
+ dirname: string,
+ envName: string, // eslint-disable-line no-unused-vars
+ caller: CallerMetadata | void, // eslint-disable-line no-unused-vars
+): Handler<ConfigFile> {
+ throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
+}
+
+// eslint-disable-next-line require-yield
+export function* resolveShowConfigPath(
+ dirname: string, // eslint-disable-line no-unused-vars
+): Handler<string | null> {
+ return null;
+}
+
+export const ROOT_CONFIG_FILENAMES = [];
+
+// eslint-disable-next-line no-unused-vars
+export function resolvePlugin(name: string, dirname: string): string | null {
+ return null;
+}
+
+// eslint-disable-next-line no-unused-vars
+export function resolvePreset(name: string, dirname: string): string | null {
+ return null;
+}
+
+export function loadPlugin(
+ name: string,
+ dirname: string,
+): { filepath: string, value: mixed } {
+ throw new Error(
+ `Cannot load plugin ${name} relative to ${dirname} in a browser`,
+ );
+}
+
+export function loadPreset(
+ name: string,
+ dirname: string,
+): { filepath: string, value: mixed } {
+ throw new Error(
+ `Cannot load preset ${name} relative to ${dirname} in a browser`,
+ );
+}
diff --git a/tools/node_modules/@babel/core/src/config/files/index.js b/tools/node_modules/@babel/core/src/config/files/index.js
new file mode 100644
index 00000000000..2321fb7605d
--- /dev/null
+++ b/tools/node_modules/@babel/core/src/config/files/index.js
@@ -0,0 +1,31 @@
+// @flow
+
+import typeof * as indexBrowserType from "./index-browser";
+import typeof * as indexType from "./index";
+
+// Kind of gross, but essentially asserting that the exports of this module are the same as the
+// exports of index-browser, since this file may be replaced at bundle time with index-browser.
+((({}: any): $Exact<indexBrowserType>): $Exact<indexType>);
+
+export { findPackageData } from "./package";
+
+export {
+ findConfigUpwards,
+ findRelativeConfig,
+ findRootConfig,
+ loadConfig,
+ resolveShowConfigPath,
+ ROOT_CONFIG_FILENAMES,
+} from "./configuration";
+export type {
+ ConfigFile,
+ IgnoreFile,
+ RelativeConfig,
+ FilePackageData,
+} from "./types";
+export {
+ resolvePlugin,
+ resolvePreset,
+ loadPlugin,
+ loadPreset,
+} from "./plugins";
diff --git a/tools/node_modules/@babel/core/src/transform-file-browser.js b/tools/node_modules/@babel/core/src/transform-file-browser.js
new file mode 100644
index 00000000000..fc1b12af0e5
--- /dev/null
+++ b/tools/node_modules/@babel/core/src/transform-file-browser.js
@@ -0,0 +1,29 @@
+// @flow
+
+// duplicated from transform-file so we do not have to import anything here
+type TransformFile = {
+ (filename: string, callback: Function): void,
+ (filename: string, opts: ?Object, callback: Function): void,
+};
+
+export const transformFile: TransformFile = (function transformFile(
+ filename,
+ opts,
+ callback,
+) {
+ if (typeof opts === "function") {
+ callback = opts;
+ }
+
+ callback(new Error("Transforming files is not supported in browsers"), null);
+}: Function);
+
+export function transformFileSync() {
+ throw new Error("Transforming files is not supported in browsers");
+}
+
+export function transformFileAsync() {
+ return Promise.reject(
+ new Error("Transforming files is not supported in browsers"),
+ );
+}
diff --git a/tools/node_modules/@babel/core/src/transform-file.js b/tools/node_modules/@babel/core/src/transform-file.js
new file mode 100644
index 00000000000..480afc1cf6f
--- /dev/null
+++ b/tools/node_modules/@babel/core/src/transform-file.js
@@ -0,0 +1,40 @@
+// @flow
+
+import gensync from "gensync";
+
+import loadConfig, { type InputOptions, type ResolvedConfig } from "./config";
+import {
+ run,
+ type FileResult,
+ type FileResultCallback,
+} from "./transformation";
+import * as fs from "./gensync-utils/fs";
+
+import typeof * as transformFileBrowserType from "./transform-file-browser";
+import typeof * as transformFileType from "./transform-file";
+
+// Kind of gross, but essentially asserting that the exports of this module are the same as the
+// exports of transform-file-browser, since this file may be replaced at bundle time with
+// transform-file-browser.
+((({}: any): $Exact<transformFileBrowserType>): $Exact<transformFileType>);
+
+type TransformFile = {
+ (filename: string, callback: FileResultCallback): void,
+ (filename: string, opts: ?InputOptions, callback: FileResultCallback): void,
+};
+
+const transformFileRunner = gensync<[string, ?InputOptions], FileResult | null>(
+ function* (filename, opts) {
+ const options = { ...opts, filename };
+
+ const config: ResolvedConfig | null = yield* loadConfig(options);
+ if (config === null) return null;
+
+ const code = yield* fs.readFile(filename, "utf8");
+ return yield* run(config, code);
+ },
+);
+
+export const transformFile: TransformFile = transformFileRunner.errback;
+export const transformFileSync = transformFileRunner.sync;
+export const transformFileAsync = transformFileRunner.async;
diff --git a/tools/node_modules/@babel/eslint-parser/LICENSE b/tools/node_modules/@babel/eslint-parser/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/eslint-parser/README.md b/tools/node_modules/@babel/eslint-parser/README.md
new file mode 100644
index 00000000000..8ee13ebda10
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/README.md
@@ -0,0 +1,124 @@
+# @babel/eslint-parser [![npm](https://img.shields.io/npm/v/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) [![travis](https://img.shields.io/travis/babel/@babel/eslint-parser/main.svg)](https://travis-ci.org/babel/@babel/eslint-parser) [![npm-downloads](https://img.shields.io/npm/dm/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser)
+
+**@babel/eslint-parser** allows you to lint **ALL** valid Babel code with the fantastic
+[ESLint](https://github.com/eslint/eslint).
+
+## When should I use @babel/eslint-parser?
+
+ESLint's default parser and core rules [only support the latest final ECMAScript standard](https://github.com/eslint/eslint/blob/a675c89573836adaf108a932696b061946abf1e6/README.md#what-about-experimental-features) and do not support experimental (such as new features) and non-standard (such as Flow or TypeScript types) syntax provided by Babel. @babel/eslint-parser is a parser that allows ESLint to run on source code that is transformed by Babel.
+
+**Note:** You only need to use @babel/parser-eslint if you are using Babel to transform your code. If this is not the case, please use the relevant parser for your chosen flavor of ECMAScript (note that the default parser supports all non-experimental syntax as well as JSX).
+
+## How does it work?
+
+ESLint allows for the use of [custom parsers](https://eslint.org/docs/developer-guide/working-with-custom-parsers). When using this plugin, your code is parsed by Babel's parser (using the configuration specified in your [Babel configuration file](https://babeljs.io/docs/en/configuration)) and the resulting AST is
+transformed into an [ESTree](https://github.com/estree/estree)-compliant structure that ESLint can understand. All location info such as line numbers,
+columns is also retained so you can track down errors with ease.
+
+**Note:** ESLint's core rules do not support experimental syntax and may therefore not work as expected when using `@babel/eslint-parser`. Please use the companion [`@babel/eslint-plugin`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-plugin) plugin for core rules that you have issues with.
+
+## Usage
+
+### Installation
+
+```sh
+$ npm install eslint @babel/core @babel/eslint-parser --save-dev
+# or
+$ yarn add eslint @babel/core @babel/eslint-parser -D
+```
+
+**Note:** @babel/eslint-parser requires `@babel/core@>=7.2.0` and a valid Babel configuration file to run. If you do not have this already set up, please see the [Babel Usage Guide](https://babeljs.io/docs/en/usage).
+
+### Setup
+
+To use @babel/eslint-parser, `"@babel/eslint-parser"` must be specified as the `parser` in your ESLint configuration file (see [here](https://eslint.org/docs/user-guide/configuring#specifying-parser) for more detailed information).
+
+**.eslintrc.js**
+
+```js
+module.exports = {
+ parser: "@babel/eslint-parser",
+};
+```
+
+With the parser set, your configuration can be configured as described in the [Configuring ESLint](https://eslint.org/docs/user-guide/configuring) documentation.
+
+**Note:** The `parserOptions` described in the [official documentation](https://eslint.org/docs/user-guide/configuring#specifying-parser-options) are for the default parser and are not necessarily supported by @babel/eslint-parser. Please see the section directly below for supported `parserOptions`.
+
+### Additional parser configuration
+
+Additional configuration options can be set in your ESLint configuration under the `parserOptions` key. Please note that the `ecmaFeatures` config property may still be required for ESLint to work properly with features not in ECMAScript 5 by default.
+
+- `requireConfigFile` (default `true`) can be set to `false` to allow @babel/eslint-parser to run on files that do not have a Babel configuration associated with them. This can be useful for linting files that are not transformed by Babel (such as tooling configuration files), though we recommend using the default parser via [glob-based configuration](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns). Note: @babel/eslint-parser will not parse any experimental syntax when no configuration file is found.
+- `sourceType` can be set to `"module"`(default) or `"script"` if your code isn't using ECMAScript modules.
+- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level.
+- `ecmaFeatures.globalReturn` (default `false`) allow return statements in the global scope when used with `sourceType: "script"`.
+- `babelOptions` is an object containing Babel configuration [options](https://babeljs.io/docs/en/options) that are passed to Babel's parser at runtime. For cases where users might not want to use a Babel configuration file or are running Babel through another tool (such as Webpack with `babel-loader`).
+
+**.eslintrc.js**
+
+```js
+module.exports = {
+ parser: "@babel/eslint-parser",
+ parserOptions: {
+ sourceType: "module",
+ allowImportExportEverywhere: false,
+ ecmaFeatures: {
+ globalReturn: false,
+ },
+ babelOptions: {
+ configFile: "path/to/config.js",
+ },
+ },
+};
+```
+
+**.eslintrc.js using glob-based configuration**
+
+This configuration would use the default parser for all files except for those found by the `"files/transformed/by/babel/*.js"` glob.
+
+```js
+module.exports = {
+ rules: {
+ indent: "error",
+ },
+ overrides: [
+ {
+ files: ["files/transformed/by/babel/*.js"],
+ parser: "@babel/eslint-parser",
+ },
+ ],
+};
+```
+
+### Run
+
+```sh
+$ ./node_modules/.bin/eslint yourfile.js
+```
+
+## Known issues
+
+Flow:
+
+> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`.
+
+- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/@babel/eslint-parser/issues/130#issuecomment-111215076)
+ - Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'`
+- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/@babel/eslint-parser/issues/132#issuecomment-112815926)
+
+Modules/strict mode
+
+- `no-unused-vars: ["error", { vars: local }]` [#136](https://github.com/babel/@babel/eslint-parser/issues/136)
+
+Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues.
+
+- `no-unused-vars` with jsx
+
+Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues.
+
+## Questions and support
+
+If you have an issue, please first check if it can be reproduced with the default parser and with the latest versions of `eslint` and `@babel/eslint-parser`. If it is not reproducible with the default parser, it is most likely an issue with `@babel/eslint-parser`.
+
+For questions and support please visit the [`#discussion`](https://babeljs.slack.com/messages/discussion/) Babel Slack channel (sign up [here](https://github.com/babel/notes/issues/38)) or the ESLint [Gitter](https://gitter.im/eslint/eslint).
diff --git a/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js b/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js
new file mode 100644
index 00000000000..30dffb67110
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/analyze-scope.js
@@ -0,0 +1,356 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = analyzeScope;
+
+var _core = require("@babel/core");
+
+var _eslintScope = _interopRequireDefault(require("eslint-scope"));
+
+var _definition = require("eslint-scope/lib/definition");
+
+var _patternVisitor = _interopRequireDefault(require("eslint-scope/lib/pattern-visitor"));
+
+var _referencer = _interopRequireDefault(require("eslint-scope/lib/referencer"));
+
+var _eslintVisitorKeys = require("eslint-visitor-keys");
+
+var _visitorKeys = _interopRequireDefault(require("./visitor-keys"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+const flowFlippedAliasKeys = _core.types.FLIPPED_ALIAS_KEYS.Flow.concat(["ArrayPattern", "ClassDeclaration", "ClassExpression", "FunctionDeclaration", "FunctionExpression", "Identifier", "ObjectPattern", "RestElement"]);
+
+const visitorKeysMap = Object.entries(_core.types.VISITOR_KEYS).reduce((acc, [key, value]) => {
+ if (!flowFlippedAliasKeys.includes(value)) {
+ acc[key] = value;
+ }
+
+ return acc;
+}, {});
+const propertyTypes = {
+ callProperties: {
+ type: "loop",
+ values: ["value"]
+ },
+ indexers: {
+ type: "loop",
+ values: ["key", "value"]
+ },
+ properties: {
+ type: "loop",
+ values: ["argument", "value"]
+ },
+ types: {
+ type: "loop"
+ },
+ params: {
+ type: "loop"
+ },
+ argument: {
+ type: "single"
+ },
+ elementType: {
+ type: "single"
+ },
+ qualification: {
+ type: "single"
+ },
+ rest: {
+ type: "single"
+ },
+ returnType: {
+ type: "single"
+ },
+ typeAnnotation: {
+ type: "typeAnnotation"
+ },
+ typeParameters: {
+ type: "typeParameters"
+ },
+ id: {
+ type: "id"
+ }
+};
+
+class PatternVisitor extends _patternVisitor.default {
+ ArrayPattern(node) {
+ node.elements.forEach(this.visit, this);
+ }
+
+ ObjectPattern(node) {
+ node.properties.forEach(this.visit, this);
+ }
+
+}
+
+class Referencer extends _referencer.default {
+ visitPattern(node, options, callback) {
+ if (!node) {
+ return;
+ }
+
+ this._checkIdentifierOrVisit(node.typeAnnotation);
+
+ if (_core.types.isAssignmentPattern(node)) {
+ this._checkIdentifierOrVisit(node.left.typeAnnotation);
+ }
+
+ if (typeof options === "function") {
+ callback = options;
+ options = {
+ processRightHandNodes: false
+ };
+ }
+
+ const visitor = new PatternVisitor(this.options, node, callback);
+ visitor.visit(node);
+
+ if (options.processRightHandNodes) {
+ visitor.rightHandNodes.forEach(this.visit, this);
+ }
+ }
+
+ visitClass(node) {
+ this._visitArray(node.decorators);
+
+ const typeParamScope = this._nestTypeParamScope(node);
+
+ this._visitTypeAnnotation(node.implements);
+
+ this._visitTypeAnnotation(node.superTypeParameters && node.superTypeParameters.params);
+
+ super.visitClass(node);
+
+ if (typeParamScope) {
+ this.close(node);
+ }
+ }
+
+ visitFunction(node) {
+ const typeParamScope = this._nestTypeParamScope(node);
+
+ this._checkIdentifierOrVisit(node.returnType);
+
+ super.visitFunction(node);
+
+ if (typeParamScope) {
+ this.close(node);
+ }
+ }
+
+ visitProperty(node) {
+ var _node$value;
+
+ if (((_node$value = node.value) == null ? void 0 : _node$value.type) === "TypeCastExpression") {
+ this._visitTypeAnnotation(node.value);
+ }
+
+ this._visitArray(node.decorators);
+
+ super.visitProperty(node);
+ }
+
+ InterfaceDeclaration(node) {
+ this._createScopeVariable(node, node.id);
+
+ const typeParamScope = this._nestTypeParamScope(node);
+
+ this._visitArray(node.extends);
+
+ this.visit(node.body);
+
+ if (typeParamScope) {
+ this.close(node);
+ }
+ }
+
+ TypeAlias(node) {
+ this._createScopeVariable(node, node.id);
+
+ const typeParamScope = this._nestTypeParamScope(node);
+
+ this.visit(node.right);
+
+ if (typeParamScope) {
+ this.close(node);
+ }
+ }
+
+ ClassProperty(node) {
+ this._visitClassProperty(node);
+ }
+
+ ClassPrivateProperty(node) {
+ this._visitClassProperty(node);
+ }
+
+ ClassPrivateMethod(node) {
+ super.MethodDefinition(node);
+ }
+
+ DeclareModule(node) {
+ this._visitDeclareX(node);
+ }
+
+ DeclareFunction(node) {
+ this._visitDeclareX(node);
+ }
+
+ DeclareVariable(node) {
+ this._visitDeclareX(node);
+ }
+
+ DeclareClass(node) {
+ this._visitDeclareX(node);
+ }
+
+ OptionalMemberExpression(node) {
+ super.MemberExpression(node);
+ }
+
+ _visitClassProperty(node) {
+ this._visitTypeAnnotation(node.typeAnnotation);
+
+ this.visitProperty(node);
+ }
+
+ _visitDeclareX(node) {
+ if (node.id) {
+ this._createScopeVariable(node, node.id);
+ }
+
+ const typeParamScope = this._nestTypeParamScope(node);
+
+ if (typeParamScope) {
+ this.close(node);
+ }
+ }
+
+ _createScopeVariable(node, name) {
+ this.currentScope().variableScope.__define(name, new _definition.Definition("Variable", name, node, null, null, null));
+ }
+
+ _nestTypeParamScope(node) {
+ if (!node.typeParameters) {
+ return null;
+ }
+
+ const parentScope = this.scopeManager.__currentScope;
+ const scope = new _eslintScope.default.Scope(this.scopeManager, "type-parameters", parentScope, node, false);
+
+ this.scopeManager.__nestScope(scope);
+
+ for (let j = 0; j < node.typeParameters.params.length; j++) {
+ const name = node.typeParameters.params[j];
+
+ scope.__define(name, new _definition.Definition("TypeParameter", name, name));
+
+ if (name.typeAnnotation) {
+ this._checkIdentifierOrVisit(name);
+ }
+ }
+
+ scope.__define = function () {
+ return parentScope.__define.apply(parentScope, arguments);
+ };
+
+ return scope;
+ }
+
+ _visitTypeAnnotation(node) {
+ if (!node) {
+ return;
+ }
+
+ if (Array.isArray(node)) {
+ node.forEach(this._visitTypeAnnotation, this);
+ return;
+ }
+
+ const visitorValues = visitorKeysMap[node.type];
+
+ if (!visitorValues) {
+ return;
+ }
+
+ for (let i = 0; i < visitorValues.length; i++) {
+ const visitorValue = visitorValues[i];
+ const propertyType = propertyTypes[visitorValue];
+ const nodeProperty = node[visitorValue];
+
+ if (propertyType == null || nodeProperty == null) {
+ continue;
+ }
+
+ if (propertyType.type === "loop") {
+ for (let j = 0; j < nodeProperty.length; j++) {
+ if (Array.isArray(propertyType.values)) {
+ for (let k = 0; k < propertyType.values.length; k++) {
+ const loopPropertyNode = nodeProperty[j][propertyType.values[k]];
+
+ if (loopPropertyNode) {
+ this._checkIdentifierOrVisit(loopPropertyNode);
+ }
+ }
+ } else {
+ this._checkIdentifierOrVisit(nodeProperty[j]);
+ }
+ }
+ } else if (propertyType.type === "single") {
+ this._checkIdentifierOrVisit(nodeProperty);
+ } else if (propertyType.type === "typeAnnotation") {
+ this._visitTypeAnnotation(node.typeAnnotation);
+ } else if (propertyType.type === "typeParameters") {
+ for (let l = 0; l < node.typeParameters.params.length; l++) {
+ this._checkIdentifierOrVisit(node.typeParameters.params[l]);
+ }
+ } else if (propertyType.type === "id") {
+ if (node.id.type === "Identifier") {
+ this._checkIdentifierOrVisit(node.id);
+ } else {
+ this._visitTypeAnnotation(node.id);
+ }
+ }
+ }
+ }
+
+ _checkIdentifierOrVisit(node) {
+ if (node == null ? void 0 : node.typeAnnotation) {
+ this._visitTypeAnnotation(node.typeAnnotation);
+ } else if ((node == null ? void 0 : node.type) === "Identifier") {
+ this.visit(node);
+ } else {
+ this._visitTypeAnnotation(node);
+ }
+ }
+
+ _visitArray(nodeList) {
+ if (nodeList) {
+ for (const node of nodeList) {
+ this.visit(node);
+ }
+ }
+ }
+
+}
+
+function analyzeScope(ast, parserOptions) {
+ const options = {
+ ignoreEval: true,
+ optimistic: false,
+ directive: false,
+ nodejsScope: ast.sourceType === "script" && (parserOptions.ecmaFeatures && parserOptions.ecmaFeatures.globalReturn) === true,
+ impliedStrict: false,
+ sourceType: ast.sourceType,
+ ecmaVersion: parserOptions.ecmaVersion,
+ fallback: _eslintVisitorKeys.getKeys
+ };
+ options.childVisitorKeys = _visitorKeys.default;
+ const scopeManager = new _eslintScope.default.ScopeManager(options);
+ const referencer = new Referencer(options, scopeManager);
+ referencer.visit(ast);
+ return scopeManager;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/configuration.js b/tools/node_modules/@babel/eslint-parser/lib/configuration.js
new file mode 100644
index 00000000000..e8883cc58a5
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/configuration.js
@@ -0,0 +1,66 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.normalizeESLintConfig = normalizeESLintConfig;
+exports.normalizeBabelParseConfig = normalizeBabelParseConfig;
+
+var _core = require("@babel/core");
+
+function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
+
+function normalizeESLintConfig(options) {
+ const {
+ babelOptions = {},
+ ecmaVersion = 2020,
+ sourceType = "module",
+ allowImportExportEverywhere = false,
+ requireConfigFile = true
+ } = options,
+ otherOptions = _objectWithoutPropertiesLoose(options, ["babelOptions", "ecmaVersion", "sourceType", "allowImportExportEverywhere", "requireConfigFile"]);
+
+ return Object.assign({
+ babelOptions,
+ ecmaVersion,
+ sourceType,
+ allowImportExportEverywhere,
+ requireConfigFile
+ }, otherOptions);
+}
+
+function normalizeBabelParseConfig(options) {
+ var _options$babelOptions, _options$babelOptions2;
+
+ const parseOptions = Object.assign({
+ sourceType: options.sourceType,
+ filename: options.filePath
+ }, options.babelOptions, {
+ parserOpts: Object.assign({
+ allowImportExportEverywhere: options.allowImportExportEverywhere,
+ allowReturnOutsideFunction: true,
+ allowSuperOutsideMethod: true
+ }, options.babelOptions.parserOpts, {
+ plugins: ["estree", ...((_options$babelOptions = (_options$babelOptions2 = options.babelOptions.parserOpts) == null ? void 0 : _options$babelOptions2.plugins) != null ? _options$babelOptions : [])],
+ ranges: true,
+ tokens: true
+ }),
+ caller: Object.assign({
+ name: "@babel/eslint-parser"
+ }, options.babelOptions.caller)
+ });
+
+ if (options.requireConfigFile !== false) {
+ const config = (0, _core.loadPartialConfig)(parseOptions);
+
+ if (config !== null) {
+ if (!config.hasFilesystemConfig()) {
+ throw new Error(`No Babel config file detected for ${config.options.filename}. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.`);
+ }
+
+ return config.options;
+ }
+ }
+
+ return parseOptions;
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js
new file mode 100644
index 00000000000..4b9496c95fa
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertAST.js
@@ -0,0 +1,158 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = convertAST;
+
+var _core = require("@babel/core");
+
+var _visitorKeys = require("../visitor-keys");
+
+function convertNodes(ast, code) {
+ const astTransformVisitor = {
+ noScope: true,
+
+ enter(path) {
+ const {
+ node
+ } = path;
+
+ if (node.innerComments) {
+ delete node.innerComments;
+ }
+
+ if (node.trailingComments) {
+ delete node.trailingComments;
+ }
+
+ if (node.leadingComments) {
+ delete node.leadingComments;
+ }
+ },
+
+ exit(path) {
+ const {
+ node
+ } = path;
+
+ if (node.extra) {
+ delete node.extra;
+ }
+
+ if (node == null ? void 0 : node.loc.identifierName) {
+ delete node.loc.identifierName;
+ }
+
+ if (path.isTypeParameter()) {
+ node.type = "Identifier";
+ node.typeAnnotation = node.bound;
+ delete node.bound;
+ }
+
+ if (path.isQualifiedTypeIdentifier()) {
+ delete node.id;
+ }
+
+ if (path.isObjectTypeProperty()) {
+ delete node.key;
+ }
+
+ if (path.isObjectTypeIndexer()) {
+ delete node.id;
+ }
+
+ if (path.isFunctionTypeParam()) {
+ delete node.name;
+ }
+
+ if (path.isImportDeclaration()) {
+ delete node.isType;
+ }
+
+ if (path.isTemplateLiteral()) {
+ for (let i = 0; i < node.quasis.length; i++) {
+ const q = node.quasis[i];
+ q.range[0] -= 1;
+
+ if (q.tail) {
+ q.range[1] += 1;
+ } else {
+ q.range[1] += 2;
+ }
+
+ q.loc.start.column -= 1;
+
+ if (q.tail) {
+ q.loc.end.column += 1;
+ } else {
+ q.loc.end.column += 2;
+ }
+ }
+ }
+ }
+
+ };
+ const state = {
+ source: code
+ };
+ const oldVisitorKeys = new Map();
+
+ try {
+ for (const [type, visitorKey] of Object.entries(_visitorKeys.conflictTypes)) {
+ oldVisitorKeys.set(type, _core.types.VISITOR_KEYS[type]);
+ _core.types.VISITOR_KEYS[type] = visitorKey;
+ }
+
+ for (const [type, visitorKey] of Object.entries(_visitorKeys.newTypes)) {
+ _core.types.VISITOR_KEYS[type] = visitorKey;
+ }
+
+ (0, _core.traverse)(ast, astTransformVisitor, null, state);
+ } finally {
+ for (const type of Object.keys(_visitorKeys.newTypes)) {
+ delete _core.types.VISITOR_KEYS[type];
+ }
+
+ for (const type of Object.keys(_visitorKeys.conflictTypes)) {
+ _core.types.VISITOR_KEYS[type] = oldVisitorKeys.get(type);
+ }
+ }
+}
+
+function convertProgramNode(ast) {
+ ast.type = "Program";
+ ast.sourceType = ast.program.sourceType;
+ ast.body = ast.program.body;
+ delete ast.program;
+ delete ast.errors;
+
+ if (ast.comments.length) {
+ const lastComment = ast.comments[ast.comments.length - 1];
+
+ if (ast.tokens.length) {
+ const lastToken = ast.tokens[ast.tokens.length - 1];
+
+ if (lastComment.end > lastToken.end) {
+ ast.range[1] = lastToken.end;
+ ast.loc.end.line = lastToken.loc.end.line;
+ ast.loc.end.column = lastToken.loc.end.column;
+ }
+ }
+ } else {
+ if (!ast.tokens.length) {
+ ast.loc.start.line = 1;
+ ast.loc.end.line = 1;
+ }
+ }
+
+ if (ast.body && ast.body.length > 0) {
+ ast.loc.start.line = ast.body[0].loc.start.line;
+ ast.range[0] = ast.body[0].start;
+ }
+}
+
+function convertAST(ast, code) {
+ convertNodes(ast, code);
+ convertProgramNode(ast);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js
new file mode 100644
index 00000000000..bbe5b610408
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertComments.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = convertComments;
+
+function convertComments(comments) {
+ for (const comment of comments) {
+ if (comment.type === "CommentBlock") {
+ comment.type = "Block";
+ } else if (comment.type === "CommentLine") {
+ comment.type = "Line";
+ }
+
+ if (!comment.range) {
+ comment.range = [comment.start, comment.end];
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js b/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js
new file mode 100644
index 00000000000..6d194e88861
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/convert/convertTokens.js
@@ -0,0 +1,150 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = convertTokens;
+
+var _core = require("@babel/core");
+
+function convertTemplateType(tokens) {
+ let curlyBrace = null;
+ let templateTokens = [];
+ const result = [];
+
+ function addTemplateType() {
+ const start = templateTokens[0];
+ const end = templateTokens[templateTokens.length - 1];
+ const value = templateTokens.reduce((result, token) => {
+ if (token.value) {
+ result += token.value;
+ } else if (token.type !== _core.tokTypes.template) {
+ result += token.type.label;
+ }
+
+ return result;
+ }, "");
+ result.push({
+ type: "Template",
+ value: value,
+ start: start.start,
+ end: end.end,
+ loc: {
+ start: start.loc.start,
+ end: end.loc.end
+ }
+ });
+ templateTokens = [];
+ }
+
+ tokens.forEach(token => {
+ switch (token.type) {
+ case _core.tokTypes.backQuote:
+ if (curlyBrace) {
+ result.push(curlyBrace);
+ curlyBrace = null;
+ }
+
+ templateTokens.push(token);
+
+ if (templateTokens.length > 1) {
+ addTemplateType();
+ }
+
+ break;
+
+ case _core.tokTypes.dollarBraceL:
+ templateTokens.push(token);
+ addTemplateType();
+ break;
+
+ case _core.tokTypes.braceR:
+ if (curlyBrace) {
+ result.push(curlyBrace);
+ }
+
+ curlyBrace = token;
+ break;
+
+ case _core.tokTypes.template:
+ if (curlyBrace) {
+ templateTokens.push(curlyBrace);
+ curlyBrace = null;
+ }
+
+ templateTokens.push(token);
+ break;
+
+ case _core.tokTypes.eof:
+ if (curlyBrace) {
+ result.push(curlyBrace);
+ }
+
+ break;
+
+ default:
+ if (curlyBrace) {
+ result.push(curlyBrace);
+ curlyBrace = null;
+ }
+
+ result.push(token);
+ }
+ });
+ return result;
+}
+
+function convertToken(token, source) {
+ const type = token.type;
+ token.range = [token.start, token.end];
+
+ if (type === _core.tokTypes.name) {
+ token.type = "Identifier";
+ } else if (type === _core.tokTypes.semi || type === _core.tokTypes.comma || type === _core.tokTypes.parenL || type === _core.tokTypes.parenR || type === _core.tokTypes.braceL || type === _core.tokTypes.braceR || type === _core.tokTypes.slash || type === _core.tokTypes.dot || type === _core.tokTypes.bracketL || type === _core.tokTypes.bracketR || type === _core.tokTypes.ellipsis || type === _core.tokTypes.arrow || type === _core.tokTypes.pipeline || type === _core.tokTypes.star || type === _core.tokTypes.incDec || type === _core.tokTypes.colon || type === _core.tokTypes.question || type === _core.tokTypes.template || type === _core.tokTypes.backQuote || type === _core.tokTypes.dollarBraceL || type === _core.tokTypes.at || type === _core.tokTypes.logicalOR || type === _core.tokTypes.logicalAND || type === _core.tokTypes.nullishCoalescing || type === _core.tokTypes.bitwiseOR || type === _core.tokTypes.bitwiseXOR || type === _core.tokTypes.bitwiseAND || type === _core.tokTypes.equality || type === _core.tokTypes.relational || type === _core.tokTypes.bitShift || type === _core.tokTypes.plusMin || type === _core.tokTypes.modulo || type === _core.tokTypes.exponent || type === _core.tokTypes.bang || type === _core.tokTypes.tilde || type === _core.tokTypes.doubleColon || type === _core.tokTypes.hash || type === _core.tokTypes.questionDot || type.isAssign) {
+ token.type = "Punctuator";
+ if (!token.value) token.value = type.label;
+ } else if (type === _core.tokTypes.jsxTagStart) {
+ token.type = "Punctuator";
+ token.value = "<";
+ } else if (type === _core.tokTypes.jsxTagEnd) {
+ token.type = "Punctuator";
+ token.value = ">";
+ } else if (type === _core.tokTypes.jsxName) {
+ token.type = "JSXIdentifier";
+ } else if (type === _core.tokTypes.jsxText) {
+ token.type = "JSXText";
+ } else if (type.keyword === "null") {
+ token.type = "Null";
+ } else if (type.keyword === "false" || type.keyword === "true") {
+ token.type = "Boolean";
+ } else if (type.keyword) {
+ token.type = "Keyword";
+ } else if (type === _core.tokTypes.num) {
+ token.type = "Numeric";
+ token.value = source.slice(token.start, token.end);
+ } else if (type === _core.tokTypes.string) {
+ token.type = "String";
+ token.value = source.slice(token.start, token.end);
+ } else if (type === _core.tokTypes.regexp) {
+ token.type = "RegularExpression";
+ const value = token.value;
+ token.regex = {
+ pattern: value.pattern,
+ flags: value.flags
+ };
+ token.value = `/${value.pattern}/${value.flags}`;
+ } else if (type === _core.tokTypes.bigint) {
+ token.type = "Numeric";
+ token.value = `${token.value}n`;
+ }
+
+ if (typeof token.type !== "string") {
+ delete token.type.rightAssociative;
+ }
+
+ return token;
+}
+
+function convertTokens(tokens, code) {
+ return convertTemplateType(tokens).filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock").map(t => convertToken(t, code));
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/convert/index.js b/tools/node_modules/@babel/eslint-parser/lib/convert/index.js
new file mode 100644
index 00000000000..f7133e22229
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/convert/index.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var _convertTokens = _interopRequireDefault(require("./convertTokens"));
+
+var _convertComments = _interopRequireDefault(require("./convertComments"));
+
+var _convertAST = _interopRequireDefault(require("./convertAST"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _default(ast, code) {
+ ast.tokens = (0, _convertTokens.default)(ast.tokens, code);
+ (0, _convertComments.default)(ast.comments);
+ (0, _convertAST.default)(ast, code);
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/index.js b/tools/node_modules/@babel/eslint-parser/lib/index.js
new file mode 100644
index 00000000000..e61b78c1836
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/index.js
@@ -0,0 +1,68 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.parse = parse;
+exports.parseForESLint = parseForESLint;
+
+var _semver = _interopRequireDefault(require("semver"));
+
+var _core = require("@babel/core");
+
+var _package = _interopRequireDefault(require("../package.json"));
+
+var _configuration = require("./configuration");
+
+var _convert = _interopRequireDefault(require("./convert"));
+
+var _analyzeScope = _interopRequireDefault(require("./analyze-scope"));
+
+var _visitorKeys = _interopRequireDefault(require("./visitor-keys"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+let isRunningMinSupportedCoreVersion = null;
+
+function baseParse(code, options) {
+ const minSupportedCoreVersion = ">=7.2.0";
+
+ if (typeof isRunningMinSupportedCoreVersion !== "boolean") {
+ isRunningMinSupportedCoreVersion = _semver.default.satisfies(_core.version, minSupportedCoreVersion);
+ }
+
+ if (!isRunningMinSupportedCoreVersion) {
+ throw new Error(`@babel/eslint-parser@${_package.default.version} does not support @babel/core@${_core.version}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`);
+ }
+
+ let ast;
+
+ try {
+ ast = (0, _core.parseSync)(code, (0, _configuration.normalizeBabelParseConfig)(options));
+ } catch (err) {
+ if (err instanceof SyntaxError) {
+ err.lineNumber = err.loc.line;
+ err.column = err.loc.column;
+ }
+
+ throw err;
+ }
+
+ (0, _convert.default)(ast, code);
+ return ast;
+}
+
+function parse(code, options = {}) {
+ return baseParse(code, (0, _configuration.normalizeESLintConfig)(options));
+}
+
+function parseForESLint(code, options = {}) {
+ const normalizedOptions = (0, _configuration.normalizeESLintConfig)(options);
+ const ast = baseParse(code, normalizedOptions);
+ const scopeManager = (0, _analyzeScope.default)(ast, normalizedOptions);
+ return {
+ ast,
+ scopeManager,
+ visitorKeys: _visitorKeys.default
+ };
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js b/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js
new file mode 100644
index 00000000000..df9bc9e2b06
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/lib/visitor-keys.js
@@ -0,0 +1,28 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.conflictTypes = exports.newTypes = void 0;
+
+var _core = require("@babel/core");
+
+var _eslintVisitorKeys = require("eslint-visitor-keys");
+
+const newTypes = {
+ ChainExpression: _eslintVisitorKeys.KEYS.ChainExpression,
+ ImportExpression: _eslintVisitorKeys.KEYS.ImportExpression,
+ Literal: _eslintVisitorKeys.KEYS.Literal,
+ MethodDefinition: ["decorators"].concat(_eslintVisitorKeys.KEYS.MethodDefinition),
+ Property: ["decorators"].concat(_eslintVisitorKeys.KEYS.Property)
+};
+exports.newTypes = newTypes;
+const conflictTypes = {
+ ClassPrivateMethod: ["decorators"].concat(_eslintVisitorKeys.KEYS.MethodDefinition),
+ ExportAllDeclaration: _eslintVisitorKeys.KEYS.ExportAllDeclaration
+};
+exports.conflictTypes = conflictTypes;
+
+var _default = Object.assign({}, newTypes, _core.types.VISITOR_KEYS, conflictTypes);
+
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE
new file mode 100644
index 00000000000..d36a526f7ed
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/LICENSE
@@ -0,0 +1,22 @@
+Copyright JS Foundation and other contributors, https://js.foundation
+Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md
new file mode 100644
index 00000000000..7e7ce0d345c
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/README.md
@@ -0,0 +1,54 @@
+# ESLint Scope
+
+ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope).
+
+## Usage
+
+Install:
+
+```
+npm i eslint-scope --save
+```
+
+Example:
+
+```js
+var eslintScope = require('eslint-scope');
+var espree = require('espree');
+var estraverse = require('estraverse');
+
+var ast = espree.parse(code);
+var scopeManager = eslintScope.analyze(ast);
+
+var currentScope = scopeManager.acquire(ast); // global scope
+
+estraverse.traverse(ast, {
+ enter: function(node, parent) {
+ // do stuff
+
+ if (/Function/.test(node.type)) {
+ currentScope = scopeManager.acquire(node); // get current function scope
+ }
+ },
+ leave: function(node, parent) {
+ if (/Function/.test(node.type)) {
+ currentScope = currentScope.upper; // set to parent scope
+ }
+
+ // do stuff
+ }
+});
+```
+
+## Contributing
+
+Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues).
+
+## Build Commands
+
+* `npm test` - run all linting and tests
+* `npm run lint` - run all linting
+
+## License
+
+ESLint Scope is licensed under a permissive BSD 2-clause license.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js
new file mode 100644
index 00000000000..172bfe23b5f
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/definition.js
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+const Variable = require("./variable");
+
+/**
+ * @class Definition
+ */
+class Definition {
+ constructor(type, name, node, parent, index, kind) {
+
+ /**
+ * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...).
+ */
+ this.type = type;
+
+ /**
+ * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence.
+ */
+ this.name = name;
+
+ /**
+ * @member {espree.Node} Definition#node - the enclosing node of the identifier.
+ */
+ this.node = node;
+
+ /**
+ * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier.
+ */
+ this.parent = parent;
+
+ /**
+ * @member {Number?} Definition#index - the index in the declaration statement.
+ */
+ this.index = index;
+
+ /**
+ * @member {String?} Definition#kind - the kind of the declaration statement.
+ */
+ this.kind = kind;
+ }
+}
+
+/**
+ * @class ParameterDefinition
+ */
+class ParameterDefinition extends Definition {
+ constructor(name, node, index, rest) {
+ super(Variable.Parameter, name, node, null, index, null);
+
+ /**
+ * Whether the parameter definition is a part of a rest parameter.
+ * @member {boolean} ParameterDefinition#rest
+ */
+ this.rest = rest;
+ }
+}
+
+module.exports = {
+ ParameterDefinition,
+ Definition
+};
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js
new file mode 100644
index 00000000000..0f16fa40f83
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/index.js
@@ -0,0 +1,165 @@
+/*
+ Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2013 Alex Seville <hi@alexanderseville.com>
+ Copyright (C) 2014 Thiago de Arruda <tpadilha84@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/**
+ * Escope (<a href="http://github.com/estools/escope">escope</a>) is an <a
+ * href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript</a>
+ * scope analyzer extracted from the <a
+ * href="http://github.com/estools/esmangle">esmangle project</a/>.
+ * <p>
+ * <em>escope</em> finds lexical scopes in a source program, i.e. areas of that
+ * program where different occurrences of the same identifier refer to the same
+ * variable. With each scope the contained variables are collected, and each
+ * identifier reference in code is linked to its corresponding variable (if
+ * possible).
+ * <p>
+ * <em>escope</em> works on a syntax tree of the parsed source code which has
+ * to adhere to the <a
+ * href="https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API">
+ * Mozilla Parser API</a>. E.g. <a href="https://github.com/eslint/espree">espree</a> is a parser
+ * that produces such syntax trees.
+ * <p>
+ * The main interface is the {@link analyze} function.
+ * @module escope
+ */
+"use strict";
+
+/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */
+
+const assert = require("assert");
+
+const ScopeManager = require("./scope-manager");
+const Referencer = require("./referencer");
+const Reference = require("./reference");
+const Variable = require("./variable");
+const Scope = require("./scope").Scope;
+const version = require("../package.json").version;
+
+/**
+ * Set the default options
+ * @returns {Object} options
+ */
+function defaultOptions() {
+ return {
+ optimistic: false,
+ directive: false,
+ nodejsScope: false,
+ impliedStrict: false,
+ sourceType: "script", // one of ['script', 'module']
+ ecmaVersion: 5,
+ childVisitorKeys: null,
+ fallback: "iteration"
+ };
+}
+
+/**
+ * Preform deep update on option object
+ * @param {Object} target - Options
+ * @param {Object} override - Updates
+ * @returns {Object} Updated options
+ */
+function updateDeeply(target, override) {
+
+ /**
+ * Is hash object
+ * @param {Object} value - Test value
+ * @returns {boolean} Result
+ */
+ function isHashObject(value) {
+ return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp);
+ }
+
+ for (const key in override) {
+ if (Object.prototype.hasOwnProperty.call(override, key)) {
+ const val = override[key];
+
+ if (isHashObject(val)) {
+ if (isHashObject(target[key])) {
+ updateDeeply(target[key], val);
+ } else {
+ target[key] = updateDeeply({}, val);
+ }
+ } else {
+ target[key] = val;
+ }
+ }
+ }
+ return target;
+}
+
+/**
+ * Main interface function. Takes an Espree syntax tree and returns the
+ * analyzed scopes.
+ * @function analyze
+ * @param {espree.Tree} tree - Abstract Syntax Tree
+ * @param {Object} providedOptions - Options that tailor the scope analysis
+ * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag
+ * @param {boolean} [providedOptions.directive=false]- the directive flag
+ * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls
+ * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole
+ * script is executed under node.js environment. When enabled, escope adds
+ * a function scope immediately following the global scope.
+ * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode
+ * (if ecmaVersion >= 5).
+ * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module'
+ * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered
+ * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option.
+ * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option.
+ * @returns {ScopeManager} ScopeManager
+ */
+function analyze(tree, providedOptions) {
+ const options = updateDeeply(defaultOptions(), providedOptions);
+ const scopeManager = new ScopeManager(options);
+ const referencer = new Referencer(options, scopeManager);
+
+ referencer.visit(tree);
+
+ assert(scopeManager.__currentScope === null, "currentScope should be null.");
+
+ return scopeManager;
+}
+
+module.exports = {
+
+ /** @name module:escope.version */
+ version,
+
+ /** @name module:escope.Reference */
+ Reference,
+
+ /** @name module:escope.Variable */
+ Variable,
+
+ /** @name module:escope.Scope */
+ Scope,
+
+ /** @name module:escope.ScopeManager */
+ ScopeManager,
+ analyze
+};
+
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js
new file mode 100644
index 00000000000..afa629173b7
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/pattern-visitor.js
@@ -0,0 +1,152 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+const esrecurse = require("esrecurse");
+
+/**
+ * Get last array element
+ * @param {array} xs - array
+ * @returns {any} Last elment
+ */
+function getLast(xs) {
+ return xs[xs.length - 1] || null;
+}
+
+class PatternVisitor extends esrecurse.Visitor {
+ static isPattern(node) {
+ const nodeType = node.type;
+
+ return (
+ nodeType === Syntax.Identifier ||
+ nodeType === Syntax.ObjectPattern ||
+ nodeType === Syntax.ArrayPattern ||
+ nodeType === Syntax.SpreadElement ||
+ nodeType === Syntax.RestElement ||
+ nodeType === Syntax.AssignmentPattern
+ );
+ }
+
+ constructor(options, rootPattern, callback) {
+ super(null, options);
+ this.rootPattern = rootPattern;
+ this.callback = callback;
+ this.assignments = [];
+ this.rightHandNodes = [];
+ this.restElements = [];
+ }
+
+ Identifier(pattern) {
+ const lastRestElement = getLast(this.restElements);
+
+ this.callback(pattern, {
+ topLevel: pattern === this.rootPattern,
+ rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern,
+ assignments: this.assignments
+ });
+ }
+
+ Property(property) {
+
+ // Computed property's key is a right hand node.
+ if (property.computed) {
+ this.rightHandNodes.push(property.key);
+ }
+
+ // If it's shorthand, its key is same as its value.
+ // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern).
+ // If it's not shorthand, the name of new variable is its value's.
+ this.visit(property.value);
+ }
+
+ ArrayPattern(pattern) {
+ for (let i = 0, iz = pattern.elements.length; i < iz; ++i) {
+ const element = pattern.elements[i];
+
+ this.visit(element);
+ }
+ }
+
+ AssignmentPattern(pattern) {
+ this.assignments.push(pattern);
+ this.visit(pattern.left);
+ this.rightHandNodes.push(pattern.right);
+ this.assignments.pop();
+ }
+
+ RestElement(pattern) {
+ this.restElements.push(pattern);
+ this.visit(pattern.argument);
+ this.restElements.pop();
+ }
+
+ MemberExpression(node) {
+
+ // Computed property's key is a right hand node.
+ if (node.computed) {
+ this.rightHandNodes.push(node.property);
+ }
+
+ // the object is only read, write to its property.
+ this.rightHandNodes.push(node.object);
+ }
+
+ //
+ // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression.
+ // By spec, LeftHandSideExpression is Pattern or MemberExpression.
+ // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758)
+ // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc...
+ //
+
+ SpreadElement(node) {
+ this.visit(node.argument);
+ }
+
+ ArrayExpression(node) {
+ node.elements.forEach(this.visit, this);
+ }
+
+ AssignmentExpression(node) {
+ this.assignments.push(node);
+ this.visit(node.left);
+ this.rightHandNodes.push(node.right);
+ this.assignments.pop();
+ }
+
+ CallExpression(node) {
+
+ // arguments are right hand nodes.
+ node.arguments.forEach(a => {
+ this.rightHandNodes.push(a);
+ });
+ this.visit(node.callee);
+ }
+}
+
+module.exports = PatternVisitor;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js
new file mode 100644
index 00000000000..9529827fe78
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/reference.js
@@ -0,0 +1,167 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+const READ = 0x1;
+const WRITE = 0x2;
+const RW = READ | WRITE;
+
+/**
+ * A Reference represents a single occurrence of an identifier in code.
+ * @class Reference
+ */
+class Reference {
+ constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) {
+
+ /**
+ * Identifier syntax node.
+ * @member {espreeIdentifier} Reference#identifier
+ */
+ this.identifier = ident;
+
+ /**
+ * Reference to the enclosing Scope.
+ * @member {Scope} Reference#from
+ */
+ this.from = scope;
+
+ /**
+ * Whether the reference comes from a dynamic scope (such as 'eval',
+ * 'with', etc.), and may be trapped by dynamic scopes.
+ * @member {boolean} Reference#tainted
+ */
+ this.tainted = false;
+
+ /**
+ * The variable this reference is resolved with.
+ * @member {Variable} Reference#resolved
+ */
+ this.resolved = null;
+
+ /**
+ * The read-write mode of the reference. (Value is one of {@link
+ * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}).
+ * @member {number} Reference#flag
+ * @private
+ */
+ this.flag = flag;
+ if (this.isWrite()) {
+
+ /**
+ * If reference is writeable, this is the tree being written to it.
+ * @member {espreeNode} Reference#writeExpr
+ */
+ this.writeExpr = writeExpr;
+
+ /**
+ * Whether the Reference might refer to a partial value of writeExpr.
+ * @member {boolean} Reference#partial
+ */
+ this.partial = partial;
+
+ /**
+ * Whether the Reference is to write of initialization.
+ * @member {boolean} Reference#init
+ */
+ this.init = init;
+ }
+ this.__maybeImplicitGlobal = maybeImplicitGlobal;
+ }
+
+ /**
+ * Whether the reference is static.
+ * @method Reference#isStatic
+ * @returns {boolean} static
+ */
+ isStatic() {
+ return !this.tainted && this.resolved && this.resolved.scope.isStatic();
+ }
+
+ /**
+ * Whether the reference is writeable.
+ * @method Reference#isWrite
+ * @returns {boolean} write
+ */
+ isWrite() {
+ return !!(this.flag & Reference.WRITE);
+ }
+
+ /**
+ * Whether the reference is readable.
+ * @method Reference#isRead
+ * @returns {boolean} read
+ */
+ isRead() {
+ return !!(this.flag & Reference.READ);
+ }
+
+ /**
+ * Whether the reference is read-only.
+ * @method Reference#isReadOnly
+ * @returns {boolean} read only
+ */
+ isReadOnly() {
+ return this.flag === Reference.READ;
+ }
+
+ /**
+ * Whether the reference is write-only.
+ * @method Reference#isWriteOnly
+ * @returns {boolean} write only
+ */
+ isWriteOnly() {
+ return this.flag === Reference.WRITE;
+ }
+
+ /**
+ * Whether the reference is read-write.
+ * @method Reference#isReadWrite
+ * @returns {boolean} read write
+ */
+ isReadWrite() {
+ return this.flag === Reference.RW;
+ }
+}
+
+/**
+ * @constant Reference.READ
+ * @private
+ */
+Reference.READ = READ;
+
+/**
+ * @constant Reference.WRITE
+ * @private
+ */
+Reference.WRITE = WRITE;
+
+/**
+ * @constant Reference.RW
+ * @private
+ */
+Reference.RW = RW;
+
+module.exports = Reference;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js
new file mode 100644
index 00000000000..63d1935b3a9
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/referencer.js
@@ -0,0 +1,629 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+const esrecurse = require("esrecurse");
+const Reference = require("./reference");
+const Variable = require("./variable");
+const PatternVisitor = require("./pattern-visitor");
+const definition = require("./definition");
+const assert = require("assert");
+
+const ParameterDefinition = definition.ParameterDefinition;
+const Definition = definition.Definition;
+
+/**
+ * Traverse identifier in pattern
+ * @param {Object} options - options
+ * @param {pattern} rootPattern - root pattern
+ * @param {Refencer} referencer - referencer
+ * @param {callback} callback - callback
+ * @returns {void}
+ */
+function traverseIdentifierInPattern(options, rootPattern, referencer, callback) {
+
+ // Call the callback at left hand identifier nodes, and Collect right hand nodes.
+ const visitor = new PatternVisitor(options, rootPattern, callback);
+
+ visitor.visit(rootPattern);
+
+ // Process the right hand nodes recursively.
+ if (referencer !== null && referencer !== undefined) {
+ visitor.rightHandNodes.forEach(referencer.visit, referencer);
+ }
+}
+
+// Importing ImportDeclaration.
+// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation
+// https://github.com/estree/estree/blob/master/es6.md#importdeclaration
+// FIXME: Now, we don't create module environment, because the context is
+// implementation dependent.
+
+class Importer extends esrecurse.Visitor {
+ constructor(declaration, referencer) {
+ super(null, referencer.options);
+ this.declaration = declaration;
+ this.referencer = referencer;
+ }
+
+ visitImport(id, specifier) {
+ this.referencer.visitPattern(id, pattern => {
+ this.referencer.currentScope().__define(pattern,
+ new Definition(
+ Variable.ImportBinding,
+ pattern,
+ specifier,
+ this.declaration,
+ null,
+ null
+ ));
+ });
+ }
+
+ ImportNamespaceSpecifier(node) {
+ const local = (node.local || node.id);
+
+ if (local) {
+ this.visitImport(local, node);
+ }
+ }
+
+ ImportDefaultSpecifier(node) {
+ const local = (node.local || node.id);
+
+ this.visitImport(local, node);
+ }
+
+ ImportSpecifier(node) {
+ const local = (node.local || node.id);
+
+ if (node.name) {
+ this.visitImport(node.name, node);
+ } else {
+ this.visitImport(local, node);
+ }
+ }
+}
+
+// Referencing variables and creating bindings.
+class Referencer extends esrecurse.Visitor {
+ constructor(options, scopeManager) {
+ super(null, options);
+ this.options = options;
+ this.scopeManager = scopeManager;
+ this.parent = null;
+ this.isInnerMethodDefinition = false;
+ }
+
+ currentScope() {
+ return this.scopeManager.__currentScope;
+ }
+
+ close(node) {
+ while (this.currentScope() && node === this.currentScope().block) {
+ this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager);
+ }
+ }
+
+ pushInnerMethodDefinition(isInnerMethodDefinition) {
+ const previous = this.isInnerMethodDefinition;
+
+ this.isInnerMethodDefinition = isInnerMethodDefinition;
+ return previous;
+ }
+
+ popInnerMethodDefinition(isInnerMethodDefinition) {
+ this.isInnerMethodDefinition = isInnerMethodDefinition;
+ }
+
+ referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
+ const scope = this.currentScope();
+
+ assignments.forEach(assignment => {
+ scope.__referencing(
+ pattern,
+ Reference.WRITE,
+ assignment.right,
+ maybeImplicitGlobal,
+ pattern !== assignment.left,
+ init
+ );
+ });
+ }
+
+ visitPattern(node, options, callback) {
+ let visitPatternOptions = options;
+ let visitPatternCallback = callback;
+
+ if (typeof options === "function") {
+ visitPatternCallback = options;
+ visitPatternOptions = { processRightHandNodes: false };
+ }
+
+ traverseIdentifierInPattern(
+ this.options,
+ node,
+ visitPatternOptions.processRightHandNodes ? this : null,
+ visitPatternCallback
+ );
+ }
+
+ visitFunction(node) {
+ let i, iz;
+
+ // FunctionDeclaration name is defined in upper scope
+ // NOTE: Not referring variableScope. It is intended.
+ // Since
+ // in ES5, FunctionDeclaration should be in FunctionBody.
+ // in ES6, FunctionDeclaration should be block scoped.
+
+ if (node.type === Syntax.FunctionDeclaration) {
+
+ // id is defined in upper scope
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.FunctionName,
+ node.id,
+ node,
+ null,
+ null,
+ null
+ ));
+ }
+
+ // FunctionExpression with name creates its special scope;
+ // FunctionExpressionNameScope.
+ if (node.type === Syntax.FunctionExpression && node.id) {
+ this.scopeManager.__nestFunctionExpressionNameScope(node);
+ }
+
+ // Consider this function is in the MethodDefinition.
+ this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition);
+
+ const that = this;
+
+ /**
+ * Visit pattern callback
+ * @param {pattern} pattern - pattern
+ * @param {Object} info - info
+ * @returns {void}
+ */
+ function visitPatternCallback(pattern, info) {
+ that.currentScope().__define(pattern,
+ new ParameterDefinition(
+ pattern,
+ node,
+ i,
+ info.rest
+ ));
+
+ that.referencingDefaultValue(pattern, info.assignments, null, true);
+ }
+
+ // Process parameter declarations.
+ for (i = 0, iz = node.params.length; i < iz; ++i) {
+ this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback);
+ }
+
+ // if there's a rest argument, add that
+ if (node.rest) {
+ this.visitPattern({
+ type: "RestElement",
+ argument: node.rest
+ }, pattern => {
+ this.currentScope().__define(pattern,
+ new ParameterDefinition(
+ pattern,
+ node,
+ node.params.length,
+ true
+ ));
+ });
+ }
+
+ // In TypeScript there are a number of function-like constructs which have no body,
+ // so check it exists before traversing
+ if (node.body) {
+
+ // Skip BlockStatement to prevent creating BlockStatement scope.
+ if (node.body.type === Syntax.BlockStatement) {
+ this.visitChildren(node.body);
+ } else {
+ this.visit(node.body);
+ }
+ }
+
+ this.close(node);
+ }
+
+ visitClass(node) {
+ if (node.type === Syntax.ClassDeclaration) {
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.ClassName,
+ node.id,
+ node,
+ null,
+ null,
+ null
+ ));
+ }
+
+ this.visit(node.superClass);
+
+ this.scopeManager.__nestClassScope(node);
+
+ if (node.id) {
+ this.currentScope().__define(node.id,
+ new Definition(
+ Variable.ClassName,
+ node.id,
+ node
+ ));
+ }
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ visitProperty(node) {
+ let previous;
+
+ if (node.computed) {
+ this.visit(node.key);
+ }
+
+ const isMethodDefinition = node.type === Syntax.MethodDefinition;
+
+ if (isMethodDefinition) {
+ previous = this.pushInnerMethodDefinition(true);
+ }
+ this.visit(node.value);
+ if (isMethodDefinition) {
+ this.popInnerMethodDefinition(previous);
+ }
+ }
+
+ visitForIn(node) {
+ if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") {
+ this.scopeManager.__nestForScope(node);
+ }
+
+ if (node.left.type === Syntax.VariableDeclaration) {
+ this.visit(node.left);
+ this.visitPattern(node.left.declarations[0].id, pattern => {
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true);
+ });
+ } else {
+ this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
+ let maybeImplicitGlobal = null;
+
+ if (!this.currentScope().isStrict) {
+ maybeImplicitGlobal = {
+ pattern,
+ node
+ };
+ }
+ this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false);
+ });
+ }
+ this.visit(node.right);
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ visitVariableDeclaration(variableTargetScope, type, node, index) {
+
+ const decl = node.declarations[index];
+ const init = decl.init;
+
+ this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => {
+ variableTargetScope.__define(
+ pattern,
+ new Definition(
+ type,
+ pattern,
+ decl,
+ node,
+ index,
+ node.kind
+ )
+ );
+
+ this.referencingDefaultValue(pattern, info.assignments, null, true);
+ if (init) {
+ this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true);
+ }
+ });
+ }
+
+ AssignmentExpression(node) {
+ if (PatternVisitor.isPattern(node.left)) {
+ if (node.operator === "=") {
+ this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => {
+ let maybeImplicitGlobal = null;
+
+ if (!this.currentScope().isStrict) {
+ maybeImplicitGlobal = {
+ pattern,
+ node
+ };
+ }
+ this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
+ this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false);
+ });
+ } else {
+ this.currentScope().__referencing(node.left, Reference.RW, node.right);
+ }
+ } else {
+ this.visit(node.left);
+ }
+ this.visit(node.right);
+ }
+
+ CatchClause(node) {
+ this.scopeManager.__nestCatchScope(node);
+
+ this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => {
+ this.currentScope().__define(pattern,
+ new Definition(
+ Variable.CatchClause,
+ node.param,
+ node,
+ null,
+ null,
+ null
+ ));
+ this.referencingDefaultValue(pattern, info.assignments, null, true);
+ });
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ Program(node) {
+ this.scopeManager.__nestGlobalScope(node);
+
+ if (this.scopeManager.__isNodejsScope()) {
+
+ // Force strictness of GlobalScope to false when using node.js scope.
+ this.currentScope().isStrict = false;
+ this.scopeManager.__nestFunctionScope(node, false);
+ }
+
+ if (this.scopeManager.__isES6() && this.scopeManager.isModule()) {
+ this.scopeManager.__nestModuleScope(node);
+ }
+
+ if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) {
+ this.currentScope().isStrict = true;
+ }
+
+ this.visitChildren(node);
+ this.close(node);
+ }
+
+ Identifier(node) {
+ this.currentScope().__referencing(node);
+ }
+
+ UpdateExpression(node) {
+ if (PatternVisitor.isPattern(node.argument)) {
+ this.currentScope().__referencing(node.argument, Reference.RW, null);
+ } else {
+ this.visitChildren(node);
+ }
+ }
+
+ MemberExpression(node) {
+ this.visit(node.object);
+ if (node.computed) {
+ this.visit(node.property);
+ }
+ }
+
+ Property(node) {
+ this.visitProperty(node);
+ }
+
+ MethodDefinition(node) {
+ this.visitProperty(node);
+ }
+
+ BreakStatement() {} // eslint-disable-line class-methods-use-this
+
+ ContinueStatement() {} // eslint-disable-line class-methods-use-this
+
+ LabeledStatement(node) {
+ this.visit(node.body);
+ }
+
+ ForStatement(node) {
+
+ // Create ForStatement declaration.
+ // NOTE: In ES6, ForStatement dynamically generates
+ // per iteration environment. However, escope is
+ // a static analyzer, we only generate one scope for ForStatement.
+ if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") {
+ this.scopeManager.__nestForScope(node);
+ }
+
+ this.visitChildren(node);
+
+ this.close(node);
+ }
+
+ ClassExpression(node) {
+ this.visitClass(node);
+ }
+
+ ClassDeclaration(node) {
+ this.visitClass(node);
+ }
+
+ CallExpression(node) {
+
+ // Check this is direct call to eval
+ if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") {
+
+ // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and
+ // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment.
+ this.currentScope().variableScope.__detectEval();
+ }
+ this.visitChildren(node);
+ }
+
+ BlockStatement(node) {
+ if (this.scopeManager.__isES6()) {
+ this.scopeManager.__nestBlockScope(node);
+ }
+
+ this.visitChildren(node);
+
+ this.close(node);
+ }
+
+ ThisExpression() {
+ this.currentScope().variableScope.__detectThis();
+ }
+
+ WithStatement(node) {
+ this.visit(node.object);
+
+ // Then nest scope for WithStatement.
+ this.scopeManager.__nestWithScope(node);
+
+ this.visit(node.body);
+
+ this.close(node);
+ }
+
+ VariableDeclaration(node) {
+ const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope();
+
+ for (let i = 0, iz = node.declarations.length; i < iz; ++i) {
+ const decl = node.declarations[i];
+
+ this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i);
+ if (decl.init) {
+ this.visit(decl.init);
+ }
+ }
+ }
+
+ // sec 13.11.8
+ SwitchStatement(node) {
+ this.visit(node.discriminant);
+
+ if (this.scopeManager.__isES6()) {
+ this.scopeManager.__nestSwitchScope(node);
+ }
+
+ for (let i = 0, iz = node.cases.length; i < iz; ++i) {
+ this.visit(node.cases[i]);
+ }
+
+ this.close(node);
+ }
+
+ FunctionDeclaration(node) {
+ this.visitFunction(node);
+ }
+
+ FunctionExpression(node) {
+ this.visitFunction(node);
+ }
+
+ ForOfStatement(node) {
+ this.visitForIn(node);
+ }
+
+ ForInStatement(node) {
+ this.visitForIn(node);
+ }
+
+ ArrowFunctionExpression(node) {
+ this.visitFunction(node);
+ }
+
+ ImportDeclaration(node) {
+ assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context.");
+
+ const importer = new Importer(node, this);
+
+ importer.visit(node);
+ }
+
+ visitExportDeclaration(node) {
+ if (node.source) {
+ return;
+ }
+ if (node.declaration) {
+ this.visit(node.declaration);
+ return;
+ }
+
+ this.visitChildren(node);
+ }
+
+ // TODO: ExportDeclaration doesn't exist. for bc?
+ ExportDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportAllDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportDefaultDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportNamedDeclaration(node) {
+ this.visitExportDeclaration(node);
+ }
+
+ ExportSpecifier(node) {
+
+ // TODO: `node.id` doesn't exist. for bc?
+ const local = (node.id || node.local);
+
+ this.visit(local);
+ }
+
+ MetaProperty() { // eslint-disable-line class-methods-use-this
+
+ // do nothing.
+ }
+}
+
+module.exports = Referencer;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js
new file mode 100644
index 00000000000..c1927994b11
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope-manager.js
@@ -0,0 +1,247 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+
+const Scope = require("./scope");
+const assert = require("assert");
+
+const GlobalScope = Scope.GlobalScope;
+const CatchScope = Scope.CatchScope;
+const WithScope = Scope.WithScope;
+const ModuleScope = Scope.ModuleScope;
+const ClassScope = Scope.ClassScope;
+const SwitchScope = Scope.SwitchScope;
+const FunctionScope = Scope.FunctionScope;
+const ForScope = Scope.ForScope;
+const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope;
+const BlockScope = Scope.BlockScope;
+
+/**
+ * @class ScopeManager
+ */
+class ScopeManager {
+ constructor(options) {
+ this.scopes = [];
+ this.globalScope = null;
+ this.__nodeToScope = new WeakMap();
+ this.__currentScope = null;
+ this.__options = options;
+ this.__declaredVariables = new WeakMap();
+ }
+
+ __useDirective() {
+ return this.__options.directive;
+ }
+
+ __isOptimistic() {
+ return this.__options.optimistic;
+ }
+
+ __ignoreEval() {
+ return this.__options.ignoreEval;
+ }
+
+ __isNodejsScope() {
+ return this.__options.nodejsScope;
+ }
+
+ isModule() {
+ return this.__options.sourceType === "module";
+ }
+
+ isImpliedStrict() {
+ return this.__options.impliedStrict;
+ }
+
+ isStrictModeSupported() {
+ return this.__options.ecmaVersion >= 5;
+ }
+
+ // Returns appropriate scope for this node.
+ __get(node) {
+ return this.__nodeToScope.get(node);
+ }
+
+ /**
+ * Get variables that are declared by the node.
+ *
+ * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
+ * If the node declares nothing, this method returns an empty array.
+ * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
+ *
+ * @param {Espree.Node} node - a node to get.
+ * @returns {Variable[]} variables that declared by the node.
+ */
+ getDeclaredVariables(node) {
+ return this.__declaredVariables.get(node) || [];
+ }
+
+ /**
+ * acquire scope from node.
+ * @method ScopeManager#acquire
+ * @param {Espree.Node} node - node for the acquired scope.
+ * @param {boolean=} inner - look up the most inner scope, default value is false.
+ * @returns {Scope?} Scope from node
+ */
+ acquire(node, inner) {
+
+ /**
+ * predicate
+ * @param {Scope} testScope - scope to test
+ * @returns {boolean} predicate
+ */
+ function predicate(testScope) {
+ if (testScope.type === "function" && testScope.functionExpressionScope) {
+ return false;
+ }
+ return true;
+ }
+
+ const scopes = this.__get(node);
+
+ if (!scopes || scopes.length === 0) {
+ return null;
+ }
+
+ // Heuristic selection from all scopes.
+ // If you would like to get all scopes, please use ScopeManager#acquireAll.
+ if (scopes.length === 1) {
+ return scopes[0];
+ }
+
+ if (inner) {
+ for (let i = scopes.length - 1; i >= 0; --i) {
+ const scope = scopes[i];
+
+ if (predicate(scope)) {
+ return scope;
+ }
+ }
+ } else {
+ for (let i = 0, iz = scopes.length; i < iz; ++i) {
+ const scope = scopes[i];
+
+ if (predicate(scope)) {
+ return scope;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * acquire all scopes from node.
+ * @method ScopeManager#acquireAll
+ * @param {Espree.Node} node - node for the acquired scope.
+ * @returns {Scopes?} Scope array
+ */
+ acquireAll(node) {
+ return this.__get(node);
+ }
+
+ /**
+ * release the node.
+ * @method ScopeManager#release
+ * @param {Espree.Node} node - releasing node.
+ * @param {boolean=} inner - look up the most inner scope, default value is false.
+ * @returns {Scope?} upper scope for the node.
+ */
+ release(node, inner) {
+ const scopes = this.__get(node);
+
+ if (scopes && scopes.length) {
+ const scope = scopes[0].upper;
+
+ if (!scope) {
+ return null;
+ }
+ return this.acquire(scope.block, inner);
+ }
+ return null;
+ }
+
+ attach() { } // eslint-disable-line class-methods-use-this
+
+ detach() { } // eslint-disable-line class-methods-use-this
+
+ __nestScope(scope) {
+ if (scope instanceof GlobalScope) {
+ assert(this.__currentScope === null);
+ this.globalScope = scope;
+ }
+ this.__currentScope = scope;
+ return scope;
+ }
+
+ __nestGlobalScope(node) {
+ return this.__nestScope(new GlobalScope(this, node));
+ }
+
+ __nestBlockScope(node) {
+ return this.__nestScope(new BlockScope(this, this.__currentScope, node));
+ }
+
+ __nestFunctionScope(node, isMethodDefinition) {
+ return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition));
+ }
+
+ __nestForScope(node) {
+ return this.__nestScope(new ForScope(this, this.__currentScope, node));
+ }
+
+ __nestCatchScope(node) {
+ return this.__nestScope(new CatchScope(this, this.__currentScope, node));
+ }
+
+ __nestWithScope(node) {
+ return this.__nestScope(new WithScope(this, this.__currentScope, node));
+ }
+
+ __nestClassScope(node) {
+ return this.__nestScope(new ClassScope(this, this.__currentScope, node));
+ }
+
+ __nestSwitchScope(node) {
+ return this.__nestScope(new SwitchScope(this, this.__currentScope, node));
+ }
+
+ __nestModuleScope(node) {
+ return this.__nestScope(new ModuleScope(this, this.__currentScope, node));
+ }
+
+ __nestFunctionExpressionNameScope(node) {
+ return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node));
+ }
+
+ __isES6() {
+ return this.__options.ecmaVersion >= 6;
+ }
+}
+
+module.exports = ScopeManager;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js
new file mode 100644
index 00000000000..5c4c967780a
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/scope.js
@@ -0,0 +1,748 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-undefined */
+
+const Syntax = require("estraverse").Syntax;
+
+const Reference = require("./reference");
+const Variable = require("./variable");
+const Definition = require("./definition").Definition;
+const assert = require("assert");
+
+/**
+ * Test if scope is struct
+ * @param {Scope} scope - scope
+ * @param {Block} block - block
+ * @param {boolean} isMethodDefinition - is method definiton
+ * @param {boolean} useDirective - use directive
+ * @returns {boolean} is strict scope
+ */
+function isStrictScope(scope, block, isMethodDefinition, useDirective) {
+ let body;
+
+ // When upper scope is exists and strict, inner scope is also strict.
+ if (scope.upper && scope.upper.isStrict) {
+ return true;
+ }
+
+ if (isMethodDefinition) {
+ return true;
+ }
+
+ if (scope.type === "class" || scope.type === "module") {
+ return true;
+ }
+
+ if (scope.type === "block" || scope.type === "switch") {
+ return false;
+ }
+
+ if (scope.type === "function") {
+ if (block.type === Syntax.ArrowFunctionExpression && block.body.type !== Syntax.BlockStatement) {
+ return false;
+ }
+
+ if (block.type === Syntax.Program) {
+ body = block;
+ } else {
+ body = block.body;
+ }
+
+ if (!body) {
+ return false;
+ }
+ } else if (scope.type === "global") {
+ body = block;
+ } else {
+ return false;
+ }
+
+ // Search 'use strict' directive.
+ if (useDirective) {
+ for (let i = 0, iz = body.body.length; i < iz; ++i) {
+ const stmt = body.body[i];
+
+ if (stmt.type !== Syntax.DirectiveStatement) {
+ break;
+ }
+ if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") {
+ return true;
+ }
+ }
+ } else {
+ for (let i = 0, iz = body.body.length; i < iz; ++i) {
+ const stmt = body.body[i];
+
+ if (stmt.type !== Syntax.ExpressionStatement) {
+ break;
+ }
+ const expr = stmt.expression;
+
+ if (expr.type !== Syntax.Literal || typeof expr.value !== "string") {
+ break;
+ }
+ if (expr.raw !== null && expr.raw !== undefined) {
+ if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") {
+ return true;
+ }
+ } else {
+ if (expr.value === "use strict") {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+/**
+ * Register scope
+ * @param {ScopeManager} scopeManager - scope manager
+ * @param {Scope} scope - scope
+ * @returns {void}
+ */
+function registerScope(scopeManager, scope) {
+ scopeManager.scopes.push(scope);
+
+ const scopes = scopeManager.__nodeToScope.get(scope.block);
+
+ if (scopes) {
+ scopes.push(scope);
+ } else {
+ scopeManager.__nodeToScope.set(scope.block, [scope]);
+ }
+}
+
+/**
+ * Should be statically
+ * @param {Object} def - def
+ * @returns {boolean} should be statically
+ */
+function shouldBeStatically(def) {
+ return (
+ (def.type === Variable.ClassName) ||
+ (def.type === Variable.Variable && def.parent.kind !== "var")
+ );
+}
+
+/**
+ * @class Scope
+ */
+class Scope {
+ constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
+
+ /**
+ * One of 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'.
+ * @member {String} Scope#type
+ */
+ this.type = type;
+
+ /**
+ * The scoped {@link Variable}s of this scope, as <code>{ Variable.name
+ * : Variable }</code>.
+ * @member {Map} Scope#set
+ */
+ this.set = new Map();
+
+ /**
+ * The tainted variables of this scope, as <code>{ Variable.name :
+ * boolean }</code>.
+ * @member {Map} Scope#taints */
+ this.taints = new Map();
+
+ /**
+ * Generally, through the lexical scoping of JS you can always know
+ * which variable an identifier in the source code refers to. There are
+ * a few exceptions to this rule. With 'global' and 'with' scopes you
+ * can only decide at runtime which variable a reference refers to.
+ * Moreover, if 'eval()' is used in a scope, it might introduce new
+ * bindings in this or its parent scopes.
+ * All those scopes are considered 'dynamic'.
+ * @member {boolean} Scope#dynamic
+ */
+ this.dynamic = this.type === "global" || this.type === "with";
+
+ /**
+ * A reference to the scope-defining syntax node.
+ * @member {espree.Node} Scope#block
+ */
+ this.block = block;
+
+ /**
+ * The {@link Reference|references} that are not resolved with this scope.
+ * @member {Reference[]} Scope#through
+ */
+ this.through = [];
+
+ /**
+ * The scoped {@link Variable}s of this scope. In the case of a
+ * 'function' scope this includes the automatic argument <em>arguments</em> as
+ * its first element, as well as all further formal arguments.
+ * @member {Variable[]} Scope#variables
+ */
+ this.variables = [];
+
+ /**
+ * Any variable {@link Reference|reference} found in this scope. This
+ * includes occurrences of local variables as well as variables from
+ * parent scopes (including the global scope). For local variables
+ * this also includes defining occurrences (like in a 'var' statement).
+ * In a 'function' scope this does not include the occurrences of the
+ * formal parameter in the parameter list.
+ * @member {Reference[]} Scope#references
+ */
+ this.references = [];
+
+ /**
+ * For 'global' and 'function' scopes, this is a self-reference. For
+ * other scope types this is the <em>variableScope</em> value of the
+ * parent scope.
+ * @member {Scope} Scope#variableScope
+ */
+ this.variableScope =
+ (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope;
+
+ /**
+ * Whether this scope is created by a FunctionExpression.
+ * @member {boolean} Scope#functionExpressionScope
+ */
+ this.functionExpressionScope = false;
+
+ /**
+ * Whether this is a scope that contains an 'eval()' invocation.
+ * @member {boolean} Scope#directCallToEvalScope
+ */
+ this.directCallToEvalScope = false;
+
+ /**
+ * @member {boolean} Scope#thisFound
+ */
+ this.thisFound = false;
+
+ this.__left = [];
+
+ /**
+ * Reference to the parent {@link Scope|scope}.
+ * @member {Scope} Scope#upper
+ */
+ this.upper = upperScope;
+
+ /**
+ * Whether 'use strict' is in effect in this scope.
+ * @member {boolean} Scope#isStrict
+ */
+ this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective());
+
+ /**
+ * List of nested {@link Scope}s.
+ * @member {Scope[]} Scope#childScopes
+ */
+ this.childScopes = [];
+ if (this.upper) {
+ this.upper.childScopes.push(this);
+ }
+
+ this.__declaredVariables = scopeManager.__declaredVariables;
+
+ registerScope(scopeManager, this);
+ }
+
+ __shouldStaticallyClose(scopeManager) {
+ return (!this.dynamic || scopeManager.__isOptimistic());
+ }
+
+ __shouldStaticallyCloseForGlobal(ref) {
+
+ // On global scope, let/const/class declarations should be resolved statically.
+ const name = ref.identifier.name;
+
+ if (!this.set.has(name)) {
+ return false;
+ }
+
+ const variable = this.set.get(name);
+ const defs = variable.defs;
+
+ return defs.length > 0 && defs.every(shouldBeStatically);
+ }
+
+ __staticCloseRef(ref) {
+ if (!this.__resolve(ref)) {
+ this.__delegateToUpperScope(ref);
+ }
+ }
+
+ __dynamicCloseRef(ref) {
+
+ // notify all names are through to global
+ let current = this;
+
+ do {
+ current.through.push(ref);
+ current = current.upper;
+ } while (current);
+ }
+
+ __globalCloseRef(ref) {
+
+ // let/const/class declarations should be resolved statically.
+ // others should be resolved dynamically.
+ if (this.__shouldStaticallyCloseForGlobal(ref)) {
+ this.__staticCloseRef(ref);
+ } else {
+ this.__dynamicCloseRef(ref);
+ }
+ }
+
+ __close(scopeManager) {
+ let closeRef;
+
+ if (this.__shouldStaticallyClose(scopeManager)) {
+ closeRef = this.__staticCloseRef;
+ } else if (this.type !== "global") {
+ closeRef = this.__dynamicCloseRef;
+ } else {
+ closeRef = this.__globalCloseRef;
+ }
+
+ // Try Resolving all references in this scope.
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ closeRef.call(this, ref);
+ }
+ this.__left = null;
+
+ return this.upper;
+ }
+
+ // To override by function scopes.
+ // References in default parameters isn't resolved to variables which are in their function body.
+ __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars
+ return true;
+ }
+
+ __resolve(ref) {
+ const name = ref.identifier.name;
+
+ if (!this.set.has(name)) {
+ return false;
+ }
+ const variable = this.set.get(name);
+
+ if (!this.__isValidResolution(ref, variable)) {
+ return false;
+ }
+ variable.references.push(ref);
+ variable.stack = variable.stack && ref.from.variableScope === this.variableScope;
+ if (ref.tainted) {
+ variable.tainted = true;
+ this.taints.set(variable.name, true);
+ }
+ ref.resolved = variable;
+
+ return true;
+ }
+
+ __delegateToUpperScope(ref) {
+ if (this.upper) {
+ this.upper.__left.push(ref);
+ }
+ this.through.push(ref);
+ }
+
+ __addDeclaredVariablesOfNode(variable, node) {
+ if (node === null || node === undefined) {
+ return;
+ }
+
+ let variables = this.__declaredVariables.get(node);
+
+ if (variables === null || variables === undefined) {
+ variables = [];
+ this.__declaredVariables.set(node, variables);
+ }
+ if (variables.indexOf(variable) === -1) {
+ variables.push(variable);
+ }
+ }
+
+ __defineGeneric(name, set, variables, node, def) {
+ let variable;
+
+ variable = set.get(name);
+ if (!variable) {
+ variable = new Variable(name, this);
+ set.set(name, variable);
+ variables.push(variable);
+ }
+
+ if (def) {
+ variable.defs.push(def);
+ this.__addDeclaredVariablesOfNode(variable, def.node);
+ this.__addDeclaredVariablesOfNode(variable, def.parent);
+ }
+ if (node) {
+ variable.identifiers.push(node);
+ }
+ }
+
+ __define(node, def) {
+ if (node && node.type === Syntax.Identifier) {
+ this.__defineGeneric(
+ node.name,
+ this.set,
+ this.variables,
+ node,
+ def
+ );
+ }
+ }
+
+ __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) {
+
+ // because Array element may be null
+ if (!node || node.type !== Syntax.Identifier) {
+ return;
+ }
+
+ // Specially handle like `this`.
+ if (node.name === "super") {
+ return;
+ }
+
+ const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init);
+
+ this.references.push(ref);
+ this.__left.push(ref);
+ }
+
+ __detectEval() {
+ let current = this;
+
+ this.directCallToEvalScope = true;
+ do {
+ current.dynamic = true;
+ current = current.upper;
+ } while (current);
+ }
+
+ __detectThis() {
+ this.thisFound = true;
+ }
+
+ __isClosed() {
+ return this.__left === null;
+ }
+
+ /**
+ * returns resolved {Reference}
+ * @method Scope#resolve
+ * @param {Espree.Identifier} ident - identifier to be resolved.
+ * @returns {Reference} reference
+ */
+ resolve(ident) {
+ let ref, i, iz;
+
+ assert(this.__isClosed(), "Scope should be closed.");
+ assert(ident.type === Syntax.Identifier, "Target should be identifier.");
+ for (i = 0, iz = this.references.length; i < iz; ++i) {
+ ref = this.references[i];
+ if (ref.identifier === ident) {
+ return ref;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * returns this scope is static
+ * @method Scope#isStatic
+ * @returns {boolean} static
+ */
+ isStatic() {
+ return !this.dynamic;
+ }
+
+ /**
+ * returns this scope has materialized arguments
+ * @method Scope#isArgumentsMaterialized
+ * @returns {boolean} arguemnts materialized
+ */
+ isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this
+ return true;
+ }
+
+ /**
+ * returns this scope has materialized `this` reference
+ * @method Scope#isThisMaterialized
+ * @returns {boolean} this materialized
+ */
+ isThisMaterialized() { // eslint-disable-line class-methods-use-this
+ return true;
+ }
+
+ isUsedName(name) {
+ if (this.set.has(name)) {
+ return true;
+ }
+ for (let i = 0, iz = this.through.length; i < iz; ++i) {
+ if (this.through[i].identifier.name === name) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
+
+class GlobalScope extends Scope {
+ constructor(scopeManager, block) {
+ super(scopeManager, "global", null, block, false);
+ this.implicit = {
+ set: new Map(),
+ variables: [],
+
+ /**
+ * List of {@link Reference}s that are left to be resolved (i.e. which
+ * need to be linked to the variable they refer to).
+ * @member {Reference[]} Scope#implicit#left
+ */
+ left: []
+ };
+ }
+
+ __close(scopeManager) {
+ const implicit = [];
+
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) {
+ implicit.push(ref.__maybeImplicitGlobal);
+ }
+ }
+
+ // create an implicit global variable from assignment expression
+ for (let i = 0, iz = implicit.length; i < iz; ++i) {
+ const info = implicit[i];
+
+ this.__defineImplicit(info.pattern,
+ new Definition(
+ Variable.ImplicitGlobalVariable,
+ info.pattern,
+ info.node,
+ null,
+ null,
+ null
+ ));
+
+ }
+
+ this.implicit.left = this.__left;
+
+ return super.__close(scopeManager);
+ }
+
+ __defineImplicit(node, def) {
+ if (node && node.type === Syntax.Identifier) {
+ this.__defineGeneric(
+ node.name,
+ this.implicit.set,
+ this.implicit.variables,
+ node,
+ def
+ );
+ }
+ }
+}
+
+class ModuleScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "module", upperScope, block, false);
+ }
+}
+
+class FunctionExpressionNameScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "function-expression-name", upperScope, block, false);
+ this.__define(block.id,
+ new Definition(
+ Variable.FunctionName,
+ block.id,
+ block,
+ null,
+ null,
+ null
+ ));
+ this.functionExpressionScope = true;
+ }
+}
+
+class CatchScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "catch", upperScope, block, false);
+ }
+}
+
+class WithScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "with", upperScope, block, false);
+ }
+
+ __close(scopeManager) {
+ if (this.__shouldStaticallyClose(scopeManager)) {
+ return super.__close(scopeManager);
+ }
+
+ for (let i = 0, iz = this.__left.length; i < iz; ++i) {
+ const ref = this.__left[i];
+
+ ref.tainted = true;
+ this.__delegateToUpperScope(ref);
+ }
+ this.__left = null;
+
+ return this.upper;
+ }
+}
+
+class BlockScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "block", upperScope, block, false);
+ }
+}
+
+class SwitchScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "switch", upperScope, block, false);
+ }
+}
+
+class FunctionScope extends Scope {
+ constructor(scopeManager, upperScope, block, isMethodDefinition) {
+ super(scopeManager, "function", upperScope, block, isMethodDefinition);
+
+ // section 9.2.13, FunctionDeclarationInstantiation.
+ // NOTE Arrow functions never have an arguments objects.
+ if (this.block.type !== Syntax.ArrowFunctionExpression) {
+ this.__defineArguments();
+ }
+ }
+
+ isArgumentsMaterialized() {
+
+ // TODO(Constellation)
+ // We can more aggressive on this condition like this.
+ //
+ // function t() {
+ // // arguments of t is always hidden.
+ // function arguments() {
+ // }
+ // }
+ if (this.block.type === Syntax.ArrowFunctionExpression) {
+ return false;
+ }
+
+ if (!this.isStatic()) {
+ return true;
+ }
+
+ const variable = this.set.get("arguments");
+
+ assert(variable, "Always have arguments variable.");
+ return variable.tainted || variable.references.length !== 0;
+ }
+
+ isThisMaterialized() {
+ if (!this.isStatic()) {
+ return true;
+ }
+ return this.thisFound;
+ }
+
+ __defineArguments() {
+ this.__defineGeneric(
+ "arguments",
+ this.set,
+ this.variables,
+ null,
+ null
+ );
+ this.taints.set("arguments", true);
+ }
+
+ // References in default parameters isn't resolved to variables which are in their function body.
+ // const x = 1
+ // function f(a = x) { // This `x` is resolved to the `x` in the outer scope.
+ // const x = 2
+ // console.log(a)
+ // }
+ __isValidResolution(ref, variable) {
+
+ // If `options.nodejsScope` is true, `this.block` becomes a Program node.
+ if (this.block.type === "Program") {
+ return true;
+ }
+
+ const bodyStart = this.block.body.range[0];
+
+ // It's invalid resolution in the following case:
+ return !(
+ variable.scope === this &&
+ ref.identifier.range[0] < bodyStart && // the reference is in the parameter part.
+ variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body.
+ );
+ }
+}
+
+class ForScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "for", upperScope, block, false);
+ }
+}
+
+class ClassScope extends Scope {
+ constructor(scopeManager, upperScope, block) {
+ super(scopeManager, "class", upperScope, block, false);
+ }
+}
+
+module.exports = {
+ Scope,
+ GlobalScope,
+ ModuleScope,
+ FunctionExpressionNameScope,
+ CatchScope,
+ WithScope,
+ BlockScope,
+ SwitchScope,
+ FunctionScope,
+ ForScope,
+ ClassScope
+};
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js
new file mode 100644
index 00000000000..702c4780a24
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/lib/variable.js
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+"use strict";
+
+/**
+ * A Variable represents a locally scoped identifier. These include arguments to
+ * functions.
+ * @class Variable
+ */
+class Variable {
+ constructor(name, scope) {
+
+ /**
+ * The variable name, as given in the source code.
+ * @member {String} Variable#name
+ */
+ this.name = name;
+
+ /**
+ * List of defining occurrences of this variable (like in 'var ...'
+ * statements or as parameter), as AST nodes.
+ * @member {espree.Identifier[]} Variable#identifiers
+ */
+ this.identifiers = [];
+
+ /**
+ * List of {@link Reference|references} of this variable (excluding parameter entries)
+ * in its defining scope and all nested scopes. For defining
+ * occurrences only see {@link Variable#defs}.
+ * @member {Reference[]} Variable#references
+ */
+ this.references = [];
+
+ /**
+ * List of defining occurrences of this variable (like in 'var ...'
+ * statements or as parameter), as custom objects.
+ * @member {Definition[]} Variable#defs
+ */
+ this.defs = [];
+
+ this.tainted = false;
+
+ /**
+ * Whether this is a stack variable.
+ * @member {boolean} Variable#stack
+ */
+ this.stack = true;
+
+ /**
+ * Reference to the enclosing Scope.
+ * @member {Scope} Variable#scope
+ */
+ this.scope = scope;
+ }
+}
+
+Variable.CatchClause = "CatchClause";
+Variable.Parameter = "Parameter";
+Variable.FunctionName = "FunctionName";
+Variable.ClassName = "ClassName";
+Variable.Variable = "Variable";
+Variable.ImportBinding = "ImportBinding";
+Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable";
+
+module.exports = Variable;
+
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json
new file mode 100644
index 00000000000..a19fd8ce712
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-scope/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "eslint-scope",
+ "description": "ECMAScript scope analyzer for ESLint",
+ "homepage": "http://github.com/eslint/eslint-scope",
+ "main": "lib/index.js",
+ "version": "5.1.0",
+ "engines": {
+ "node": ">=8.0.0"
+ },
+ "repository": "eslint/eslint-scope",
+ "bugs": {
+ "url": "https://github.com/eslint/eslint-scope/issues"
+ },
+ "license": "BSD-2-Clause",
+ "scripts": {
+ "test": "node Makefile.js test",
+ "lint": "node Makefile.js lint",
+ "generate-release": "eslint-generate-release",
+ "generate-alpharelease": "eslint-generate-prerelease alpha",
+ "generate-betarelease": "eslint-generate-prerelease beta",
+ "generate-rcrelease": "eslint-generate-prerelease rc",
+ "publish-release": "eslint-publish-release"
+ },
+ "files": [
+ "LICENSE",
+ "README.md",
+ "lib"
+ ],
+ "dependencies": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ },
+ "devDependencies": {
+ "@typescript-eslint/parser": "^1.11.0",
+ "chai": "^4.2.0",
+ "eslint": "^6.0.1",
+ "eslint-config-eslint": "^5.0.1",
+ "eslint-plugin-node": "^9.1.0",
+ "eslint-release": "^1.0.0",
+ "eslint-visitor-keys": "^1.2.0",
+ "espree": "^7.1.0",
+ "istanbul": "^0.4.5",
+ "mocha": "^6.1.4",
+ "npm-license": "^0.3.3",
+ "shelljs": "^0.8.3",
+ "typescript": "^3.5.2"
+ }
+}
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/LICENSE
index 17a25538d9b..17a25538d9b 100644
--- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/LICENSE
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/LICENSE
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/README.md
index 250f5fa31a6..250f5fa31a6 100644
--- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/README.md
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/README.md
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/index.js
index cd8a3260834..cd8a3260834 100644
--- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/index.js
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/index.js
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json
new file mode 100644
index 00000000000..a33bbc66005
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/lib/visitor-keys.json
@@ -0,0 +1,284 @@
+{
+ "AssignmentExpression": [
+ "left",
+ "right"
+ ],
+ "AssignmentPattern": [
+ "left",
+ "right"
+ ],
+ "ArrayExpression": [
+ "elements"
+ ],
+ "ArrayPattern": [
+ "elements"
+ ],
+ "ArrowFunctionExpression": [
+ "params",
+ "body"
+ ],
+ "AwaitExpression": [
+ "argument"
+ ],
+ "BlockStatement": [
+ "body"
+ ],
+ "BinaryExpression": [
+ "left",
+ "right"
+ ],
+ "BreakStatement": [
+ "label"
+ ],
+ "CallExpression": [
+ "callee",
+ "arguments"
+ ],
+ "CatchClause": [
+ "param",
+ "body"
+ ],
+ "ChainExpression": [
+ "expression"
+ ],
+ "ClassBody": [
+ "body"
+ ],
+ "ClassDeclaration": [
+ "id",
+ "superClass",
+ "body"
+ ],
+ "ClassExpression": [
+ "id",
+ "superClass",
+ "body"
+ ],
+ "ConditionalExpression": [
+ "test",
+ "consequent",
+ "alternate"
+ ],
+ "ContinueStatement": [
+ "label"
+ ],
+ "DebuggerStatement": [],
+ "DoWhileStatement": [
+ "body",
+ "test"
+ ],
+ "EmptyStatement": [],
+ "ExportAllDeclaration": [
+ "exported",
+ "source"
+ ],
+ "ExportDefaultDeclaration": [
+ "declaration"
+ ],
+ "ExportNamedDeclaration": [
+ "declaration",
+ "specifiers",
+ "source"
+ ],
+ "ExportSpecifier": [
+ "exported",
+ "local"
+ ],
+ "ExpressionStatement": [
+ "expression"
+ ],
+ "ExperimentalRestProperty": [
+ "argument"
+ ],
+ "ExperimentalSpreadProperty": [
+ "argument"
+ ],
+ "ForStatement": [
+ "init",
+ "test",
+ "update",
+ "body"
+ ],
+ "ForInStatement": [
+ "left",
+ "right",
+ "body"
+ ],
+ "ForOfStatement": [
+ "left",
+ "right",
+ "body"
+ ],
+ "FunctionDeclaration": [
+ "id",
+ "params",
+ "body"
+ ],
+ "FunctionExpression": [
+ "id",
+ "params",
+ "body"
+ ],
+ "Identifier": [],
+ "IfStatement": [
+ "test",
+ "consequent",
+ "alternate"
+ ],
+ "ImportDeclaration": [
+ "specifiers",
+ "source"
+ ],
+ "ImportDefaultSpecifier": [
+ "local"
+ ],
+ "ImportExpression": [
+ "source"
+ ],
+ "ImportNamespaceSpecifier": [
+ "local"
+ ],
+ "ImportSpecifier": [
+ "imported",
+ "local"
+ ],
+ "JSXAttribute": [
+ "name",
+ "value"
+ ],
+ "JSXClosingElement": [
+ "name"
+ ],
+ "JSXElement": [
+ "openingElement",
+ "children",
+ "closingElement"
+ ],
+ "JSXEmptyExpression": [],
+ "JSXExpressionContainer": [
+ "expression"
+ ],
+ "JSXIdentifier": [],
+ "JSXMemberExpression": [
+ "object",
+ "property"
+ ],
+ "JSXNamespacedName": [
+ "namespace",
+ "name"
+ ],
+ "JSXOpeningElement": [
+ "name",
+ "attributes"
+ ],
+ "JSXSpreadAttribute": [
+ "argument"
+ ],
+ "JSXText": [],
+ "JSXFragment": [
+ "openingFragment",
+ "children",
+ "closingFragment"
+ ],
+ "Literal": [],
+ "LabeledStatement": [
+ "label",
+ "body"
+ ],
+ "LogicalExpression": [
+ "left",
+ "right"
+ ],
+ "MemberExpression": [
+ "object",
+ "property"
+ ],
+ "MetaProperty": [
+ "meta",
+ "property"
+ ],
+ "MethodDefinition": [
+ "key",
+ "value"
+ ],
+ "NewExpression": [
+ "callee",
+ "arguments"
+ ],
+ "ObjectExpression": [
+ "properties"
+ ],
+ "ObjectPattern": [
+ "properties"
+ ],
+ "Program": [
+ "body"
+ ],
+ "Property": [
+ "key",
+ "value"
+ ],
+ "RestElement": [
+ "argument"
+ ],
+ "ReturnStatement": [
+ "argument"
+ ],
+ "SequenceExpression": [
+ "expressions"
+ ],
+ "SpreadElement": [
+ "argument"
+ ],
+ "Super": [],
+ "SwitchStatement": [
+ "discriminant",
+ "cases"
+ ],
+ "SwitchCase": [
+ "test",
+ "consequent"
+ ],
+ "TaggedTemplateExpression": [
+ "tag",
+ "quasi"
+ ],
+ "TemplateElement": [],
+ "TemplateLiteral": [
+ "quasis",
+ "expressions"
+ ],
+ "ThisExpression": [],
+ "ThrowStatement": [
+ "argument"
+ ],
+ "TryStatement": [
+ "block",
+ "handler",
+ "finalizer"
+ ],
+ "UnaryExpression": [
+ "argument"
+ ],
+ "UpdateExpression": [
+ "argument"
+ ],
+ "VariableDeclaration": [
+ "declarations"
+ ],
+ "VariableDeclarator": [
+ "id",
+ "init"
+ ],
+ "WhileStatement": [
+ "test",
+ "body"
+ ],
+ "WithStatement": [
+ "object",
+ "body"
+ ],
+ "YieldExpression": [
+ "argument"
+ ]
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json
new file mode 100644
index 00000000000..63267be6437
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "eslint-visitor-keys",
+ "version": "1.3.0",
+ "description": "Constants and utilities about visitor keys to traverse AST.",
+ "main": "lib/index.js",
+ "files": [
+ "lib"
+ ],
+ "engines": {
+ "node": ">=4"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "eslint": "^4.7.2",
+ "eslint-config-eslint": "^4.0.0",
+ "eslint-release": "^1.0.0",
+ "mocha": "^3.5.3",
+ "nyc": "^11.2.1",
+ "opener": "^1.4.3"
+ },
+ "scripts": {
+ "lint": "eslint lib tests/lib",
+ "pretest": "npm run -s lint",
+ "test": "nyc mocha tests/lib",
+ "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
+ "generate-release": "eslint-generate-release",
+ "generate-alpharelease": "eslint-generate-prerelease alpha",
+ "generate-betarelease": "eslint-generate-prerelease beta",
+ "generate-rcrelease": "eslint-generate-prerelease rc",
+ "publish-release": "eslint-publish-release"
+ },
+ "repository": "eslint/eslint-visitor-keys",
+ "keywords": [],
+ "author": "Toru Nagashima (https://github.com/mysticatea)",
+ "license": "Apache-2.0",
+ "bugs": {
+ "url": "https://github.com/eslint/eslint-visitor-keys/issues"
+ },
+ "homepage": "https://github.com/eslint/eslint-visitor-keys#readme"
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md
new file mode 100644
index 00000000000..ffea6b434a4
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/README.md
@@ -0,0 +1,171 @@
+### Esrecurse [![Build Status](https://travis-ci.org/estools/esrecurse.svg?branch=master)](https://travis-ci.org/estools/esrecurse)
+
+Esrecurse ([esrecurse](https://github.com/estools/esrecurse)) is
+[ECMAScript](https://www.ecma-international.org/publications/standards/Ecma-262.htm)
+recursive traversing functionality.
+
+### Example Usage
+
+The following code will output all variables declared at the root of a file.
+
+```javascript
+esrecurse.visit(ast, {
+ XXXStatement: function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+ }
+});
+```
+
+We can use `Visitor` instance.
+
+```javascript
+var visitor = new esrecurse.Visitor({
+ XXXStatement: function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+ }
+});
+
+visitor.visit(ast);
+```
+
+We can inherit `Visitor` instance easily.
+
+```javascript
+class Derived extends esrecurse.Visitor {
+ constructor()
+ {
+ super(null);
+ }
+
+ XXXStatement(node) {
+ }
+}
+```
+
+```javascript
+function DerivedVisitor() {
+ esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
+}
+util.inherits(DerivedVisitor, esrecurse.Visitor);
+DerivedVisitor.prototype.XXXStatement = function (node) {
+ this.visit(node.left);
+ // do something...
+ this.visit(node.right);
+};
+```
+
+And you can invoke default visiting operation inside custom visit operation.
+
+```javascript
+function DerivedVisitor() {
+ esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);
+}
+util.inherits(DerivedVisitor, esrecurse.Visitor);
+DerivedVisitor.prototype.XXXStatement = function (node) {
+ // do something...
+ this.visitChildren(node);
+};
+```
+
+The `childVisitorKeys` option does customize the behaviour of `this.visitChildren(node)`.
+We can use user-defined node types.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ // Extending the existing traversing rules.
+ childVisitorKeys: {
+ // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
+ TestExpression: ['argument']
+ }
+ }
+);
+```
+
+We can use the `fallback` option as well.
+If the `fallback` option is `"iteration"`, `esrecurse` would visit all enumerable properties of unknown nodes.
+Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
+
+```javascript
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ fallback: 'iteration'
+ }
+);
+```
+
+If the `fallback` option is a function, `esrecurse` calls this function to determine the enumerable properties of unknown nodes.
+Please note circular references cause the stack overflow. AST might have circular references in additional properties for some purpose (e.g. `node.parent`).
+
+```javascript
+esrecurse.visit(
+ ast,
+ {
+ Literal: function (node) {
+ // do something...
+ }
+ },
+ {
+ fallback: function (node) {
+ return Object.keys(node).filter(function(key) {
+ return key !== 'argument'
+ });
+ }
+ }
+);
+```
+
+### License
+
+Copyright (C) 2014 [Yusuke Suzuki](https://github.com/Constellation)
+ (twitter: [@Constellation](https://twitter.com/Constellation)) and other contributors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js
new file mode 100644
index 00000000000..15d57dfd021
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/esrecurse.js
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2014 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+(function () {
+ 'use strict';
+
+ var estraverse = require('estraverse');
+
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+
+ function isProperty(nodeType, key) {
+ return (nodeType === estraverse.Syntax.ObjectExpression || nodeType === estraverse.Syntax.ObjectPattern) && key === 'properties';
+ }
+
+ function Visitor(visitor, options) {
+ options = options || {};
+
+ this.__visitor = visitor || this;
+ this.__childVisitorKeys = options.childVisitorKeys
+ ? Object.assign({}, estraverse.VisitorKeys, options.childVisitorKeys)
+ : estraverse.VisitorKeys;
+ if (options.fallback === 'iteration') {
+ this.__fallback = Object.keys;
+ } else if (typeof options.fallback === 'function') {
+ this.__fallback = options.fallback;
+ }
+ }
+
+ /* Default method for visiting children.
+ * When you need to call default visiting operation inside custom visiting
+ * operation, you can use it with `this.visitChildren(node)`.
+ */
+ Visitor.prototype.visitChildren = function (node) {
+ var type, children, i, iz, j, jz, child;
+
+ if (node == null) {
+ return;
+ }
+
+ type = node.type || estraverse.Syntax.Property;
+
+ children = this.__childVisitorKeys[type];
+ if (!children) {
+ if (this.__fallback) {
+ children = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + type + '.');
+ }
+ }
+
+ for (i = 0, iz = children.length; i < iz; ++i) {
+ child = node[children[i]];
+ if (child) {
+ if (Array.isArray(child)) {
+ for (j = 0, jz = child.length; j < jz; ++j) {
+ if (child[j]) {
+ if (isNode(child[j]) || isProperty(type, children[i])) {
+ this.visit(child[j]);
+ }
+ }
+ }
+ } else if (isNode(child)) {
+ this.visit(child);
+ }
+ }
+ }
+ };
+
+ /* Dispatching node. */
+ Visitor.prototype.visit = function (node) {
+ var type;
+
+ if (node == null) {
+ return;
+ }
+
+ type = node.type || estraverse.Syntax.Property;
+ if (this.__visitor[type]) {
+ this.__visitor[type].call(this, node);
+ return;
+ }
+ this.visitChildren(node);
+ };
+
+ exports.version = require('./package.json').version;
+ exports.Visitor = Visitor;
+ exports.visit = function (node, visitor, options) {
+ var v = new Visitor(visitor, options);
+ v.visit(node);
+ };
+}());
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/LICENSE.BSD b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
index 3e580c355a9..3e580c355a9 100644
--- a/tools/node_modules/babel-eslint/node_modules/esutils/LICENSE.BSD
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md
new file mode 100644
index 00000000000..ccd3377f3e9
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/README.md
@@ -0,0 +1,153 @@
+### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse)
+
+Estraverse ([estraverse](http://github.com/estools/estraverse)) is
+[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
+traversal functions from [esmangle project](http://github.com/estools/esmangle).
+
+### Documentation
+
+You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage).
+
+### Example Usage
+
+The following code will output all variables declared at the root of a file.
+
+```javascript
+estraverse.traverse(ast, {
+ enter: function (node, parent) {
+ if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
+ return estraverse.VisitorOption.Skip;
+ },
+ leave: function (node, parent) {
+ if (node.type == 'VariableDeclarator')
+ console.log(node.id.name);
+ }
+});
+```
+
+We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break.
+
+```javascript
+estraverse.traverse(ast, {
+ enter: function (node) {
+ this.break();
+ }
+});
+```
+
+And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it.
+
+```javascript
+result = estraverse.replace(tree, {
+ enter: function (node) {
+ // Replace it with replaced.
+ if (node.type === 'Literal')
+ return replaced;
+ }
+});
+```
+
+By passing `visitor.keys` mapping, we can extend estraverse traversing functionality.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Extending the existing traversing rules.
+ keys: {
+ // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
+ TestExpression: ['argument']
+ }
+});
+```
+
+By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Iterating the child **nodes** of unknown nodes.
+ fallback: 'iteration'
+});
+```
+
+When `visitor.fallback` is a function, we can determine which keys to visit on each node.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Skip the `argument` property of each node
+ fallback: function(node) {
+ return Object.keys(node).filter(function(key) {
+ return key !== 'argument';
+ });
+ }
+});
+```
+
+### License
+
+Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation)
+ (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js
new file mode 100644
index 00000000000..93225bb0c40
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/estraverse.js
@@ -0,0 +1,801 @@
+/*
+ Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/*jslint vars:false, bitwise:true*/
+/*jshint indent:4*/
+/*global exports:true*/
+(function clone(exports) {
+ 'use strict';
+
+ var Syntax,
+ VisitorOption,
+ VisitorKeys,
+ BREAK,
+ SKIP,
+ REMOVE;
+
+ function deepCopy(obj) {
+ var ret = {}, key, val;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ val = obj[key];
+ if (typeof val === 'object' && val !== null) {
+ ret[key] = deepCopy(val);
+ } else {
+ ret[key] = val;
+ }
+ }
+ }
+ return ret;
+ }
+
+ // based on LLVM libc++ upper_bound / lower_bound
+ // MIT License
+
+ function upperBound(array, func) {
+ var diff, len, i, current;
+
+ len = array.length;
+ i = 0;
+
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ len = diff;
+ } else {
+ i = current + 1;
+ len -= diff + 1;
+ }
+ }
+ return i;
+ }
+
+ Syntax = {
+ AssignmentExpression: 'AssignmentExpression',
+ AssignmentPattern: 'AssignmentPattern',
+ ArrayExpression: 'ArrayExpression',
+ ArrayPattern: 'ArrayPattern',
+ ArrowFunctionExpression: 'ArrowFunctionExpression',
+ AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
+ BlockStatement: 'BlockStatement',
+ BinaryExpression: 'BinaryExpression',
+ BreakStatement: 'BreakStatement',
+ CallExpression: 'CallExpression',
+ CatchClause: 'CatchClause',
+ ChainExpression: 'ChainExpression',
+ ClassBody: 'ClassBody',
+ ClassDeclaration: 'ClassDeclaration',
+ ClassExpression: 'ClassExpression',
+ ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.
+ ConditionalExpression: 'ConditionalExpression',
+ ContinueStatement: 'ContinueStatement',
+ DebuggerStatement: 'DebuggerStatement',
+ DirectiveStatement: 'DirectiveStatement',
+ DoWhileStatement: 'DoWhileStatement',
+ EmptyStatement: 'EmptyStatement',
+ ExportAllDeclaration: 'ExportAllDeclaration',
+ ExportDefaultDeclaration: 'ExportDefaultDeclaration',
+ ExportNamedDeclaration: 'ExportNamedDeclaration',
+ ExportSpecifier: 'ExportSpecifier',
+ ExpressionStatement: 'ExpressionStatement',
+ ForStatement: 'ForStatement',
+ ForInStatement: 'ForInStatement',
+ ForOfStatement: 'ForOfStatement',
+ FunctionDeclaration: 'FunctionDeclaration',
+ FunctionExpression: 'FunctionExpression',
+ GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.
+ Identifier: 'Identifier',
+ IfStatement: 'IfStatement',
+ ImportExpression: 'ImportExpression',
+ ImportDeclaration: 'ImportDeclaration',
+ ImportDefaultSpecifier: 'ImportDefaultSpecifier',
+ ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
+ ImportSpecifier: 'ImportSpecifier',
+ Literal: 'Literal',
+ LabeledStatement: 'LabeledStatement',
+ LogicalExpression: 'LogicalExpression',
+ MemberExpression: 'MemberExpression',
+ MetaProperty: 'MetaProperty',
+ MethodDefinition: 'MethodDefinition',
+ ModuleSpecifier: 'ModuleSpecifier',
+ NewExpression: 'NewExpression',
+ ObjectExpression: 'ObjectExpression',
+ ObjectPattern: 'ObjectPattern',
+ Program: 'Program',
+ Property: 'Property',
+ RestElement: 'RestElement',
+ ReturnStatement: 'ReturnStatement',
+ SequenceExpression: 'SequenceExpression',
+ SpreadElement: 'SpreadElement',
+ Super: 'Super',
+ SwitchStatement: 'SwitchStatement',
+ SwitchCase: 'SwitchCase',
+ TaggedTemplateExpression: 'TaggedTemplateExpression',
+ TemplateElement: 'TemplateElement',
+ TemplateLiteral: 'TemplateLiteral',
+ ThisExpression: 'ThisExpression',
+ ThrowStatement: 'ThrowStatement',
+ TryStatement: 'TryStatement',
+ UnaryExpression: 'UnaryExpression',
+ UpdateExpression: 'UpdateExpression',
+ VariableDeclaration: 'VariableDeclaration',
+ VariableDeclarator: 'VariableDeclarator',
+ WhileStatement: 'WhileStatement',
+ WithStatement: 'WithStatement',
+ YieldExpression: 'YieldExpression'
+ };
+
+ VisitorKeys = {
+ AssignmentExpression: ['left', 'right'],
+ AssignmentPattern: ['left', 'right'],
+ ArrayExpression: ['elements'],
+ ArrayPattern: ['elements'],
+ ArrowFunctionExpression: ['params', 'body'],
+ AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
+ BlockStatement: ['body'],
+ BinaryExpression: ['left', 'right'],
+ BreakStatement: ['label'],
+ CallExpression: ['callee', 'arguments'],
+ CatchClause: ['param', 'body'],
+ ChainExpression: ['expression'],
+ ClassBody: ['body'],
+ ClassDeclaration: ['id', 'superClass', 'body'],
+ ClassExpression: ['id', 'superClass', 'body'],
+ ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ ConditionalExpression: ['test', 'consequent', 'alternate'],
+ ContinueStatement: ['label'],
+ DebuggerStatement: [],
+ DirectiveStatement: [],
+ DoWhileStatement: ['body', 'test'],
+ EmptyStatement: [],
+ ExportAllDeclaration: ['source'],
+ ExportDefaultDeclaration: ['declaration'],
+ ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
+ ExportSpecifier: ['exported', 'local'],
+ ExpressionStatement: ['expression'],
+ ForStatement: ['init', 'test', 'update', 'body'],
+ ForInStatement: ['left', 'right', 'body'],
+ ForOfStatement: ['left', 'right', 'body'],
+ FunctionDeclaration: ['id', 'params', 'body'],
+ FunctionExpression: ['id', 'params', 'body'],
+ GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ Identifier: [],
+ IfStatement: ['test', 'consequent', 'alternate'],
+ ImportExpression: ['source'],
+ ImportDeclaration: ['specifiers', 'source'],
+ ImportDefaultSpecifier: ['local'],
+ ImportNamespaceSpecifier: ['local'],
+ ImportSpecifier: ['imported', 'local'],
+ Literal: [],
+ LabeledStatement: ['label', 'body'],
+ LogicalExpression: ['left', 'right'],
+ MemberExpression: ['object', 'property'],
+ MetaProperty: ['meta', 'property'],
+ MethodDefinition: ['key', 'value'],
+ ModuleSpecifier: [],
+ NewExpression: ['callee', 'arguments'],
+ ObjectExpression: ['properties'],
+ ObjectPattern: ['properties'],
+ Program: ['body'],
+ Property: ['key', 'value'],
+ RestElement: [ 'argument' ],
+ ReturnStatement: ['argument'],
+ SequenceExpression: ['expressions'],
+ SpreadElement: ['argument'],
+ Super: [],
+ SwitchStatement: ['discriminant', 'cases'],
+ SwitchCase: ['test', 'consequent'],
+ TaggedTemplateExpression: ['tag', 'quasi'],
+ TemplateElement: [],
+ TemplateLiteral: ['quasis', 'expressions'],
+ ThisExpression: [],
+ ThrowStatement: ['argument'],
+ TryStatement: ['block', 'handler', 'finalizer'],
+ UnaryExpression: ['argument'],
+ UpdateExpression: ['argument'],
+ VariableDeclaration: ['declarations'],
+ VariableDeclarator: ['id', 'init'],
+ WhileStatement: ['test', 'body'],
+ WithStatement: ['object', 'body'],
+ YieldExpression: ['argument']
+ };
+
+ // unique id
+ BREAK = {};
+ SKIP = {};
+ REMOVE = {};
+
+ VisitorOption = {
+ Break: BREAK,
+ Skip: SKIP,
+ Remove: REMOVE
+ };
+
+ function Reference(parent, key) {
+ this.parent = parent;
+ this.key = key;
+ }
+
+ Reference.prototype.replace = function replace(node) {
+ this.parent[this.key] = node;
+ };
+
+ Reference.prototype.remove = function remove() {
+ if (Array.isArray(this.parent)) {
+ this.parent.splice(this.key, 1);
+ return true;
+ } else {
+ this.replace(null);
+ return false;
+ }
+ };
+
+ function Element(node, path, wrap, ref) {
+ this.node = node;
+ this.path = path;
+ this.wrap = wrap;
+ this.ref = ref;
+ }
+
+ function Controller() { }
+
+ // API:
+ // return property path array from root to current node
+ Controller.prototype.path = function path() {
+ var i, iz, j, jz, result, element;
+
+ function addToPath(result, path) {
+ if (Array.isArray(path)) {
+ for (j = 0, jz = path.length; j < jz; ++j) {
+ result.push(path[j]);
+ }
+ } else {
+ result.push(path);
+ }
+ }
+
+ // root node
+ if (!this.__current.path) {
+ return null;
+ }
+
+ // first node is sentinel, second node is root element
+ result = [];
+ for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
+ element = this.__leavelist[i];
+ addToPath(result, element.path);
+ }
+ addToPath(result, this.__current.path);
+ return result;
+ };
+
+ // API:
+ // return type of current node
+ Controller.prototype.type = function () {
+ var node = this.current();
+ return node.type || this.__current.wrap;
+ };
+
+ // API:
+ // return array of parent elements
+ Controller.prototype.parents = function parents() {
+ var i, iz, result;
+
+ // first node is sentinel
+ result = [];
+ for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
+ result.push(this.__leavelist[i].node);
+ }
+
+ return result;
+ };
+
+ // API:
+ // return current node
+ Controller.prototype.current = function current() {
+ return this.__current.node;
+ };
+
+ Controller.prototype.__execute = function __execute(callback, element) {
+ var previous, result;
+
+ result = undefined;
+
+ previous = this.__current;
+ this.__current = element;
+ this.__state = null;
+ if (callback) {
+ result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
+ }
+ this.__current = previous;
+
+ return result;
+ };
+
+ // API:
+ // notify control skip / break
+ Controller.prototype.notify = function notify(flag) {
+ this.__state = flag;
+ };
+
+ // API:
+ // skip child nodes of current node
+ Controller.prototype.skip = function () {
+ this.notify(SKIP);
+ };
+
+ // API:
+ // break traversals
+ Controller.prototype['break'] = function () {
+ this.notify(BREAK);
+ };
+
+ // API:
+ // remove node
+ Controller.prototype.remove = function () {
+ this.notify(REMOVE);
+ };
+
+ Controller.prototype.__initialize = function(root, visitor) {
+ this.visitor = visitor;
+ this.root = root;
+ this.__worklist = [];
+ this.__leavelist = [];
+ this.__current = null;
+ this.__state = null;
+ this.__fallback = null;
+ if (visitor.fallback === 'iteration') {
+ this.__fallback = Object.keys;
+ } else if (typeof visitor.fallback === 'function') {
+ this.__fallback = visitor.fallback;
+ }
+
+ this.__keys = VisitorKeys;
+ if (visitor.keys) {
+ this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
+ }
+ };
+
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+
+ function isProperty(nodeType, key) {
+ return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
+ }
+
+ function candidateExistsInLeaveList(leavelist, candidate) {
+ for (var i = leavelist.length - 1; i >= 0; --i) {
+ if (leavelist[i].node === candidate) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ Controller.prototype.traverse = function traverse(root, visitor) {
+ var worklist,
+ leavelist,
+ element,
+ node,
+ nodeType,
+ ret,
+ key,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel;
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ worklist.push(new Element(root, null, null, null));
+ leavelist.push(new Element(null, null, null, null));
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ ret = this.__execute(visitor.leave, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+ continue;
+ }
+
+ if (element.node) {
+
+ ret = this.__execute(visitor.enter, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || ret === SKIP) {
+ continue;
+ }
+
+ node = element.node;
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (Array.isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+
+ if (candidateExistsInLeaveList(leavelist, candidate[current2])) {
+ continue;
+ }
+
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', null);
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, null);
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ if (candidateExistsInLeaveList(leavelist, candidate)) {
+ continue;
+ }
+
+ worklist.push(new Element(candidate, key, null, null));
+ }
+ }
+ }
+ }
+ };
+
+ Controller.prototype.replace = function replace(root, visitor) {
+ var worklist,
+ leavelist,
+ node,
+ nodeType,
+ target,
+ element,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel,
+ outer,
+ key;
+
+ function removeElem(element) {
+ var i,
+ key,
+ nextElem,
+ parent;
+
+ if (element.ref.remove()) {
+ // When the reference is an element of an array.
+ key = element.ref.key;
+ parent = element.ref.parent;
+
+ // If removed from array, then decrease following items' keys.
+ i = worklist.length;
+ while (i--) {
+ nextElem = worklist[i];
+ if (nextElem.ref && nextElem.ref.parent === parent) {
+ if (nextElem.ref.key < key) {
+ break;
+ }
+ --nextElem.ref.key;
+ }
+ }
+ }
+ }
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ outer = {
+ root: root
+ };
+ element = new Element(root, null, null, new Reference(outer, 'root'));
+ worklist.push(element);
+ leavelist.push(element);
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ target = this.__execute(visitor.leave, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+ continue;
+ }
+
+ target = this.__execute(visitor.enter, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ element.node = target;
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ element.node = null;
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+
+ // node may be null
+ node = element.node;
+ if (!node) {
+ continue;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || target === SKIP) {
+ continue;
+ }
+
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (Array.isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, new Reference(node, key)));
+ }
+ }
+ }
+
+ return outer.root;
+ };
+
+ function traverse(root, visitor) {
+ var controller = new Controller();
+ return controller.traverse(root, visitor);
+ }
+
+ function replace(root, visitor) {
+ var controller = new Controller();
+ return controller.replace(root, visitor);
+ }
+
+ function extendCommentRange(comment, tokens) {
+ var target;
+
+ target = upperBound(tokens, function search(token) {
+ return token.range[0] > comment.range[0];
+ });
+
+ comment.extendedRange = [comment.range[0], comment.range[1]];
+
+ if (target !== tokens.length) {
+ comment.extendedRange[1] = tokens[target].range[0];
+ }
+
+ target -= 1;
+ if (target >= 0) {
+ comment.extendedRange[0] = tokens[target].range[1];
+ }
+
+ return comment;
+ }
+
+ function attachComments(tree, providedComments, tokens) {
+ // At first, we should calculate extended comment ranges.
+ var comments = [], comment, len, i, cursor;
+
+ if (!tree.range) {
+ throw new Error('attachComments needs range information');
+ }
+
+ // tokens array is empty, we attach comments to tree as 'leadingComments'
+ if (!tokens.length) {
+ if (providedComments.length) {
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comment = deepCopy(providedComments[i]);
+ comment.extendedRange = [0, tree.range[0]];
+ comments.push(comment);
+ }
+ tree.leadingComments = comments;
+ }
+ return tree;
+ }
+
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
+ }
+
+ // This is based on John Freeman's implementation.
+ cursor = 0;
+ traverse(tree, {
+ enter: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (comment.extendedRange[1] > node.range[0]) {
+ break;
+ }
+
+ if (comment.extendedRange[1] === node.range[0]) {
+ if (!node.leadingComments) {
+ node.leadingComments = [];
+ }
+ node.leadingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ cursor = 0;
+ traverse(tree, {
+ leave: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (node.range[1] < comment.extendedRange[0]) {
+ break;
+ }
+
+ if (node.range[1] === comment.extendedRange[0]) {
+ if (!node.trailingComments) {
+ node.trailingComments = [];
+ }
+ node.trailingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ return tree;
+ }
+
+ exports.Syntax = Syntax;
+ exports.traverse = traverse;
+ exports.replace = replace;
+ exports.attachComments = attachComments;
+ exports.VisitorKeys = VisitorKeys;
+ exports.VisitorOption = VisitorOption;
+ exports.Controller = Controller;
+ exports.cloneEnvironment = function () { return clone({}); };
+
+ return exports;
+}(exports));
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json
new file mode 100644
index 00000000000..bc99e7c4a64
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/node_modules/estraverse/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "estraverse",
+ "description": "ECMAScript JS AST traversal functions",
+ "homepage": "https://github.com/estools/estraverse",
+ "main": "estraverse.js",
+ "version": "5.2.0",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "web": "http://github.com/Constellation"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/estools/estraverse.git"
+ },
+ "devDependencies": {
+ "babel-preset-env": "^1.6.1",
+ "babel-register": "^6.3.13",
+ "chai": "^2.1.1",
+ "espree": "^1.11.0",
+ "gulp": "^3.8.10",
+ "gulp-bump": "^0.2.2",
+ "gulp-filter": "^2.0.0",
+ "gulp-git": "^1.0.1",
+ "gulp-tag-version": "^1.3.0",
+ "jshint": "^2.5.6",
+ "mocha": "^2.1.0"
+ },
+ "license": "BSD-2-Clause",
+ "scripts": {
+ "test": "npm run-script lint && npm run-script unit-test",
+ "lint": "jshint estraverse.js",
+ "unit-test": "mocha --compilers js:babel-register"
+ }
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json
new file mode 100755
index 00000000000..dec5b1bc1fd
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/esrecurse/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "esrecurse",
+ "description": "ECMAScript AST recursive visitor",
+ "homepage": "https://github.com/estools/esrecurse",
+ "main": "esrecurse.js",
+ "version": "4.3.0",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "web": "https://github.com/Constellation"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/estools/esrecurse.git"
+ },
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.24.1",
+ "babel-eslint": "^7.2.3",
+ "babel-preset-es2015": "^6.24.1",
+ "babel-register": "^6.24.1",
+ "chai": "^4.0.2",
+ "esprima": "^4.0.0",
+ "gulp": "^3.9.0",
+ "gulp-bump": "^2.7.0",
+ "gulp-eslint": "^4.0.0",
+ "gulp-filter": "^5.0.0",
+ "gulp-git": "^2.4.1",
+ "gulp-mocha": "^4.3.1",
+ "gulp-tag-version": "^1.2.1",
+ "jsdoc": "^3.3.0-alpha10",
+ "minimist": "^1.1.0"
+ },
+ "license": "BSD-2-Clause",
+ "scripts": {
+ "test": "gulp travis",
+ "unit-test": "gulp test",
+ "lint": "gulp lint"
+ },
+ "babel": {
+ "presets": [
+ "es2015"
+ ]
+ }
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD
new file mode 100644
index 00000000000..3e580c355a9
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/LICENSE.BSD
@@ -0,0 +1,19 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md
new file mode 100644
index 00000000000..ccd3377f3e9
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/README.md
@@ -0,0 +1,153 @@
+### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse)
+
+Estraverse ([estraverse](http://github.com/estools/estraverse)) is
+[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
+traversal functions from [esmangle project](http://github.com/estools/esmangle).
+
+### Documentation
+
+You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage).
+
+### Example Usage
+
+The following code will output all variables declared at the root of a file.
+
+```javascript
+estraverse.traverse(ast, {
+ enter: function (node, parent) {
+ if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
+ return estraverse.VisitorOption.Skip;
+ },
+ leave: function (node, parent) {
+ if (node.type == 'VariableDeclarator')
+ console.log(node.id.name);
+ }
+});
+```
+
+We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break.
+
+```javascript
+estraverse.traverse(ast, {
+ enter: function (node) {
+ this.break();
+ }
+});
+```
+
+And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it.
+
+```javascript
+result = estraverse.replace(tree, {
+ enter: function (node) {
+ // Replace it with replaced.
+ if (node.type === 'Literal')
+ return replaced;
+ }
+});
+```
+
+By passing `visitor.keys` mapping, we can extend estraverse traversing functionality.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Extending the existing traversing rules.
+ keys: {
+ // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ]
+ TestExpression: ['argument']
+ }
+});
+```
+
+By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Iterating the child **nodes** of unknown nodes.
+ fallback: 'iteration'
+});
+```
+
+When `visitor.fallback` is a function, we can determine which keys to visit on each node.
+
+```javascript
+// This tree contains a user-defined `TestExpression` node.
+var tree = {
+ type: 'TestExpression',
+
+ // This 'argument' is the property containing the other **node**.
+ argument: {
+ type: 'Literal',
+ value: 20
+ },
+
+ // This 'extended' is the property not containing the other **node**.
+ extended: true
+};
+estraverse.traverse(tree, {
+ enter: function (node) { },
+
+ // Skip the `argument` property of each node
+ fallback: function(node) {
+ return Object.keys(node).filter(function(key) {
+ return key !== 'argument';
+ });
+ }
+});
+```
+
+### License
+
+Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation)
+ (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js
new file mode 100644
index 00000000000..b106d386a6e
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/estraverse.js
@@ -0,0 +1,782 @@
+/*
+ Copyright (C) 2012-2013 Yusuke Suzuki <utatane.tea@gmail.com>
+ Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/*jslint vars:false, bitwise:true*/
+/*jshint indent:4*/
+/*global exports:true*/
+(function clone(exports) {
+ 'use strict';
+
+ var Syntax,
+ VisitorOption,
+ VisitorKeys,
+ BREAK,
+ SKIP,
+ REMOVE;
+
+ function deepCopy(obj) {
+ var ret = {}, key, val;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ val = obj[key];
+ if (typeof val === 'object' && val !== null) {
+ ret[key] = deepCopy(val);
+ } else {
+ ret[key] = val;
+ }
+ }
+ }
+ return ret;
+ }
+
+ // based on LLVM libc++ upper_bound / lower_bound
+ // MIT License
+
+ function upperBound(array, func) {
+ var diff, len, i, current;
+
+ len = array.length;
+ i = 0;
+
+ while (len) {
+ diff = len >>> 1;
+ current = i + diff;
+ if (func(array[current])) {
+ len = diff;
+ } else {
+ i = current + 1;
+ len -= diff + 1;
+ }
+ }
+ return i;
+ }
+
+ Syntax = {
+ AssignmentExpression: 'AssignmentExpression',
+ AssignmentPattern: 'AssignmentPattern',
+ ArrayExpression: 'ArrayExpression',
+ ArrayPattern: 'ArrayPattern',
+ ArrowFunctionExpression: 'ArrowFunctionExpression',
+ AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.
+ BlockStatement: 'BlockStatement',
+ BinaryExpression: 'BinaryExpression',
+ BreakStatement: 'BreakStatement',
+ CallExpression: 'CallExpression',
+ CatchClause: 'CatchClause',
+ ClassBody: 'ClassBody',
+ ClassDeclaration: 'ClassDeclaration',
+ ClassExpression: 'ClassExpression',
+ ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.
+ ConditionalExpression: 'ConditionalExpression',
+ ContinueStatement: 'ContinueStatement',
+ DebuggerStatement: 'DebuggerStatement',
+ DirectiveStatement: 'DirectiveStatement',
+ DoWhileStatement: 'DoWhileStatement',
+ EmptyStatement: 'EmptyStatement',
+ ExportAllDeclaration: 'ExportAllDeclaration',
+ ExportDefaultDeclaration: 'ExportDefaultDeclaration',
+ ExportNamedDeclaration: 'ExportNamedDeclaration',
+ ExportSpecifier: 'ExportSpecifier',
+ ExpressionStatement: 'ExpressionStatement',
+ ForStatement: 'ForStatement',
+ ForInStatement: 'ForInStatement',
+ ForOfStatement: 'ForOfStatement',
+ FunctionDeclaration: 'FunctionDeclaration',
+ FunctionExpression: 'FunctionExpression',
+ GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.
+ Identifier: 'Identifier',
+ IfStatement: 'IfStatement',
+ ImportExpression: 'ImportExpression',
+ ImportDeclaration: 'ImportDeclaration',
+ ImportDefaultSpecifier: 'ImportDefaultSpecifier',
+ ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
+ ImportSpecifier: 'ImportSpecifier',
+ Literal: 'Literal',
+ LabeledStatement: 'LabeledStatement',
+ LogicalExpression: 'LogicalExpression',
+ MemberExpression: 'MemberExpression',
+ MetaProperty: 'MetaProperty',
+ MethodDefinition: 'MethodDefinition',
+ ModuleSpecifier: 'ModuleSpecifier',
+ NewExpression: 'NewExpression',
+ ObjectExpression: 'ObjectExpression',
+ ObjectPattern: 'ObjectPattern',
+ Program: 'Program',
+ Property: 'Property',
+ RestElement: 'RestElement',
+ ReturnStatement: 'ReturnStatement',
+ SequenceExpression: 'SequenceExpression',
+ SpreadElement: 'SpreadElement',
+ Super: 'Super',
+ SwitchStatement: 'SwitchStatement',
+ SwitchCase: 'SwitchCase',
+ TaggedTemplateExpression: 'TaggedTemplateExpression',
+ TemplateElement: 'TemplateElement',
+ TemplateLiteral: 'TemplateLiteral',
+ ThisExpression: 'ThisExpression',
+ ThrowStatement: 'ThrowStatement',
+ TryStatement: 'TryStatement',
+ UnaryExpression: 'UnaryExpression',
+ UpdateExpression: 'UpdateExpression',
+ VariableDeclaration: 'VariableDeclaration',
+ VariableDeclarator: 'VariableDeclarator',
+ WhileStatement: 'WhileStatement',
+ WithStatement: 'WithStatement',
+ YieldExpression: 'YieldExpression'
+ };
+
+ VisitorKeys = {
+ AssignmentExpression: ['left', 'right'],
+ AssignmentPattern: ['left', 'right'],
+ ArrayExpression: ['elements'],
+ ArrayPattern: ['elements'],
+ ArrowFunctionExpression: ['params', 'body'],
+ AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.
+ BlockStatement: ['body'],
+ BinaryExpression: ['left', 'right'],
+ BreakStatement: ['label'],
+ CallExpression: ['callee', 'arguments'],
+ CatchClause: ['param', 'body'],
+ ClassBody: ['body'],
+ ClassDeclaration: ['id', 'superClass', 'body'],
+ ClassExpression: ['id', 'superClass', 'body'],
+ ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.
+ ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ ConditionalExpression: ['test', 'consequent', 'alternate'],
+ ContinueStatement: ['label'],
+ DebuggerStatement: [],
+ DirectiveStatement: [],
+ DoWhileStatement: ['body', 'test'],
+ EmptyStatement: [],
+ ExportAllDeclaration: ['source'],
+ ExportDefaultDeclaration: ['declaration'],
+ ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
+ ExportSpecifier: ['exported', 'local'],
+ ExpressionStatement: ['expression'],
+ ForStatement: ['init', 'test', 'update', 'body'],
+ ForInStatement: ['left', 'right', 'body'],
+ ForOfStatement: ['left', 'right', 'body'],
+ FunctionDeclaration: ['id', 'params', 'body'],
+ FunctionExpression: ['id', 'params', 'body'],
+ GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.
+ Identifier: [],
+ IfStatement: ['test', 'consequent', 'alternate'],
+ ImportExpression: ['source'],
+ ImportDeclaration: ['specifiers', 'source'],
+ ImportDefaultSpecifier: ['local'],
+ ImportNamespaceSpecifier: ['local'],
+ ImportSpecifier: ['imported', 'local'],
+ Literal: [],
+ LabeledStatement: ['label', 'body'],
+ LogicalExpression: ['left', 'right'],
+ MemberExpression: ['object', 'property'],
+ MetaProperty: ['meta', 'property'],
+ MethodDefinition: ['key', 'value'],
+ ModuleSpecifier: [],
+ NewExpression: ['callee', 'arguments'],
+ ObjectExpression: ['properties'],
+ ObjectPattern: ['properties'],
+ Program: ['body'],
+ Property: ['key', 'value'],
+ RestElement: [ 'argument' ],
+ ReturnStatement: ['argument'],
+ SequenceExpression: ['expressions'],
+ SpreadElement: ['argument'],
+ Super: [],
+ SwitchStatement: ['discriminant', 'cases'],
+ SwitchCase: ['test', 'consequent'],
+ TaggedTemplateExpression: ['tag', 'quasi'],
+ TemplateElement: [],
+ TemplateLiteral: ['quasis', 'expressions'],
+ ThisExpression: [],
+ ThrowStatement: ['argument'],
+ TryStatement: ['block', 'handler', 'finalizer'],
+ UnaryExpression: ['argument'],
+ UpdateExpression: ['argument'],
+ VariableDeclaration: ['declarations'],
+ VariableDeclarator: ['id', 'init'],
+ WhileStatement: ['test', 'body'],
+ WithStatement: ['object', 'body'],
+ YieldExpression: ['argument']
+ };
+
+ // unique id
+ BREAK = {};
+ SKIP = {};
+ REMOVE = {};
+
+ VisitorOption = {
+ Break: BREAK,
+ Skip: SKIP,
+ Remove: REMOVE
+ };
+
+ function Reference(parent, key) {
+ this.parent = parent;
+ this.key = key;
+ }
+
+ Reference.prototype.replace = function replace(node) {
+ this.parent[this.key] = node;
+ };
+
+ Reference.prototype.remove = function remove() {
+ if (Array.isArray(this.parent)) {
+ this.parent.splice(this.key, 1);
+ return true;
+ } else {
+ this.replace(null);
+ return false;
+ }
+ };
+
+ function Element(node, path, wrap, ref) {
+ this.node = node;
+ this.path = path;
+ this.wrap = wrap;
+ this.ref = ref;
+ }
+
+ function Controller() { }
+
+ // API:
+ // return property path array from root to current node
+ Controller.prototype.path = function path() {
+ var i, iz, j, jz, result, element;
+
+ function addToPath(result, path) {
+ if (Array.isArray(path)) {
+ for (j = 0, jz = path.length; j < jz; ++j) {
+ result.push(path[j]);
+ }
+ } else {
+ result.push(path);
+ }
+ }
+
+ // root node
+ if (!this.__current.path) {
+ return null;
+ }
+
+ // first node is sentinel, second node is root element
+ result = [];
+ for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {
+ element = this.__leavelist[i];
+ addToPath(result, element.path);
+ }
+ addToPath(result, this.__current.path);
+ return result;
+ };
+
+ // API:
+ // return type of current node
+ Controller.prototype.type = function () {
+ var node = this.current();
+ return node.type || this.__current.wrap;
+ };
+
+ // API:
+ // return array of parent elements
+ Controller.prototype.parents = function parents() {
+ var i, iz, result;
+
+ // first node is sentinel
+ result = [];
+ for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {
+ result.push(this.__leavelist[i].node);
+ }
+
+ return result;
+ };
+
+ // API:
+ // return current node
+ Controller.prototype.current = function current() {
+ return this.__current.node;
+ };
+
+ Controller.prototype.__execute = function __execute(callback, element) {
+ var previous, result;
+
+ result = undefined;
+
+ previous = this.__current;
+ this.__current = element;
+ this.__state = null;
+ if (callback) {
+ result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);
+ }
+ this.__current = previous;
+
+ return result;
+ };
+
+ // API:
+ // notify control skip / break
+ Controller.prototype.notify = function notify(flag) {
+ this.__state = flag;
+ };
+
+ // API:
+ // skip child nodes of current node
+ Controller.prototype.skip = function () {
+ this.notify(SKIP);
+ };
+
+ // API:
+ // break traversals
+ Controller.prototype['break'] = function () {
+ this.notify(BREAK);
+ };
+
+ // API:
+ // remove node
+ Controller.prototype.remove = function () {
+ this.notify(REMOVE);
+ };
+
+ Controller.prototype.__initialize = function(root, visitor) {
+ this.visitor = visitor;
+ this.root = root;
+ this.__worklist = [];
+ this.__leavelist = [];
+ this.__current = null;
+ this.__state = null;
+ this.__fallback = null;
+ if (visitor.fallback === 'iteration') {
+ this.__fallback = Object.keys;
+ } else if (typeof visitor.fallback === 'function') {
+ this.__fallback = visitor.fallback;
+ }
+
+ this.__keys = VisitorKeys;
+ if (visitor.keys) {
+ this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);
+ }
+ };
+
+ function isNode(node) {
+ if (node == null) {
+ return false;
+ }
+ return typeof node === 'object' && typeof node.type === 'string';
+ }
+
+ function isProperty(nodeType, key) {
+ return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
+ }
+
+ Controller.prototype.traverse = function traverse(root, visitor) {
+ var worklist,
+ leavelist,
+ element,
+ node,
+ nodeType,
+ ret,
+ key,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel;
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ worklist.push(new Element(root, null, null, null));
+ leavelist.push(new Element(null, null, null, null));
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ ret = this.__execute(visitor.leave, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+ continue;
+ }
+
+ if (element.node) {
+
+ ret = this.__execute(visitor.enter, element);
+
+ if (this.__state === BREAK || ret === BREAK) {
+ return;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || ret === SKIP) {
+ continue;
+ }
+
+ node = element.node;
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (Array.isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', null);
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, null);
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, null));
+ }
+ }
+ }
+ }
+ };
+
+ Controller.prototype.replace = function replace(root, visitor) {
+ var worklist,
+ leavelist,
+ node,
+ nodeType,
+ target,
+ element,
+ current,
+ current2,
+ candidates,
+ candidate,
+ sentinel,
+ outer,
+ key;
+
+ function removeElem(element) {
+ var i,
+ key,
+ nextElem,
+ parent;
+
+ if (element.ref.remove()) {
+ // When the reference is an element of an array.
+ key = element.ref.key;
+ parent = element.ref.parent;
+
+ // If removed from array, then decrease following items' keys.
+ i = worklist.length;
+ while (i--) {
+ nextElem = worklist[i];
+ if (nextElem.ref && nextElem.ref.parent === parent) {
+ if (nextElem.ref.key < key) {
+ break;
+ }
+ --nextElem.ref.key;
+ }
+ }
+ }
+ }
+
+ this.__initialize(root, visitor);
+
+ sentinel = {};
+
+ // reference
+ worklist = this.__worklist;
+ leavelist = this.__leavelist;
+
+ // initialize
+ outer = {
+ root: root
+ };
+ element = new Element(root, null, null, new Reference(outer, 'root'));
+ worklist.push(element);
+ leavelist.push(element);
+
+ while (worklist.length) {
+ element = worklist.pop();
+
+ if (element === sentinel) {
+ element = leavelist.pop();
+
+ target = this.__execute(visitor.leave, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+ continue;
+ }
+
+ target = this.__execute(visitor.enter, element);
+
+ // node may be replaced with null,
+ // so distinguish between undefined and null in this place
+ if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {
+ // replace
+ element.ref.replace(target);
+ element.node = target;
+ }
+
+ if (this.__state === REMOVE || target === REMOVE) {
+ removeElem(element);
+ element.node = null;
+ }
+
+ if (this.__state === BREAK || target === BREAK) {
+ return outer.root;
+ }
+
+ // node may be null
+ node = element.node;
+ if (!node) {
+ continue;
+ }
+
+ worklist.push(sentinel);
+ leavelist.push(element);
+
+ if (this.__state === SKIP || target === SKIP) {
+ continue;
+ }
+
+ nodeType = node.type || element.wrap;
+ candidates = this.__keys[nodeType];
+ if (!candidates) {
+ if (this.__fallback) {
+ candidates = this.__fallback(node);
+ } else {
+ throw new Error('Unknown node type ' + nodeType + '.');
+ }
+ }
+
+ current = candidates.length;
+ while ((current -= 1) >= 0) {
+ key = candidates[current];
+ candidate = node[key];
+ if (!candidate) {
+ continue;
+ }
+
+ if (Array.isArray(candidate)) {
+ current2 = candidate.length;
+ while ((current2 -= 1) >= 0) {
+ if (!candidate[current2]) {
+ continue;
+ }
+ if (isProperty(nodeType, candidates[current])) {
+ element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));
+ } else if (isNode(candidate[current2])) {
+ element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));
+ } else {
+ continue;
+ }
+ worklist.push(element);
+ }
+ } else if (isNode(candidate)) {
+ worklist.push(new Element(candidate, key, null, new Reference(node, key)));
+ }
+ }
+ }
+
+ return outer.root;
+ };
+
+ function traverse(root, visitor) {
+ var controller = new Controller();
+ return controller.traverse(root, visitor);
+ }
+
+ function replace(root, visitor) {
+ var controller = new Controller();
+ return controller.replace(root, visitor);
+ }
+
+ function extendCommentRange(comment, tokens) {
+ var target;
+
+ target = upperBound(tokens, function search(token) {
+ return token.range[0] > comment.range[0];
+ });
+
+ comment.extendedRange = [comment.range[0], comment.range[1]];
+
+ if (target !== tokens.length) {
+ comment.extendedRange[1] = tokens[target].range[0];
+ }
+
+ target -= 1;
+ if (target >= 0) {
+ comment.extendedRange[0] = tokens[target].range[1];
+ }
+
+ return comment;
+ }
+
+ function attachComments(tree, providedComments, tokens) {
+ // At first, we should calculate extended comment ranges.
+ var comments = [], comment, len, i, cursor;
+
+ if (!tree.range) {
+ throw new Error('attachComments needs range information');
+ }
+
+ // tokens array is empty, we attach comments to tree as 'leadingComments'
+ if (!tokens.length) {
+ if (providedComments.length) {
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comment = deepCopy(providedComments[i]);
+ comment.extendedRange = [0, tree.range[0]];
+ comments.push(comment);
+ }
+ tree.leadingComments = comments;
+ }
+ return tree;
+ }
+
+ for (i = 0, len = providedComments.length; i < len; i += 1) {
+ comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));
+ }
+
+ // This is based on John Freeman's implementation.
+ cursor = 0;
+ traverse(tree, {
+ enter: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (comment.extendedRange[1] > node.range[0]) {
+ break;
+ }
+
+ if (comment.extendedRange[1] === node.range[0]) {
+ if (!node.leadingComments) {
+ node.leadingComments = [];
+ }
+ node.leadingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ cursor = 0;
+ traverse(tree, {
+ leave: function (node) {
+ var comment;
+
+ while (cursor < comments.length) {
+ comment = comments[cursor];
+ if (node.range[1] < comment.extendedRange[0]) {
+ break;
+ }
+
+ if (node.range[1] === comment.extendedRange[0]) {
+ if (!node.trailingComments) {
+ node.trailingComments = [];
+ }
+ node.trailingComments.push(comment);
+ comments.splice(cursor, 1);
+ } else {
+ cursor += 1;
+ }
+ }
+
+ // already out of owned node
+ if (cursor === comments.length) {
+ return VisitorOption.Break;
+ }
+
+ if (comments[cursor].extendedRange[0] > node.range[1]) {
+ return VisitorOption.Skip;
+ }
+ }
+ });
+
+ return tree;
+ }
+
+ exports.version = require('./package.json').version;
+ exports.Syntax = Syntax;
+ exports.traverse = traverse;
+ exports.replace = replace;
+ exports.attachComments = attachComments;
+ exports.VisitorKeys = VisitorKeys;
+ exports.VisitorOption = VisitorOption;
+ exports.Controller = Controller;
+ exports.cloneEnvironment = function () { return clone({}); };
+
+ return exports;
+}(exports));
+/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json
new file mode 100644
index 00000000000..11382386723
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/estraverse/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "estraverse",
+ "description": "ECMAScript JS AST traversal functions",
+ "homepage": "https://github.com/estools/estraverse",
+ "main": "estraverse.js",
+ "version": "4.3.0",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "maintainers": [
+ {
+ "name": "Yusuke Suzuki",
+ "email": "utatane.tea@gmail.com",
+ "web": "http://github.com/Constellation"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/estools/estraverse.git"
+ },
+ "devDependencies": {
+ "babel-preset-env": "^1.6.1",
+ "babel-register": "^6.3.13",
+ "chai": "^2.1.1",
+ "espree": "^1.11.0",
+ "gulp": "^3.8.10",
+ "gulp-bump": "^0.2.2",
+ "gulp-filter": "^2.0.0",
+ "gulp-git": "^1.0.1",
+ "gulp-tag-version": "^1.3.0",
+ "jshint": "^2.5.6",
+ "mocha": "^2.1.0"
+ },
+ "license": "BSD-2-Clause",
+ "scripts": {
+ "test": "npm run-script lint && npm run-script unit-test",
+ "lint": "jshint estraverse.js",
+ "unit-test": "mocha --compilers js:babel-register"
+ }
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE b/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE
new file mode 100644
index 00000000000..19129e315fe
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md b/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md
new file mode 100644
index 00000000000..2293a14fdc3
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/README.md
@@ -0,0 +1,443 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any version satisfies)
+* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0`
+* `^0.2.3` := `>=0.2.3 <0.3.0`
+* `^0.0.3` := `>=0.0.3 <0.0.4`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0`
+* `^0.0.x` := `>=0.0.0 <0.1.0`
+* `^0.0` := `>=0.0.0 <0.1.0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0`
+* `^0.x` := `>=0.0.0 <1.0.0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `2.1.5`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js b/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js
new file mode 100755
index 00000000000..666034a75d8
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/bin/semver.js
@@ -0,0 +1,174 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+var argv = process.argv.slice(2)
+
+var versions = []
+
+var range = []
+
+var inc = null
+
+var version = require('../package.json').version
+
+var loose = false
+
+var includePrerelease = false
+
+var coerce = false
+
+var rtl = false
+
+var identifier
+
+var semver = require('../semver')
+
+var reverse = false
+
+var options = {}
+
+main()
+
+function main () {
+ if (!argv.length) return help()
+ while (argv.length) {
+ var a = argv.shift()
+ var indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(a.slice(indexOfEqualSign + 1))
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
+
+ versions = versions.map(function (v) {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter(function (v) {
+ return semver.valid(v)
+ })
+ if (!versions.length) return fail()
+ if (inc && (versions.length !== 1 || range.length)) { return failInc() }
+
+ for (var i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter(function (v) {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) return fail()
+ }
+ return success(versions)
+}
+
+function failInc () {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+function fail () { process.exit(1) }
+
+function success () {
+ var compare = reverse ? 'rcompare' : 'compare'
+ versions.sort(function (a, b) {
+ return semver[compare](a, b, options)
+ }).map(function (v) {
+ return semver.clean(v, options)
+ }).map(function (v) {
+ return inc ? semver.inc(v, inc, options, identifier) : v
+ }).forEach(function (v, i, _) { console.log(v) })
+}
+
+function help () {
+ console.log(['SemVer ' + version,
+ '',
+ 'A JavaScript implementation of the https://semver.org/ specification',
+ 'Copyright Isaac Z. Schlueter',
+ '',
+ 'Usage: semver [options] <version> [<version> [...]]',
+ 'Prints valid versions sorted by SemVer precedence',
+ '',
+ 'Options:',
+ '-r --range <range>',
+ ' Print versions that match the specified range.',
+ '',
+ '-i --increment [<level>]',
+ ' Increment a version by the specified level. Level can',
+ ' be one of: major, minor, patch, premajor, preminor,',
+ " prepatch, or prerelease. Default level is 'patch'.",
+ ' Only one version may be specified.',
+ '',
+ '--preid <identifier>',
+ ' Identifier to be used to prefix premajor, preminor,',
+ ' prepatch or prerelease version increments.',
+ '',
+ '-l --loose',
+ ' Interpret versions and ranges loosely',
+ '',
+ '-p --include-prerelease',
+ ' Always include prerelease versions in range matching',
+ '',
+ '-c --coerce',
+ ' Coerce a string into SemVer if possible',
+ ' (does not imply --loose)',
+ '',
+ '--rtl',
+ ' Coerce version strings right to left',
+ '',
+ '--ltr',
+ ' Coerce version strings left to right (default)',
+ '',
+ 'Program exits successfully if any valid version satisfies',
+ 'all supplied ranges, and prints all satisfying versions.',
+ '',
+ 'If no satisfying versions are found, then exits failure.',
+ '',
+ 'Versions are printed in ascending order, so supplying',
+ 'multiple versions to the utility will just sort them.'
+ ].join('\n'))
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json b/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json
new file mode 100644
index 00000000000..bdd442f5002
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "semver",
+ "version": "6.3.0",
+ "description": "The semantic version parser used by npm.",
+ "main": "semver.js",
+ "scripts": {
+ "test": "tap",
+ "preversion": "npm test",
+ "postversion": "npm publish",
+ "postpublish": "git push origin --follow-tags"
+ },
+ "devDependencies": {
+ "tap": "^14.3.1"
+ },
+ "license": "ISC",
+ "repository": "https://github.com/npm/node-semver",
+ "bin": {
+ "semver": "./bin/semver.js"
+ },
+ "files": [
+ "bin",
+ "range.bnf",
+ "semver.js"
+ ],
+ "tap": {
+ "check-coverage": true
+ }
+}
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf b/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf
new file mode 100644
index 00000000000..d4c6ae0d76c
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js b/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js
new file mode 100644
index 00000000000..636fa4365a1
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/node_modules/semver/semver.js
@@ -0,0 +1,1596 @@
+exports = module.exports = SemVer
+
+var debug
+/* istanbul ignore next */
+if (typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
+ debug = function () {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift('SEMVER')
+ console.log.apply(console, args)
+ }
+} else {
+ debug = function () {}
+}
+
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+exports.SEMVER_SPEC_VERSION = '2.0.0'
+
+var MAX_LENGTH = 256
+var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+ /* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+var MAX_SAFE_COMPONENT_LENGTH = 16
+
+// The actual regexps go on exports.re
+var re = exports.re = []
+var src = exports.src = []
+var t = exports.tokens = {}
+var R = 0
+
+function tok (n) {
+ t[n] = R++
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+tok('NUMERICIDENTIFIER')
+src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'
+tok('NUMERICIDENTIFIERLOOSE')
+src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+tok('NONNUMERICIDENTIFIER')
+src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+tok('MAINVERSION')
+src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIER] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIER] + ')'
+
+tok('MAINVERSIONLOOSE')
+src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' +
+ '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+tok('PRERELEASEIDENTIFIER')
+src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +
+ '|' + src[t.NONNUMERICIDENTIFIER] + ')'
+
+tok('PRERELEASEIDENTIFIERLOOSE')
+src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +
+ '|' + src[t.NONNUMERICIDENTIFIER] + ')'
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+tok('PRERELEASE')
+src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +
+ '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'
+
+tok('PRERELEASELOOSE')
+src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +
+ '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+tok('BUILDIDENTIFIER')
+src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+tok('BUILD')
+src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] +
+ '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))'
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+tok('FULL')
+tok('FULLPLAIN')
+src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +
+ src[t.PRERELEASE] + '?' +
+ src[t.BUILD] + '?'
+
+src[t.FULL] = '^' + src[t.FULLPLAIN] + '$'
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+tok('LOOSEPLAIN')
+src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] +
+ src[t.PRERELEASELOOSE] + '?' +
+ src[t.BUILD] + '?'
+
+tok('LOOSE')
+src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'
+
+tok('GTLT')
+src[t.GTLT] = '((?:<|>)?=?)'
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+tok('XRANGEIDENTIFIERLOOSE')
+src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
+tok('XRANGEIDENTIFIER')
+src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'
+
+tok('XRANGEPLAIN')
+src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' +
+ '(?:' + src[t.PRERELEASE] + ')?' +
+ src[t.BUILD] + '?' +
+ ')?)?'
+
+tok('XRANGEPLAINLOOSE')
+src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +
+ '(?:' + src[t.PRERELEASELOOSE] + ')?' +
+ src[t.BUILD] + '?' +
+ ')?)?'
+
+tok('XRANGE')
+src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'
+tok('XRANGELOOSE')
+src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+tok('COERCE')
+src[t.COERCE] = '(^|[^\\d])' +
+ '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
+ '(?:$|[^\\d])'
+tok('COERCERTL')
+re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+tok('LONETILDE')
+src[t.LONETILDE] = '(?:~>?)'
+
+tok('TILDETRIM')
+src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'
+re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')
+var tildeTrimReplace = '$1~'
+
+tok('TILDE')
+src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'
+tok('TILDELOOSE')
+src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+tok('LONECARET')
+src[t.LONECARET] = '(?:\\^)'
+
+tok('CARETTRIM')
+src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'
+re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')
+var caretTrimReplace = '$1^'
+
+tok('CARET')
+src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'
+tok('CARETLOOSE')
+src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+tok('COMPARATORLOOSE')
+src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'
+tok('COMPARATOR')
+src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+tok('COMPARATORTRIM')
+src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] +
+ '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'
+
+// this one has to use the /g flag
+re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')
+var comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+tok('HYPHENRANGE')
+src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[t.XRANGEPLAIN] + ')' +
+ '\\s*$'
+
+tok('HYPHENRANGELOOSE')
+src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +
+ '\\s+-\\s+' +
+ '(' + src[t.XRANGEPLAINLOOSE] + ')' +
+ '\\s*$'
+
+// Star ranges basically just allow anything at all.
+tok('STAR')
+src[t.STAR] = '(<|>)?=?\\s*\\*'
+
+// Compile to actual regexp objects.
+// All are flag-free, unless they were created above with a flag.
+for (var i = 0; i < R; i++) {
+ debug(i, src[i])
+ if (!re[i]) {
+ re[i] = new RegExp(src[i])
+ }
+}
+
+exports.parse = parse
+function parse (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null
+ }
+
+ var r = options.loose ? re[t.LOOSE] : re[t.FULL]
+ if (!r.test(version)) {
+ return null
+ }
+
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ return null
+ }
+}
+
+exports.valid = valid
+function valid (version, options) {
+ var v = parse(version, options)
+ return v ? v.version : null
+}
+
+exports.clean = clean
+function clean (version, options) {
+ var s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+
+exports.SemVer = SemVer
+
+function SemVer (version, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+ if (version instanceof SemVer) {
+ if (version.loose === options.loose) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
+ }
+
+ if (!(this instanceof SemVer)) {
+ return new SemVer(version, options)
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+
+ var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError('Invalid Version: ' + version)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map(function (id) {
+ if (/^[0-9]+$/.test(id)) {
+ var num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+}
+
+SemVer.prototype.format = function () {
+ this.version = this.major + '.' + this.minor + '.' + this.patch
+ if (this.prerelease.length) {
+ this.version += '-' + this.prerelease.join('.')
+ }
+ return this.version
+}
+
+SemVer.prototype.toString = function () {
+ return this.version
+}
+
+SemVer.prototype.compare = function (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+}
+
+SemVer.prototype.compareMain = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+}
+
+SemVer.prototype.comparePre = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ var i = 0
+ do {
+ var a = this.prerelease[i]
+ var b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+SemVer.prototype.compareBuild = function (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ var i = 0
+ do {
+ var a = this.build[i]
+ var b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+}
+
+// preminor will bump the version up to the next minor release, and immediately
+// down to pre-release. premajor and prepatch work the same way.
+SemVer.prototype.inc = function (release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier)
+ this.inc('pre', identifier)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier)
+ }
+ this.inc('pre', identifier)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0]
+ } else {
+ var i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ this.prerelease.push(0)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0]
+ }
+ } else {
+ this.prerelease = [identifier, 0]
+ }
+ }
+ break
+
+ default:
+ throw new Error('invalid increment argument: ' + release)
+ }
+ this.format()
+ this.raw = this.version
+ return this
+}
+
+exports.inc = inc
+function inc (version, release, loose, identifier) {
+ if (typeof (loose) === 'string') {
+ identifier = loose
+ loose = undefined
+ }
+
+ try {
+ return new SemVer(version, loose).inc(release, identifier).version
+ } catch (er) {
+ return null
+ }
+}
+
+exports.diff = diff
+function diff (version1, version2) {
+ if (eq(version1, version2)) {
+ return null
+ } else {
+ var v1 = parse(version1)
+ var v2 = parse(version2)
+ var prefix = ''
+ if (v1.prerelease.length || v2.prerelease.length) {
+ prefix = 'pre'
+ var defaultResult = 'prerelease'
+ }
+ for (var key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key
+ }
+ }
+ }
+ return defaultResult // may be undefined
+ }
+}
+
+exports.compareIdentifiers = compareIdentifiers
+
+var numeric = /^[0-9]+$/
+function compareIdentifiers (a, b) {
+ var anum = numeric.test(a)
+ var bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+exports.rcompareIdentifiers = rcompareIdentifiers
+function rcompareIdentifiers (a, b) {
+ return compareIdentifiers(b, a)
+}
+
+exports.major = major
+function major (a, loose) {
+ return new SemVer(a, loose).major
+}
+
+exports.minor = minor
+function minor (a, loose) {
+ return new SemVer(a, loose).minor
+}
+
+exports.patch = patch
+function patch (a, loose) {
+ return new SemVer(a, loose).patch
+}
+
+exports.compare = compare
+function compare (a, b, loose) {
+ return new SemVer(a, loose).compare(new SemVer(b, loose))
+}
+
+exports.compareLoose = compareLoose
+function compareLoose (a, b) {
+ return compare(a, b, true)
+}
+
+exports.compareBuild = compareBuild
+function compareBuild (a, b, loose) {
+ var versionA = new SemVer(a, loose)
+ var versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+
+exports.rcompare = rcompare
+function rcompare (a, b, loose) {
+ return compare(b, a, loose)
+}
+
+exports.sort = sort
+function sort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(a, b, loose)
+ })
+}
+
+exports.rsort = rsort
+function rsort (list, loose) {
+ return list.sort(function (a, b) {
+ return exports.compareBuild(b, a, loose)
+ })
+}
+
+exports.gt = gt
+function gt (a, b, loose) {
+ return compare(a, b, loose) > 0
+}
+
+exports.lt = lt
+function lt (a, b, loose) {
+ return compare(a, b, loose) < 0
+}
+
+exports.eq = eq
+function eq (a, b, loose) {
+ return compare(a, b, loose) === 0
+}
+
+exports.neq = neq
+function neq (a, b, loose) {
+ return compare(a, b, loose) !== 0
+}
+
+exports.gte = gte
+function gte (a, b, loose) {
+ return compare(a, b, loose) >= 0
+}
+
+exports.lte = lte
+function lte (a, b, loose) {
+ return compare(a, b, loose) <= 0
+}
+
+exports.cmp = cmp
+function cmp (a, op, b, loose) {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object')
+ a = a.version
+ if (typeof b === 'object')
+ b = b.version
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError('Invalid operator: ' + op)
+ }
+}
+
+exports.Comparator = Comparator
+function Comparator (comp, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ if (!(this instanceof Comparator)) {
+ return new Comparator(comp, options)
+ }
+
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+}
+
+var ANY = {}
+Comparator.prototype.parse = function (comp) {
+ var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ var m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError('Invalid comparator: ' + comp)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+}
+
+Comparator.prototype.toString = function () {
+ return this.value
+}
+
+Comparator.prototype.test = function (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+}
+
+Comparator.prototype.intersects = function (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ var rangeTmp
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ rangeTmp = new Range(comp.value, options)
+ return satisfies(this.value, rangeTmp, options)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ rangeTmp = new Range(this.value, options)
+ return satisfies(comp.semver, rangeTmp, options)
+ }
+
+ var sameDirectionIncreasing =
+ (this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '>=' || comp.operator === '>')
+ var sameDirectionDecreasing =
+ (this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '<=' || comp.operator === '<')
+ var sameSemVer = this.semver.version === comp.semver.version
+ var differentDirectionsInclusive =
+ (this.operator === '>=' || this.operator === '<=') &&
+ (comp.operator === '>=' || comp.operator === '<=')
+ var oppositeDirectionsLessThan =
+ cmp(this.semver, '<', comp.semver, options) &&
+ ((this.operator === '>=' || this.operator === '>') &&
+ (comp.operator === '<=' || comp.operator === '<'))
+ var oppositeDirectionsGreaterThan =
+ cmp(this.semver, '>', comp.semver, options) &&
+ ((this.operator === '<=' || this.operator === '<') &&
+ (comp.operator === '>=' || comp.operator === '>'))
+
+ return sameDirectionIncreasing || sameDirectionDecreasing ||
+ (sameSemVer && differentDirectionsInclusive) ||
+ oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
+}
+
+exports.Range = Range
+function Range (range, options) {
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ }
+ }
+
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ return new Range(range.value, options)
+ }
+
+ if (!(this instanceof Range)) {
+ return new Range(range, options)
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First, split based on boolean or ||
+ this.raw = range
+ this.set = range.split(/\s*\|\|\s*/).map(function (range) {
+ return this.parseRange(range.trim())
+ }, this).filter(function (c) {
+ // throw out any that are not relevant for whatever reason
+ return c.length
+ })
+
+ if (!this.set.length) {
+ throw new TypeError('Invalid SemVer Range: ' + range)
+ }
+
+ this.format()
+}
+
+Range.prototype.format = function () {
+ this.range = this.set.map(function (comps) {
+ return comps.join(' ').trim()
+ }).join('||').trim()
+ return this.range
+}
+
+Range.prototype.toString = function () {
+ return this.range
+}
+
+Range.prototype.parseRange = function (range) {
+ var loose = this.options.loose
+ range = range.trim()
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace)
+ debug('hyphen replace', range)
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range, re[t.COMPARATORTRIM])
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+
+ // normalize spaces
+ range = range.split(/\s+/).join(' ')
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ var set = range.split(' ').map(function (comp) {
+ return parseComparator(comp, this.options)
+ }, this).join(' ').split(/\s+/)
+ if (this.options.loose) {
+ // in loose mode, throw out any that are not valid comparators
+ set = set.filter(function (comp) {
+ return !!comp.match(compRe)
+ })
+ }
+ set = set.map(function (comp) {
+ return new Comparator(comp, this.options)
+ }, this)
+
+ return set
+}
+
+Range.prototype.intersects = function (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some(function (thisComparators) {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some(function (rangeComparators) {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every(function (thisComparator) {
+ return rangeComparators.every(function (rangeComparator) {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+}
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+function isSatisfiable (comparators, options) {
+ var result = true
+ var remainingComparators = comparators.slice()
+ var testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every(function (otherComparator) {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// Mostly just for testing and legacy API reasons
+exports.toComparators = toComparators
+function toComparators (range, options) {
+ return new Range(range, options).set.map(function (comp) {
+ return comp.map(function (c) {
+ return c.value
+ }).join(' ').trim().split(' ')
+ })
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+function parseComparator (comp, options) {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+function isX (id) {
+ return !id || id.toLowerCase() === 'x' || id === '*'
+}
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
+function replaceTildes (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceTilde(comp, options)
+ }).join(' ')
+}
+
+function replaceTilde (comp, options) {
+ var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('tilde', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
+// ^1.2.3 --> >=1.2.3 <2.0.0
+// ^1.2.0 --> >=1.2.0 <2.0.0
+function replaceCarets (comp, options) {
+ return comp.trim().split(/\s+/).map(function (comp) {
+ return replaceCaret(comp, options)
+ }).join(' ')
+}
+
+function replaceCaret (comp, options) {
+ debug('caret', comp, options)
+ var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ return comp.replace(r, function (_, M, m, p, pr) {
+ debug('caret', comp, _, M, m, p, pr)
+ var ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
+ } else {
+ ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + m + '.' + (+p + 1)
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + M + '.' + (+m + 1) + '.0'
+ }
+ } else {
+ ret = '>=' + M + '.' + m + '.' + p +
+ ' <' + (+M + 1) + '.0.0'
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+function replaceXRanges (comp, options) {
+ debug('replaceXRanges', comp, options)
+ return comp.split(/\s+/).map(function (comp) {
+ return replaceXRange(comp, options)
+ }).join(' ')
+}
+
+function replaceXRange (comp, options) {
+ comp = comp.trim()
+ var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ var xM = isX(M)
+ var xm = xM || isX(m)
+ var xp = xm || isX(p)
+ var anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ // >1.2.3 => >= 1.2.4
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ ret = gtlt + M + '.' + m + '.' + p + pr
+ } else if (xm) {
+ ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr
+ } else if (xp) {
+ ret = '>=' + M + '.' + m + '.0' + pr +
+ ' <' + M + '.' + (+m + 1) + '.0' + pr
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+function replaceStars (comp, options) {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp.trim().replace(re[t.STAR], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0
+function hyphenReplace ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = '>=' + fM + '.0.0'
+ } else if (isX(fp)) {
+ from = '>=' + fM + '.' + fm + '.0'
+ } else {
+ from = '>=' + from
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = '<' + (+tM + 1) + '.0.0'
+ } else if (isX(tp)) {
+ to = '<' + tM + '.' + (+tm + 1) + '.0'
+ } else if (tpr) {
+ to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
+ } else {
+ to = '<=' + to
+ }
+
+ return (from + ' ' + to).trim()
+}
+
+// if ANY of the sets match ALL of its comparators, then pass
+Range.prototype.test = function (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (var i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+}
+
+function testSet (set, version, options) {
+ for (var i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ var allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
+
+exports.satisfies = satisfies
+function satisfies (version, range, options) {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+
+exports.maxSatisfying = maxSatisfying
+function maxSatisfying (versions, range, options) {
+ var max = null
+ var maxSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+
+exports.minSatisfying = minSatisfying
+function minSatisfying (versions, range, options) {
+ var min = null
+ var minSV = null
+ try {
+ var rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach(function (v) {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+
+exports.minVersion = minVersion
+function minVersion (range, loose) {
+ range = new Range(range, loose)
+
+ var minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ comparators.forEach(function (comparator) {
+ // Clone to avoid manipulating the comparator's semver object.
+ var compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!minver || gt(minver, compver)) {
+ minver = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error('Unexpected operation: ' + comparator.operator)
+ }
+ })
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+
+exports.validRange = validRange
+function validRange (range, options) {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+
+// Determine if version is less than all the versions possible in the range
+exports.ltr = ltr
+function ltr (version, range, options) {
+ return outside(version, range, '<', options)
+}
+
+// Determine if version is greater than all the versions possible in the range.
+exports.gtr = gtr
+function gtr (version, range, options) {
+ return outside(version, range, '>', options)
+}
+
+exports.outside = outside
+function outside (version, range, hilo, options) {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ var gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisifes the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (var i = 0; i < range.set.length; ++i) {
+ var comparators = range.set[i]
+
+ var high = null
+ var low = null
+
+ comparators.forEach(function (comparator) {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+exports.prerelease = prerelease
+function prerelease (version, options) {
+ var parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+
+exports.intersects = intersects
+function intersects (r1, r2, options) {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2)
+}
+
+exports.coerce = coerce
+function coerce (version, options) {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ var match = null
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ var next
+ while ((next = re[t.COERCERTL].exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ re[t.COERCERTL].lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ return parse(match[2] +
+ '.' + (match[3] || '0') +
+ '.' + (match[4] || '0'), options)
+}
diff --git a/tools/node_modules/@babel/eslint-parser/package.json b/tools/node_modules/@babel/eslint-parser/package.json
new file mode 100644
index 00000000000..115984fa118
--- /dev/null
+++ b/tools/node_modules/@babel/eslint-parser/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "@babel/eslint-parser",
+ "version": "7.12.1",
+ "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel",
+ "author": "The Babel Team (https://babeljs.io/team)",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "eslint/babel-eslint-parser"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "bugs": {
+ "url": "https://github.com/babel/babel/issues"
+ },
+ "homepage": "https://babeljs.io/",
+ "engines": {
+ "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
+ },
+ "main": "./lib/index.js",
+ "type": "commonjs",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "peerDependencies": {
+ "@babel/core": ">=7.11.0",
+ "eslint": ">=7.5.0"
+ },
+ "dependencies": {
+ "eslint-scope": "5.1.0",
+ "eslint-visitor-keys": "^1.3.0",
+ "semver": "^6.3.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.12.1",
+ "dedent": "^0.7.0",
+ "eslint": "^7.5.0",
+ "lodash.clonedeep": "^4.5.0"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE b/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/README.md b/tools/node_modules/@babel/plugin-syntax-class-properties/README.md
new file mode 100644
index 00000000000..16ace370014
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-class-properties
+
+> Allow parsing of class properties
+
+See our website [@babel/plugin-syntax-class-properties](https://babeljs.io/docs/en/next/babel-plugin-syntax-class-properties.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-class-properties
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-class-properties --dev
+```
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js b/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js
new file mode 100644
index 00000000000..942008497a7
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-class-properties",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE
new file mode 100644
index 00000000000..f31575ec773
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md
new file mode 100644
index 00000000000..4e6303e0896
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-plugin-utils
+
+> General utilities for plugins to use
+
+See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/next/babel-helper-plugin-utils.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-plugin-utils
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-plugin-utils --dev
+```
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js
new file mode 100644
index 00000000000..adb0656fa0e
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/lib/index.js
@@ -0,0 +1,77 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.declare = declare;
+
+function declare(builder) {
+ return (api, options, dirname) => {
+ if (!api.assertVersion) {
+ api = Object.assign(copyApiObject(api), {
+ assertVersion(range) {
+ throwVersionError(range, api.version);
+ }
+
+ });
+ }
+
+ return builder(api, options || {}, dirname);
+ };
+}
+
+function copyApiObject(api) {
+ let proto = null;
+
+ if (typeof api.version === "string" && /^7\./.test(api.version)) {
+ proto = Object.getPrototypeOf(api);
+
+ if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) {
+ proto = null;
+ }
+ }
+
+ return Object.assign({}, proto, api);
+}
+
+function has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+function throwVersionError(range, version) {
+ if (typeof range === "number") {
+ if (!Number.isInteger(range)) {
+ throw new Error("Expected string or integer value.");
+ }
+
+ range = `^${range}.0.0-0`;
+ }
+
+ if (typeof range !== "string") {
+ throw new Error("Expected string or integer value.");
+ }
+
+ const limit = Error.stackTraceLimit;
+
+ if (typeof limit === "number" && limit < 25) {
+ Error.stackTraceLimit = 25;
+ }
+
+ let err;
+
+ if (version.slice(0, 2) === "7.") {
+ err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`);
+ } else {
+ err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
+ }
+
+ if (typeof limit === "number") {
+ Error.stackTraceLimit = limit;
+ }
+
+ throw Object.assign(err, {
+ code: "BABEL_VERSION_UNSUPPORTED",
+ version,
+ range
+ });
+} \ No newline at end of file
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json
new file mode 100644
index 00000000000..282d93f719f
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/node_modules/@babel/helper-plugin-utils/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@babel/helper-plugin-utils",
+ "version": "7.10.4",
+ "description": "General utilities for plugins to use",
+ "author": "Logan Smyth <loganfsmyth@gmail.com>",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-plugin-utils"
+ },
+ "main": "lib/index.js",
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/tools/node_modules/@babel/plugin-syntax-class-properties/package.json b/tools/node_modules/@babel/plugin-syntax-class-properties/package.json
new file mode 100644
index 00000000000..584a81d1514
--- /dev/null
+++ b/tools/node_modules/@babel/plugin-syntax-class-properties/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@babel/plugin-syntax-class-properties",
+ "version": "7.12.1",
+ "description": "Allow parsing of class properties",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-class-properties"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.12.1"
+ }
+} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/LICENSE b/tools/node_modules/babel-eslint/LICENSE
deleted file mode 100644
index 80194a854b9..00000000000
--- a/tools/node_modules/babel-eslint/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2014-2016 Sebastian McKenzie <sebmck@gmail.com>
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/README.md b/tools/node_modules/babel-eslint/README.md
deleted file mode 100644
index 6a4f9085e3a..00000000000
--- a/tools/node_modules/babel-eslint/README.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# babel-eslint [![npm](https://img.shields.io/npm/v/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint) [![travis](https://img.shields.io/travis/babel/babel-eslint/master.svg)](https://travis-ci.org/babel/babel-eslint) [![npm-downloads](https://img.shields.io/npm/dm/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint)
-
-**babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic
-[ESLint](https://github.com/eslint/eslint).
-
-### Why Use babel-eslint
-
-You only need to use babel-eslint if you are using types (Flow) or experimental features not supported in ESLint itself yet. Otherwise try the default parser (you don't have to use it just because you are using Babel).
-
----
-
-> If there is an issue, first check if it can be reproduced with the regular parser or with the latest versions of `eslint` and `babel-eslint`!
-
-For questions and support please visit the [`#discussion`](https://babeljs.slack.com/messages/discussion/) babel slack channel (sign up [here](https://github.com/babel/notes/issues/38)) or eslint [gitter](https://gitter.im/eslint/eslint)!
-
-> Note that the `ecmaFeatures` config property may still be required for ESLint to work properly with features not in ECMAScript 5 by default. Examples are `globalReturn` and `modules`).
-
-## Known Issues
-
-Flow:
-> Check out [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype): An `eslint` plugin that makes flow type annotations global variables and marks declarations as used. Solves the problem of false positives with `no-undef` and `no-unused-vars`.
-- `no-undef` for global flow types: `ReactElement`, `ReactClass` [#130](https://github.com/babel/babel-eslint/issues/130#issuecomment-111215076)
- - Workaround: define types as globals in `.eslintrc` or define types and import them `import type ReactElement from './types'`
-- `no-unused-vars/no-undef` with Flow declarations (`declare module A {}`) [#132](https://github.com/babel/babel-eslint/issues/132#issuecomment-112815926)
-
-Modules/strict mode
-- `no-unused-vars: [2, {vars: local}]` [#136](https://github.com/babel/babel-eslint/issues/136)
-
-Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues
-- `no-unused-vars` with jsx
-
-Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues
-
-## How does it work?
-
-ESLint allows custom parsers. This is great but some of the syntax nodes that Babel supports
-aren't supported by ESLint. When using this plugin, ESLint is monkeypatched and your code is
-transformed into code that ESLint can understand. All location info such as line numbers,
-columns is also retained so you can track down errors with ease.
-
-Basically `babel-eslint` exports an [`index.js`](/index.js) that a linter can use.
-It just needs to export a `parse` method that takes in a string of code and outputs an AST.
-
-## Usage
-
-### Supported ESLint versions
-
-ESLint | babel-eslint
------------- | -------------
-4.x | >= 6.x
-3.x | >= 6.x
-2.x | >= 6.x
-1.x | >= 5.x
-
-### Install
-
-Ensure that you have substituted the correct version lock for `eslint` and `babel-eslint` into this command:
-
-```sh
-$ npm install eslint@4.x babel-eslint@8 --save-dev
-# or
-$ yarn add eslint@4.x babel-eslint@8 -D
-```
-
-### Setup
-
-**.eslintrc**
-
-```json
-{
- "parser": "babel-eslint",
- "rules": {
- "strict": 0
- }
-}
-```
-
-Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rules.
-
-### Configuration
-
-- `sourceType` can be set to `'module'`(default) or `'script'` if your code isn't using ECMAScript modules.
-- `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level.
-- `codeFrame` (default `true`) can be set to `false` to disable the code frame in the reporter. This is useful since some eslint formatters don't play well with it.
-
-**.eslintrc**
-
-```json
-{
- "parser": "babel-eslint",
- "parserOptions": {
- "sourceType": "module",
- "allowImportExportEverywhere": false,
- "codeFrame": true
- }
-}
-```
-
-### Run
-
-```sh
-$ eslint your-files-here
-```
diff --git a/tools/node_modules/babel-eslint/lib/analyze-scope.js b/tools/node_modules/babel-eslint/lib/analyze-scope.js
deleted file mode 100644
index 9ad95bd2517..00000000000
--- a/tools/node_modules/babel-eslint/lib/analyze-scope.js
+++ /dev/null
@@ -1,342 +0,0 @@
-"use strict";
-
-const t = require("@babel/types");
-const requireFromESLint = require("./require-from-eslint");
-
-const escope = requireFromESLint("eslint-scope");
-const Definition = requireFromESLint("eslint-scope/lib/definition").Definition;
-const OriginalPatternVisitor = requireFromESLint(
- "eslint-scope/lib/pattern-visitor"
-);
-const OriginalReferencer = requireFromESLint("eslint-scope/lib/referencer");
-const fallback = require("eslint-visitor-keys").getKeys;
-const childVisitorKeys = require("./visitor-keys");
-
-const flowFlippedAliasKeys = t.FLIPPED_ALIAS_KEYS.Flow.concat([
- "ArrayPattern",
- "ClassDeclaration",
- "ClassExpression",
- "FunctionDeclaration",
- "FunctionExpression",
- "Identifier",
- "ObjectPattern",
- "RestElement",
-]);
-const visitorKeysMap = Object.keys(t.VISITOR_KEYS).reduce(function(acc, key) {
- const value = t.VISITOR_KEYS[key];
- if (flowFlippedAliasKeys.indexOf(value) === -1) {
- acc[key] = value;
- }
- return acc;
-}, {});
-
-const propertyTypes = {
- // loops
- callProperties: { type: "loop", values: ["value"] },
- indexers: { type: "loop", values: ["key", "value"] },
- properties: { type: "loop", values: ["argument", "value"] },
- types: { type: "loop" },
- params: { type: "loop" },
- // single property
- argument: { type: "single" },
- elementType: { type: "single" },
- qualification: { type: "single" },
- rest: { type: "single" },
- returnType: { type: "single" },
- // others
- typeAnnotation: { type: "typeAnnotation" },
- typeParameters: { type: "typeParameters" },
- id: { type: "id" },
-};
-
-class PatternVisitor extends OriginalPatternVisitor {
- ArrayPattern(node) {
- node.elements.forEach(this.visit, this);
- }
-
- ObjectPattern(node) {
- node.properties.forEach(this.visit, this);
- }
-}
-
-class Referencer extends OriginalReferencer {
- // inherits.
- visitPattern(node, options, callback) {
- if (!node) {
- return;
- }
-
- // Visit type annotations.
- this._checkIdentifierOrVisit(node.typeAnnotation);
- if (t.isAssignmentPattern(node)) {
- this._checkIdentifierOrVisit(node.left.typeAnnotation);
- }
-
- // Overwrite `super.visitPattern(node, options, callback)` in order to not visit `ArrayPattern#typeAnnotation` and `ObjectPattern#typeAnnotation`.
- if (typeof options === "function") {
- callback = options;
- options = { processRightHandNodes: false };
- }
-
- const visitor = new PatternVisitor(this.options, node, callback);
- visitor.visit(node);
-
- // Process the right hand nodes recursively.
- if (options.processRightHandNodes) {
- visitor.rightHandNodes.forEach(this.visit, this);
- }
- }
-
- // inherits.
- visitClass(node) {
- // Decorators.
- this._visitArray(node.decorators);
-
- // Flow type parameters.
- const typeParamScope = this._nestTypeParamScope(node);
-
- // Flow super types.
- this._visitTypeAnnotation(node.implements);
- this._visitTypeAnnotation(
- node.superTypeParameters && node.superTypeParameters.params
- );
-
- // Basic.
- super.visitClass(node);
-
- // Close the type parameter scope.
- if (typeParamScope) {
- this.close(node);
- }
- }
-
- // inherits.
- visitFunction(node) {
- const typeParamScope = this._nestTypeParamScope(node);
-
- // Flow return types.
- this._checkIdentifierOrVisit(node.returnType);
-
- // Basic.
- super.visitFunction(node);
-
- // Close the type parameter scope.
- if (typeParamScope) {
- this.close(node);
- }
- }
-
- // inherits.
- visitProperty(node) {
- if (node.value && node.value.type === "TypeCastExpression") {
- this._visitTypeAnnotation(node.value);
- }
- this._visitArray(node.decorators);
- super.visitProperty(node);
- }
-
- InterfaceDeclaration(node) {
- this._createScopeVariable(node, node.id);
-
- const typeParamScope = this._nestTypeParamScope(node);
-
- // TODO: Handle mixins
- this._visitArray(node.extends);
- this.visit(node.body);
-
- if (typeParamScope) {
- this.close(node);
- }
- }
-
- TypeAlias(node) {
- this._createScopeVariable(node, node.id);
-
- const typeParamScope = this._nestTypeParamScope(node);
-
- this.visit(node.right);
-
- if (typeParamScope) {
- this.close(node);
- }
- }
-
- ClassProperty(node) {
- this._visitClassProperty(node);
- }
-
- ClassPrivateProperty(node) {
- this._visitClassProperty(node);
- }
-
- DeclareModule(node) {
- this._visitDeclareX(node);
- }
-
- DeclareFunction(node) {
- this._visitDeclareX(node);
- }
-
- DeclareVariable(node) {
- this._visitDeclareX(node);
- }
-
- DeclareClass(node) {
- this._visitDeclareX(node);
- }
-
- // visit OptionalMemberExpression as a MemberExpression.
- OptionalMemberExpression(node) {
- super.MemberExpression(node);
- }
-
- _visitClassProperty(node) {
- this._visitTypeAnnotation(node.typeAnnotation);
- this.visitProperty(node);
- }
-
- _visitDeclareX(node) {
- if (node.id) {
- this._createScopeVariable(node, node.id);
- }
-
- const typeParamScope = this._nestTypeParamScope(node);
- if (typeParamScope) {
- this.close(node);
- }
- }
-
- _createScopeVariable(node, name) {
- this.currentScope().variableScope.__define(
- name,
- new Definition("Variable", name, node, null, null, null)
- );
- }
-
- _nestTypeParamScope(node) {
- if (!node.typeParameters) {
- return null;
- }
-
- const parentScope = this.scopeManager.__currentScope;
- const scope = new escope.Scope(
- this.scopeManager,
- "type-parameters",
- parentScope,
- node,
- false
- );
-
- this.scopeManager.__nestScope(scope);
- for (let j = 0; j < node.typeParameters.params.length; j++) {
- const name = node.typeParameters.params[j];
- scope.__define(name, new Definition("TypeParameter", name, name));
- if (name.typeAnnotation) {
- this._checkIdentifierOrVisit(name);
- }
- }
- scope.__define = function() {
- return parentScope.__define.apply(parentScope, arguments);
- };
-
- return scope;
- }
-
- _visitTypeAnnotation(node) {
- if (!node) {
- return;
- }
- if (Array.isArray(node)) {
- node.forEach(this._visitTypeAnnotation, this);
- return;
- }
-
- // get property to check (params, id, etc...)
- const visitorValues = visitorKeysMap[node.type];
- if (!visitorValues) {
- return;
- }
-
- // can have multiple properties
- for (let i = 0; i < visitorValues.length; i++) {
- const visitorValue = visitorValues[i];
- const propertyType = propertyTypes[visitorValue];
- const nodeProperty = node[visitorValue];
- // check if property or type is defined
- if (propertyType == null || nodeProperty == null) {
- continue;
- }
- if (propertyType.type === "loop") {
- for (let j = 0; j < nodeProperty.length; j++) {
- if (Array.isArray(propertyType.values)) {
- for (let k = 0; k < propertyType.values.length; k++) {
- const loopPropertyNode = nodeProperty[j][propertyType.values[k]];
- if (loopPropertyNode) {
- this._checkIdentifierOrVisit(loopPropertyNode);
- }
- }
- } else {
- this._checkIdentifierOrVisit(nodeProperty[j]);
- }
- }
- } else if (propertyType.type === "single") {
- this._checkIdentifierOrVisit(nodeProperty);
- } else if (propertyType.type === "typeAnnotation") {
- this._visitTypeAnnotation(node.typeAnnotation);
- } else if (propertyType.type === "typeParameters") {
- for (let l = 0; l < node.typeParameters.params.length; l++) {
- this._checkIdentifierOrVisit(node.typeParameters.params[l]);
- }
- } else if (propertyType.type === "id") {
- if (node.id.type === "Identifier") {
- this._checkIdentifierOrVisit(node.id);
- } else {
- this._visitTypeAnnotation(node.id);
- }
- }
- }
- }
-
- _checkIdentifierOrVisit(node) {
- if (node && node.typeAnnotation) {
- this._visitTypeAnnotation(node.typeAnnotation);
- } else if (node && node.type === "Identifier") {
- this.visit(node);
- } else {
- this._visitTypeAnnotation(node);
- }
- }
-
- _visitArray(nodeList) {
- if (nodeList) {
- for (const node of nodeList) {
- this.visit(node);
- }
- }
- }
-}
-
-module.exports = function(ast, parserOptions) {
- const options = {
- ignoreEval: true,
- optimistic: false,
- directive: false,
- nodejsScope:
- ast.sourceType === "script" &&
- (parserOptions.ecmaFeatures &&
- parserOptions.ecmaFeatures.globalReturn) === true,
- impliedStrict: false,
- sourceType: ast.sourceType,
- ecmaVersion: parserOptions.ecmaVersion || 2018,
- fallback,
- };
-
- options.childVisitorKeys = childVisitorKeys;
-
- const scopeManager = new escope.ScopeManager(options);
- const referencer = new Referencer(options, scopeManager);
-
- referencer.visit(ast);
-
- return scopeManager;
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js
deleted file mode 100644
index 8c608a45ad9..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/attachComments.js
+++ /dev/null
@@ -1,59 +0,0 @@
-"use strict";
-
-// comment fixes
-module.exports = function(ast, comments, tokens) {
- if (comments.length) {
- var firstComment = comments[0];
- var lastComment = comments[comments.length - 1];
- // fixup program start
- if (!tokens.length) {
- // if no tokens, the program starts at the end of the last comment
- ast.start = lastComment.end;
- ast.loc.start.line = lastComment.loc.end.line;
- ast.loc.start.column = lastComment.loc.end.column;
-
- if (ast.leadingComments === null && ast.innerComments.length) {
- ast.leadingComments = ast.innerComments;
- }
- } else if (firstComment.start < tokens[0].start) {
- // if there are comments before the first token, the program starts at the first token
- var token = tokens[0];
- // ast.start = token.start;
- // ast.loc.start.line = token.loc.start.line;
- // ast.loc.start.column = token.loc.start.column;
-
- // estraverse do not put leading comments on first node when the comment
- // appear before the first token
- if (ast.body.length) {
- var node = ast.body[0];
- node.leadingComments = [];
- var firstTokenStart = token.start;
- var len = comments.length;
- for (var i = 0; i < len && comments[i].start < firstTokenStart; i++) {
- node.leadingComments.push(comments[i]);
- }
- }
- }
- // fixup program end
- if (tokens.length) {
- var lastToken = tokens[tokens.length - 1];
- if (lastComment.end > lastToken.end) {
- // If there is a comment after the last token, the program ends at the
- // last token and not the comment
- // ast.end = lastToken.end;
- ast.range[1] = lastToken.end;
- ast.loc.end.line = lastToken.loc.end.line;
- ast.loc.end.column = lastToken.loc.end.column;
- }
- }
- } else {
- if (!tokens.length) {
- ast.loc.start.line = 1;
- ast.loc.end.line = 1;
- }
- }
- if (ast.body && ast.body.length > 0) {
- ast.loc.start.line = ast.body[0].loc.start.line;
- ast.range[0] = ast.body[0].start;
- }
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js
deleted file mode 100644
index 17d71173729..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertComments.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-module.exports = function(comments) {
- for (var i = 0; i < comments.length; i++) {
- var comment = comments[i];
- if (comment.type === "CommentBlock") {
- comment.type = "Block";
- } else if (comment.type === "CommentLine") {
- comment.type = "Line";
- }
- // sometimes comments don't get ranges computed,
- // even with options.ranges === true
- if (!comment.range) {
- comment.range = [comment.start, comment.end];
- }
- }
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
deleted file mode 100644
index accde61e56d..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/convertTemplateType.js
+++ /dev/null
@@ -1,92 +0,0 @@
-"use strict";
-
-module.exports = function(tokens, tt) {
- let curlyBrace = null;
- let templateTokens = [];
- const result = [];
-
- function addTemplateType() {
- const start = templateTokens[0];
- const end = templateTokens[templateTokens.length - 1];
-
- const value = templateTokens.reduce((result, token) => {
- if (token.value) {
- result += token.value;
- } else if (token.type !== tt.template) {
- result += token.type.label;
- }
-
- return result;
- }, "");
-
- result.push({
- type: "Template",
- value: value,
- start: start.start,
- end: end.end,
- loc: {
- start: start.loc.start,
- end: end.loc.end,
- },
- });
-
- templateTokens = [];
- }
-
- tokens.forEach(token => {
- switch (token.type) {
- case tt.backQuote:
- if (curlyBrace) {
- result.push(curlyBrace);
- curlyBrace = null;
- }
-
- templateTokens.push(token);
-
- if (templateTokens.length > 1) {
- addTemplateType();
- }
-
- break;
-
- case tt.dollarBraceL:
- templateTokens.push(token);
- addTemplateType();
- break;
-
- case tt.braceR:
- if (curlyBrace) {
- result.push(curlyBrace);
- }
-
- curlyBrace = token;
- break;
-
- case tt.template:
- if (curlyBrace) {
- templateTokens.push(curlyBrace);
- curlyBrace = null;
- }
-
- templateTokens.push(token);
- break;
-
- case tt.eof:
- if (curlyBrace) {
- result.push(curlyBrace);
- }
-
- break;
-
- default:
- if (curlyBrace) {
- result.push(curlyBrace);
- curlyBrace = null;
- }
-
- result.push(token);
- }
- });
-
- return result;
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js
deleted file mode 100644
index 6d6e12bfc08..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/index.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-
-var attachComments = require("./attachComments");
-var convertComments = require("./convertComments");
-var toTokens = require("./toTokens");
-var toAST = require("./toAST");
-
-module.exports = function(ast, traverse, tt, code) {
- // convert tokens
- ast.tokens = toTokens(ast.tokens, tt, code);
-
- // add comments
- convertComments(ast.comments);
-
- // transform esprima and acorn divergent nodes
- toAST(ast, traverse, code);
-
- // ast.program.tokens = ast.tokens;
- // ast.program.comments = ast.comments;
- // ast = ast.program;
-
- // remove File
- ast.type = "Program";
- ast.sourceType = ast.program.sourceType;
- ast.directives = ast.program.directives;
- ast.body = ast.program.body;
- delete ast.program;
-
- attachComments(ast, ast.comments, ast.tokens);
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js
deleted file mode 100644
index b3da41f0cb0..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toAST.js
+++ /dev/null
@@ -1,118 +0,0 @@
-"use strict";
-
-var t = require("@babel/types");
-var convertComments = require("./convertComments");
-
-module.exports = function(ast, traverse, code) {
- var state = { source: code };
-
- // Monkey patch visitor keys in order to be able to traverse the estree nodes
- t.VISITOR_KEYS.Property = t.VISITOR_KEYS.ObjectProperty;
- t.VISITOR_KEYS.MethodDefinition = [
- "key",
- "value",
- "decorators",
- "returnType",
- "typeParameters",
- ];
-
- traverse(ast, astTransformVisitor, null, state);
-
- delete t.VISITOR_KEYS.Property;
- delete t.VISITOR_KEYS.MethodDefinition;
-};
-
-var astTransformVisitor = {
- noScope: true,
- enter(path) {
- var node = path.node;
-
- // private var to track original node type
- node._babelType = node.type;
-
- if (node.innerComments) {
- node.trailingComments = node.innerComments;
- delete node.innerComments;
- }
-
- if (node.trailingComments) {
- convertComments(node.trailingComments);
- }
-
- if (node.leadingComments) {
- convertComments(node.leadingComments);
- }
- },
- exit(path) {
- var node = path.node;
-
- if (path.isJSXText()) {
- node.type = "Literal";
- }
-
- if (
- path.isRestElement() &&
- path.parent &&
- path.parent.type === "ObjectPattern"
- ) {
- node.type = "ExperimentalRestProperty";
- }
-
- if (
- path.isSpreadElement() &&
- path.parent &&
- path.parent.type === "ObjectExpression"
- ) {
- node.type = "ExperimentalSpreadProperty";
- }
-
- if (path.isTypeParameter()) {
- node.type = "Identifier";
- node.typeAnnotation = node.bound;
- delete node.bound;
- }
-
- // flow: prevent "no-undef"
- // for "Component" in: "let x: React.Component"
- if (path.isQualifiedTypeIdentifier()) {
- delete node.id;
- }
- // for "b" in: "var a: { b: Foo }"
- if (path.isObjectTypeProperty()) {
- delete node.key;
- }
- // for "indexer" in: "var a: {[indexer: string]: number}"
- if (path.isObjectTypeIndexer()) {
- delete node.id;
- }
- // for "param" in: "var a: { func(param: Foo): Bar };"
- if (path.isFunctionTypeParam()) {
- delete node.name;
- }
-
- // modules
-
- if (path.isImportDeclaration()) {
- delete node.isType;
- }
-
- // template string range fixes
- if (path.isTemplateLiteral()) {
- for (var j = 0; j < node.quasis.length; j++) {
- var q = node.quasis[j];
- q.range[0] -= 1;
- if (q.tail) {
- q.range[1] += 1;
- } else {
- q.range[1] += 2;
- }
- q.loc.start.column -= 1;
- if (q.tail) {
- q.loc.end.column += 1;
- } else {
- q.loc.end.column += 2;
- }
- }
- }
- },
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
deleted file mode 100644
index 44c73529a11..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toToken.js
+++ /dev/null
@@ -1,84 +0,0 @@
-"use strict";
-
-module.exports = function(token, tt, source) {
- var type = token.type;
- token.range = [token.start, token.end];
-
- if (type === tt.name) {
- token.type = "Identifier";
- } else if (
- type === tt.semi ||
- type === tt.comma ||
- type === tt.parenL ||
- type === tt.parenR ||
- type === tt.braceL ||
- type === tt.braceR ||
- type === tt.slash ||
- type === tt.dot ||
- type === tt.bracketL ||
- type === tt.bracketR ||
- type === tt.ellipsis ||
- type === tt.arrow ||
- type === tt.pipeline ||
- type === tt.star ||
- type === tt.incDec ||
- type === tt.colon ||
- type === tt.question ||
- type === tt.questionDot ||
- type === tt.template ||
- type === tt.backQuote ||
- type === tt.dollarBraceL ||
- type === tt.at ||
- type === tt.logicalOR ||
- type === tt.logicalAND ||
- type === tt.nullishCoalescing ||
- type === tt.bitwiseOR ||
- type === tt.bitwiseXOR ||
- type === tt.bitwiseAND ||
- type === tt.equality ||
- type === tt.relational ||
- type === tt.bitShift ||
- type === tt.plusMin ||
- type === tt.modulo ||
- type === tt.exponent ||
- type === tt.bang ||
- type === tt.tilde ||
- type === tt.doubleColon ||
- type.isAssign
- ) {
- token.type = "Punctuator";
- if (!token.value) token.value = type.label;
- } else if (type === tt.jsxTagStart) {
- token.type = "Punctuator";
- token.value = "<";
- } else if (type === tt.jsxTagEnd) {
- token.type = "Punctuator";
- token.value = ">";
- } else if (type === tt.jsxName) {
- token.type = "JSXIdentifier";
- } else if (type === tt.jsxText) {
- token.type = "JSXText";
- } else if (type.keyword === "null") {
- token.type = "Null";
- } else if (type.keyword === "false" || type.keyword === "true") {
- token.type = "Boolean";
- } else if (type.keyword) {
- token.type = "Keyword";
- } else if (type === tt.num) {
- token.type = "Numeric";
- token.value = source.slice(token.start, token.end);
- } else if (type === tt.string) {
- token.type = "String";
- token.value = source.slice(token.start, token.end);
- } else if (type === tt.regexp) {
- token.type = "RegularExpression";
- var value = token.value;
- token.regex = {
- pattern: value.pattern,
- flags: value.flags,
- };
- token.value = `/${value.pattern}/${value.flags}`;
- }
-
- return token;
-};
diff --git a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js b/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
deleted file mode 100644
index bb30819bacf..00000000000
--- a/tools/node_modules/babel-eslint/lib/babylon-to-espree/toTokens.js
+++ /dev/null
@@ -1,10 +0,0 @@
-"use strict";
-
-var convertTemplateType = require("./convertTemplateType");
-var toToken = require("./toToken");
-
-module.exports = function(tokens, tt, code) {
- return convertTemplateType(tokens, tt)
- .filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock")
- .map(t => toToken(t, tt, code));
-};
diff --git a/tools/node_modules/babel-eslint/lib/index.js b/tools/node_modules/babel-eslint/lib/index.js
deleted file mode 100644
index 9e527d26d7f..00000000000
--- a/tools/node_modules/babel-eslint/lib/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-exports.parse = function(code, options) {
- return exports.parseForESLint(code, options).ast;
-};
-
-exports.parseForESLint = function(code, options) {
- options = options || {};
- options.ecmaVersion = options.ecmaVersion || 2018;
- options.sourceType = options.sourceType || "module";
- options.allowImportExportEverywhere =
- options.allowImportExportEverywhere || false;
-
- return require("./parse-with-scope")(code, options);
-};
-
-exports.parseNoPatch = function(code, options) {
- return require("./parse")(code, options);
-};
diff --git a/tools/node_modules/babel-eslint/lib/parse-with-scope.js b/tools/node_modules/babel-eslint/lib/parse-with-scope.js
deleted file mode 100644
index 36e3fce5b06..00000000000
--- a/tools/node_modules/babel-eslint/lib/parse-with-scope.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-const visitorKeys = require("./visitor-keys");
-const analyzeScope = require("./analyze-scope");
-const parse = require("./parse");
-
-module.exports = function(code, options) {
- const ast = parse(code, options);
- const scopeManager = analyzeScope(ast, options);
-
- return { ast, scopeManager, visitorKeys };
-};
diff --git a/tools/node_modules/babel-eslint/lib/parse.js b/tools/node_modules/babel-eslint/lib/parse.js
deleted file mode 100644
index b23b9dc9fc7..00000000000
--- a/tools/node_modules/babel-eslint/lib/parse.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-
-var babylonToEspree = require("./babylon-to-espree");
-var parse = require("@babel/parser").parse;
-var tt = require("@babel/parser").tokTypes;
-var traverse = require("@babel/traverse").default;
-var codeFrameColumns = require("@babel/code-frame").codeFrameColumns;
-
-module.exports = function(code, options) {
- const legacyDecorators =
- options.ecmaFeatures && options.ecmaFeatures.legacyDecorators;
-
- var opts = {
- codeFrame: options.hasOwnProperty("codeFrame") ? options.codeFrame : true,
- sourceType: options.sourceType,
- allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree
- allowReturnOutsideFunction: true,
- allowSuperOutsideMethod: true,
- ranges: true,
- tokens: true,
- plugins: [
- ["flow", { all: true }],
- "jsx",
- "estree",
- "asyncFunctions",
- "asyncGenerators",
- "classConstructorCall",
- "classProperties",
- legacyDecorators
- ? "decorators-legacy"
- : ["decorators", { decoratorsBeforeExport: false }],
- "doExpressions",
- "exponentiationOperator",
- "exportDefaultFrom",
- "exportNamespaceFrom",
- "functionBind",
- "functionSent",
- "objectRestSpread",
- "trailingFunctionCommas",
- "dynamicImport",
- "numericSeparator",
- "optionalChaining",
- "importMeta",
- "classPrivateProperties",
- "bigInt",
- "optionalCatchBinding",
- "throwExpressions",
- ["pipelineOperator", { proposal: "minimal" }],
- "nullishCoalescingOperator",
- "logicalAssignment",
- ],
- };
-
- var ast;
- try {
- ast = parse(code, opts);
- } catch (err) {
- if (err instanceof SyntaxError) {
- err.lineNumber = err.loc.line;
- err.column = err.loc.column;
-
- if (opts.codeFrame) {
- err.lineNumber = err.loc.line;
- err.column = err.loc.column + 1;
-
- // remove trailing "(LINE:COLUMN)" acorn message and add in esprima syntax error message start
- err.message =
- "Line " +
- err.lineNumber +
- ": " +
- err.message.replace(/ \((\d+):(\d+)\)$/, "") +
- // add codeframe
- "\n\n" +
- codeFrameColumns(
- code,
- {
- start: {
- line: err.lineNumber,
- column: err.column,
- },
- },
- { highlightCode: true }
- );
- }
- }
-
- throw err;
- }
-
- babylonToEspree(ast, traverse, tt, code);
-
- return ast;
-};
diff --git a/tools/node_modules/babel-eslint/lib/require-from-eslint.js b/tools/node_modules/babel-eslint/lib/require-from-eslint.js
deleted file mode 100644
index 3834689f54b..00000000000
--- a/tools/node_modules/babel-eslint/lib/require-from-eslint.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";
-
-const resolve = require("resolve");
-const eslintBase = require.resolve("eslint");
-
-module.exports = function requireFromESLint(id) {
- const path = resolve.sync(id, { basedir: eslintBase });
- return require(path);
-};
diff --git a/tools/node_modules/babel-eslint/lib/visitor-keys.js b/tools/node_modules/babel-eslint/lib/visitor-keys.js
deleted file mode 100644
index 921a0bb0165..00000000000
--- a/tools/node_modules/babel-eslint/lib/visitor-keys.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"use strict";
-
-const BABEL_VISITOR_KEYS = require("@babel/types").VISITOR_KEYS;
-const ESLINT_VISITOR_KEYS = require("eslint-visitor-keys").KEYS;
-
-module.exports = Object.assign(
- {
- Literal: ESLINT_VISITOR_KEYS.Literal,
- MethodDefinition: ["decorators"].concat(
- ESLINT_VISITOR_KEYS.MethodDefinition
- ),
- Property: ["decorators"].concat(ESLINT_VISITOR_KEYS.Property),
- },
- BABEL_VISITOR_KEYS
-);
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js
deleted file mode 100644
index 35176fbc068..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/lib/index.js
+++ /dev/null
@@ -1,173 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.codeFrameColumns = codeFrameColumns;
-exports.default = _default;
-
-function _highlight() {
- const data = _interopRequireWildcard(require("@babel/highlight"));
-
- _highlight = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-let deprecationWarningShown = false;
-
-function getDefs(chalk) {
- return {
- gutter: chalk.grey,
- marker: chalk.red.bold,
- message: chalk.red.bold
- };
-}
-
-const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-
-function getMarkerLines(loc, source, opts) {
- const startLoc = Object.assign({
- column: 0,
- line: -1
- }, loc.start);
- const endLoc = Object.assign({}, startLoc, loc.end);
- const {
- linesAbove = 2,
- linesBelow = 3
- } = opts || {};
- const startLine = startLoc.line;
- const startColumn = startLoc.column;
- const endLine = endLoc.line;
- const endColumn = endLoc.column;
- let start = Math.max(startLine - (linesAbove + 1), 0);
- let end = Math.min(source.length, endLine + linesBelow);
-
- if (startLine === -1) {
- start = 0;
- }
-
- if (endLine === -1) {
- end = source.length;
- }
-
- const lineDiff = endLine - startLine;
- const markerLines = {};
-
- if (lineDiff) {
- for (let i = 0; i <= lineDiff; i++) {
- const lineNumber = i + startLine;
-
- if (!startColumn) {
- markerLines[lineNumber] = true;
- } else if (i === 0) {
- const sourceLength = source[lineNumber - 1].length;
- markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
- } else if (i === lineDiff) {
- markerLines[lineNumber] = [0, endColumn];
- } else {
- const sourceLength = source[lineNumber - i].length;
- markerLines[lineNumber] = [0, sourceLength];
- }
- }
- } else {
- if (startColumn === endColumn) {
- if (startColumn) {
- markerLines[startLine] = [startColumn, 0];
- } else {
- markerLines[startLine] = true;
- }
- } else {
- markerLines[startLine] = [startColumn, endColumn - startColumn];
- }
- }
-
- return {
- start,
- end,
- markerLines
- };
-}
-
-function codeFrameColumns(rawLines, loc, opts = {}) {
- const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);
- const chalk = (0, _highlight().getChalk)(opts);
- const defs = getDefs(chalk);
-
- const maybeHighlight = (chalkFn, string) => {
- return highlighted ? chalkFn(string) : string;
- };
-
- const lines = rawLines.split(NEWLINE);
- const {
- start,
- end,
- markerLines
- } = getMarkerLines(loc, lines, opts);
- const hasColumns = loc.start && typeof loc.start.column === "number";
- const numberMaxWidth = String(end).length;
- const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines;
- let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {
- const number = start + 1 + index;
- const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
- const gutter = ` ${paddedNumber} | `;
- const hasMarker = markerLines[number];
- const lastMarkerLine = !markerLines[number + 1];
-
- if (hasMarker) {
- let markerLine = "";
-
- if (Array.isArray(hasMarker)) {
- const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
- const numberOfMarkers = hasMarker[1] || 1;
- markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
-
- if (lastMarkerLine && opts.message) {
- markerLine += " " + maybeHighlight(defs.message, opts.message);
- }
- }
-
- return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
- } else {
- return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
- }
- }).join("\n");
-
- if (opts.message && !hasColumns) {
- frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
- }
-
- if (highlighted) {
- return chalk.reset(frame);
- } else {
- return frame;
- }
-}
-
-function _default(rawLines, lineNumber, colNumber, opts = {}) {
- if (!deprecationWarningShown) {
- deprecationWarningShown = true;
- const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
-
- if (process.emitWarning) {
- process.emitWarning(message, "DeprecationWarning");
- } else {
- const deprecationError = new Error(message);
- deprecationError.name = "DeprecationWarning";
- console.warn(new Error(message));
- }
- }
-
- colNumber = Math.max(colNumber, 0);
- const location = {
- start: {
- column: colNumber,
- line: lineNumber
- }
- };
- return codeFrameColumns(rawLines, location, opts);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json
deleted file mode 100644
index d619d9a8f53..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/code-frame/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/highlight": "^7.0.0"
- },
- "deprecated": false,
- "description": "Generate errors that contain a code frame that point to source locations.",
- "devDependencies": {
- "chalk": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/code-frame",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
- },
- "version": "7.5.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md
deleted file mode 100644
index fc980b167d1..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/generator
-
-> Turns an AST into code.
-
-See our website [@babel/generator](https://babeljs.io/docs/en/next/babel-generator.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/generator
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/generator --dev
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/buffer.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/buffer.js
deleted file mode 100644
index 8a800148c20..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/buffer.js
+++ /dev/null
@@ -1,257 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-function _trimRight() {
- const data = _interopRequireDefault(require("trim-right"));
-
- _trimRight = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const SPACES_RE = /^[ \t]+$/;
-
-class Buffer {
- constructor(map) {
- this._map = null;
- this._buf = [];
- this._last = "";
- this._queue = [];
- this._position = {
- line: 1,
- column: 0
- };
- this._sourcePosition = {
- identifierName: null,
- line: null,
- column: null,
- filename: null
- };
- this._disallowedPop = null;
- this._map = map;
- }
-
- get() {
- this._flush();
-
- const map = this._map;
- const result = {
- code: (0, _trimRight().default)(this._buf.join("")),
- map: null,
- rawMappings: map && map.getRawMappings()
- };
-
- if (map) {
- Object.defineProperty(result, "map", {
- configurable: true,
- enumerable: true,
-
- get() {
- return this.map = map.get();
- },
-
- set(value) {
- Object.defineProperty(this, "map", {
- value,
- writable: true
- });
- }
-
- });
- }
-
- return result;
- }
-
- append(str) {
- this._flush();
-
- const {
- line,
- column,
- filename,
- identifierName,
- force
- } = this._sourcePosition;
-
- this._append(str, line, column, identifierName, filename, force);
- }
-
- queue(str) {
- if (str === "\n") {
- while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
- this._queue.shift();
- }
- }
-
- const {
- line,
- column,
- filename,
- identifierName,
- force
- } = this._sourcePosition;
-
- this._queue.unshift([str, line, column, identifierName, filename, force]);
- }
-
- _flush() {
- let item;
-
- while (item = this._queue.pop()) this._append(...item);
- }
-
- _append(str, line, column, identifierName, filename, force) {
- if (this._map && str[0] !== "\n") {
- this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
- }
-
- this._buf.push(str);
-
- this._last = str[str.length - 1];
-
- for (let i = 0; i < str.length; i++) {
- if (str[i] === "\n") {
- this._position.line++;
- this._position.column = 0;
- } else {
- this._position.column++;
- }
- }
- }
-
- removeTrailingNewline() {
- if (this._queue.length > 0 && this._queue[0][0] === "\n") {
- this._queue.shift();
- }
- }
-
- removeLastSemicolon() {
- if (this._queue.length > 0 && this._queue[0][0] === ";") {
- this._queue.shift();
- }
- }
-
- endsWith(suffix) {
- if (suffix.length === 1) {
- let last;
-
- if (this._queue.length > 0) {
- const str = this._queue[0][0];
- last = str[str.length - 1];
- } else {
- last = this._last;
- }
-
- return last === suffix;
- }
-
- const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, "");
-
- if (suffix.length <= end.length) {
- return end.slice(-suffix.length) === suffix;
- }
-
- return false;
- }
-
- hasContent() {
- return this._queue.length > 0 || !!this._last;
- }
-
- exactSource(loc, cb) {
- this.source("start", loc, true);
- cb();
- this.source("end", loc);
-
- this._disallowPop("start", loc);
- }
-
- source(prop, loc, force) {
- if (prop && !loc) return;
-
- this._normalizePosition(prop, loc, this._sourcePosition, force);
- }
-
- withSource(prop, loc, cb) {
- if (!this._map) return cb();
- const originalLine = this._sourcePosition.line;
- const originalColumn = this._sourcePosition.column;
- const originalFilename = this._sourcePosition.filename;
- const originalIdentifierName = this._sourcePosition.identifierName;
- this.source(prop, loc);
- cb();
-
- if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
- this._sourcePosition.line = originalLine;
- this._sourcePosition.column = originalColumn;
- this._sourcePosition.filename = originalFilename;
- this._sourcePosition.identifierName = originalIdentifierName;
- this._sourcePosition.force = false;
- this._disallowedPop = null;
- }
- }
-
- _disallowPop(prop, loc) {
- if (prop && !loc) return;
- this._disallowedPop = this._normalizePosition(prop, loc);
- }
-
- _normalizePosition(prop, loc, targetObj, force) {
- const pos = loc ? loc[prop] : null;
-
- if (targetObj === undefined) {
- targetObj = {
- identifierName: null,
- line: null,
- column: null,
- filename: null,
- force: false
- };
- }
-
- const origLine = targetObj.line;
- const origColumn = targetObj.column;
- const origFilename = targetObj.filename;
- targetObj.identifierName = prop === "start" && loc && loc.identifierName || null;
- targetObj.line = pos ? pos.line : null;
- targetObj.column = pos ? pos.column : null;
- targetObj.filename = loc && loc.filename || null;
-
- if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
- targetObj.force = force;
- }
-
- return targetObj;
- }
-
- getCurrentColumn() {
- const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
-
- const lastIndex = extra.lastIndexOf("\n");
- return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
- }
-
- getCurrentLine() {
- const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
-
- let count = 0;
-
- for (let i = 0; i < extra.length; i++) {
- if (extra[i] === "\n") count++;
- }
-
- return this._position.line + count;
- }
-
-}
-
-exports.default = Buffer; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/base.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/base.js
deleted file mode 100644
index f8e2130bf21..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/base.js
+++ /dev/null
@@ -1,97 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.File = File;
-exports.Program = Program;
-exports.BlockStatement = BlockStatement;
-exports.Noop = Noop;
-exports.Directive = Directive;
-exports.DirectiveLiteral = DirectiveLiteral;
-exports.InterpreterDirective = InterpreterDirective;
-exports.Placeholder = Placeholder;
-
-function File(node) {
- if (node.program) {
- this.print(node.program.interpreter, node);
- }
-
- this.print(node.program, node);
-}
-
-function Program(node) {
- this.printInnerComments(node, false);
- this.printSequence(node.directives, node);
- if (node.directives && node.directives.length) this.newline();
- this.printSequence(node.body, node);
-}
-
-function BlockStatement(node) {
- this.token("{");
- this.printInnerComments(node);
- const hasDirectives = node.directives && node.directives.length;
-
- if (node.body.length || hasDirectives) {
- this.newline();
- this.printSequence(node.directives, node, {
- indent: true
- });
- if (hasDirectives) this.newline();
- this.printSequence(node.body, node, {
- indent: true
- });
- this.removeTrailingNewline();
- this.source("end", node.loc);
- if (!this.endsWith("\n")) this.newline();
- this.rightBrace();
- } else {
- this.source("end", node.loc);
- this.token("}");
- }
-}
-
-function Noop() {}
-
-function Directive(node) {
- this.print(node.value, node);
- this.semicolon();
-}
-
-const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
-const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
-
-function DirectiveLiteral(node) {
- const raw = this.getPossibleRaw(node);
-
- if (raw != null) {
- this.token(raw);
- return;
- }
-
- const {
- value
- } = node;
-
- if (!unescapedDoubleQuoteRE.test(value)) {
- this.token(`"${value}"`);
- } else if (!unescapedSingleQuoteRE.test(value)) {
- this.token(`'${value}'`);
- } else {
- throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
- }
-}
-
-function InterpreterDirective(node) {
- this.token(`#!${node.value}\n`);
-}
-
-function Placeholder(node) {
- this.token("%%");
- this.print(node.name);
- this.token("%%");
-
- if (node.expectedNode === "Statement") {
- this.semicolon();
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js
deleted file mode 100644
index 7f54632ad01..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/classes.js
+++ /dev/null
@@ -1,190 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
-exports.ClassBody = ClassBody;
-exports.ClassProperty = ClassProperty;
-exports.ClassPrivateProperty = ClassPrivateProperty;
-exports.ClassMethod = ClassMethod;
-exports.ClassPrivateMethod = ClassPrivateMethod;
-exports._classMethodHead = _classMethodHead;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function ClassDeclaration(node, parent) {
- if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) {
- this.printJoin(node.decorators, node);
- }
-
- if (node.declare) {
- this.word("declare");
- this.space();
- }
-
- if (node.abstract) {
- this.word("abstract");
- this.space();
- }
-
- this.word("class");
-
- if (node.id) {
- this.space();
- this.print(node.id, node);
- }
-
- this.print(node.typeParameters, node);
-
- if (node.superClass) {
- this.space();
- this.word("extends");
- this.space();
- this.print(node.superClass, node);
- this.print(node.superTypeParameters, node);
- }
-
- if (node.implements) {
- this.space();
- this.word("implements");
- this.space();
- this.printList(node.implements, node);
- }
-
- this.space();
- this.print(node.body, node);
-}
-
-function ClassBody(node) {
- this.token("{");
- this.printInnerComments(node);
-
- if (node.body.length === 0) {
- this.token("}");
- } else {
- this.newline();
- this.indent();
- this.printSequence(node.body, node);
- this.dedent();
- if (!this.endsWith("\n")) this.newline();
- this.rightBrace();
- }
-}
-
-function ClassProperty(node) {
- this.printJoin(node.decorators, node);
-
- if (node.accessibility) {
- this.word(node.accessibility);
- this.space();
- }
-
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- if (node.abstract) {
- this.word("abstract");
- this.space();
- }
-
- if (node.readonly) {
- this.word("readonly");
- this.space();
- }
-
- if (node.computed) {
- this.token("[");
- this.print(node.key, node);
- this.token("]");
- } else {
- this._variance(node);
-
- this.print(node.key, node);
- }
-
- if (node.optional) {
- this.token("?");
- }
-
- if (node.definite) {
- this.token("!");
- }
-
- this.print(node.typeAnnotation, node);
-
- if (node.value) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.value, node);
- }
-
- this.semicolon();
-}
-
-function ClassPrivateProperty(node) {
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this.print(node.key, node);
- this.print(node.typeAnnotation, node);
-
- if (node.value) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.value, node);
- }
-
- this.semicolon();
-}
-
-function ClassMethod(node) {
- this._classMethodHead(node);
-
- this.space();
- this.print(node.body, node);
-}
-
-function ClassPrivateMethod(node) {
- this._classMethodHead(node);
-
- this.space();
- this.print(node.body, node);
-}
-
-function _classMethodHead(node) {
- this.printJoin(node.decorators, node);
-
- if (node.accessibility) {
- this.word(node.accessibility);
- this.space();
- }
-
- if (node.abstract) {
- this.word("abstract");
- this.space();
- }
-
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this._methodHead(node);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/expressions.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/expressions.js
deleted file mode 100644
index 45efa98efa1..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/expressions.js
+++ /dev/null
@@ -1,292 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.UnaryExpression = UnaryExpression;
-exports.DoExpression = DoExpression;
-exports.ParenthesizedExpression = ParenthesizedExpression;
-exports.UpdateExpression = UpdateExpression;
-exports.ConditionalExpression = ConditionalExpression;
-exports.NewExpression = NewExpression;
-exports.SequenceExpression = SequenceExpression;
-exports.ThisExpression = ThisExpression;
-exports.Super = Super;
-exports.Decorator = Decorator;
-exports.OptionalMemberExpression = OptionalMemberExpression;
-exports.OptionalCallExpression = OptionalCallExpression;
-exports.CallExpression = CallExpression;
-exports.Import = Import;
-exports.EmptyStatement = EmptyStatement;
-exports.ExpressionStatement = ExpressionStatement;
-exports.AssignmentPattern = AssignmentPattern;
-exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
-exports.BindExpression = BindExpression;
-exports.MemberExpression = MemberExpression;
-exports.MetaProperty = MetaProperty;
-exports.PrivateName = PrivateName;
-exports.AwaitExpression = exports.YieldExpression = void 0;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var n = _interopRequireWildcard(require("../node"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function UnaryExpression(node) {
- if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
- this.word(node.operator);
- this.space();
- } else {
- this.token(node.operator);
- }
-
- this.print(node.argument, node);
-}
-
-function DoExpression(node) {
- this.word("do");
- this.space();
- this.print(node.body, node);
-}
-
-function ParenthesizedExpression(node) {
- this.token("(");
- this.print(node.expression, node);
- this.token(")");
-}
-
-function UpdateExpression(node) {
- if (node.prefix) {
- this.token(node.operator);
- this.print(node.argument, node);
- } else {
- this.startTerminatorless(true);
- this.print(node.argument, node);
- this.endTerminatorless();
- this.token(node.operator);
- }
-}
-
-function ConditionalExpression(node) {
- this.print(node.test, node);
- this.space();
- this.token("?");
- this.space();
- this.print(node.consequent, node);
- this.space();
- this.token(":");
- this.space();
- this.print(node.alternate, node);
-}
-
-function NewExpression(node, parent) {
- this.word("new");
- this.space();
- this.print(node.callee, node);
-
- if (this.format.minified && node.arguments.length === 0 && !node.optional && !t().isCallExpression(parent, {
- callee: node
- }) && !t().isMemberExpression(parent) && !t().isNewExpression(parent)) {
- return;
- }
-
- this.print(node.typeArguments, node);
- this.print(node.typeParameters, node);
-
- if (node.optional) {
- this.token("?.");
- }
-
- this.token("(");
- this.printList(node.arguments, node);
- this.token(")");
-}
-
-function SequenceExpression(node) {
- this.printList(node.expressions, node);
-}
-
-function ThisExpression() {
- this.word("this");
-}
-
-function Super() {
- this.word("super");
-}
-
-function Decorator(node) {
- this.token("@");
- this.print(node.expression, node);
- this.newline();
-}
-
-function OptionalMemberExpression(node) {
- this.print(node.object, node);
-
- if (!node.computed && t().isMemberExpression(node.property)) {
- throw new TypeError("Got a MemberExpression for MemberExpression property");
- }
-
- let computed = node.computed;
-
- if (t().isLiteral(node.property) && typeof node.property.value === "number") {
- computed = true;
- }
-
- if (node.optional) {
- this.token("?.");
- }
-
- if (computed) {
- this.token("[");
- this.print(node.property, node);
- this.token("]");
- } else {
- if (!node.optional) {
- this.token(".");
- }
-
- this.print(node.property, node);
- }
-}
-
-function OptionalCallExpression(node) {
- this.print(node.callee, node);
- this.print(node.typeArguments, node);
- this.print(node.typeParameters, node);
-
- if (node.optional) {
- this.token("?.");
- }
-
- this.token("(");
- this.printList(node.arguments, node);
- this.token(")");
-}
-
-function CallExpression(node) {
- this.print(node.callee, node);
- this.print(node.typeArguments, node);
- this.print(node.typeParameters, node);
- this.token("(");
- this.printList(node.arguments, node);
- this.token(")");
-}
-
-function Import() {
- this.word("import");
-}
-
-function buildYieldAwait(keyword) {
- return function (node) {
- this.word(keyword);
-
- if (node.delegate) {
- this.token("*");
- }
-
- if (node.argument) {
- this.space();
- const terminatorState = this.startTerminatorless();
- this.print(node.argument, node);
- this.endTerminatorless(terminatorState);
- }
- };
-}
-
-const YieldExpression = buildYieldAwait("yield");
-exports.YieldExpression = YieldExpression;
-const AwaitExpression = buildYieldAwait("await");
-exports.AwaitExpression = AwaitExpression;
-
-function EmptyStatement() {
- this.semicolon(true);
-}
-
-function ExpressionStatement(node) {
- this.print(node.expression, node);
- this.semicolon();
-}
-
-function AssignmentPattern(node) {
- this.print(node.left, node);
- if (node.left.optional) this.token("?");
- this.print(node.left.typeAnnotation, node);
- this.space();
- this.token("=");
- this.space();
- this.print(node.right, node);
-}
-
-function AssignmentExpression(node, parent) {
- const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
-
- if (parens) {
- this.token("(");
- }
-
- this.print(node.left, node);
- this.space();
-
- if (node.operator === "in" || node.operator === "instanceof") {
- this.word(node.operator);
- } else {
- this.token(node.operator);
- }
-
- this.space();
- this.print(node.right, node);
-
- if (parens) {
- this.token(")");
- }
-}
-
-function BindExpression(node) {
- this.print(node.object, node);
- this.token("::");
- this.print(node.callee, node);
-}
-
-function MemberExpression(node) {
- this.print(node.object, node);
-
- if (!node.computed && t().isMemberExpression(node.property)) {
- throw new TypeError("Got a MemberExpression for MemberExpression property");
- }
-
- let computed = node.computed;
-
- if (t().isLiteral(node.property) && typeof node.property.value === "number") {
- computed = true;
- }
-
- if (computed) {
- this.token("[");
- this.print(node.property, node);
- this.token("]");
- } else {
- this.token(".");
- this.print(node.property, node);
- }
-}
-
-function MetaProperty(node) {
- this.print(node.meta, node);
- this.token(".");
- this.print(node.property, node);
-}
-
-function PrivateName(node) {
- this.token("#");
- this.print(node.id, node);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js
deleted file mode 100644
index 8853fd8aabc..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/flow.js
+++ /dev/null
@@ -1,639 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.AnyTypeAnnotation = AnyTypeAnnotation;
-exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
-exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
-exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
-exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
-exports.DeclareClass = DeclareClass;
-exports.DeclareFunction = DeclareFunction;
-exports.InferredPredicate = InferredPredicate;
-exports.DeclaredPredicate = DeclaredPredicate;
-exports.DeclareInterface = DeclareInterface;
-exports.DeclareModule = DeclareModule;
-exports.DeclareModuleExports = DeclareModuleExports;
-exports.DeclareTypeAlias = DeclareTypeAlias;
-exports.DeclareOpaqueType = DeclareOpaqueType;
-exports.DeclareVariable = DeclareVariable;
-exports.DeclareExportDeclaration = DeclareExportDeclaration;
-exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
-exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
-exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
-exports.FunctionTypeParam = FunctionTypeParam;
-exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
-exports._interfaceish = _interfaceish;
-exports._variance = _variance;
-exports.InterfaceDeclaration = InterfaceDeclaration;
-exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
-exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
-exports.MixedTypeAnnotation = MixedTypeAnnotation;
-exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
-exports.NullableTypeAnnotation = NullableTypeAnnotation;
-exports.NumberTypeAnnotation = NumberTypeAnnotation;
-exports.StringTypeAnnotation = StringTypeAnnotation;
-exports.ThisTypeAnnotation = ThisTypeAnnotation;
-exports.TupleTypeAnnotation = TupleTypeAnnotation;
-exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
-exports.TypeAlias = TypeAlias;
-exports.TypeAnnotation = TypeAnnotation;
-exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
-exports.TypeParameter = TypeParameter;
-exports.OpaqueType = OpaqueType;
-exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
-exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
-exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
-exports.ObjectTypeIndexer = ObjectTypeIndexer;
-exports.ObjectTypeProperty = ObjectTypeProperty;
-exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
-exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
-exports.UnionTypeAnnotation = UnionTypeAnnotation;
-exports.TypeCastExpression = TypeCastExpression;
-exports.Variance = Variance;
-exports.VoidTypeAnnotation = VoidTypeAnnotation;
-Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
- enumerable: true,
- get: function () {
- return _types2.NumericLiteral;
- }
-});
-Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
- enumerable: true,
- get: function () {
- return _types2.StringLiteral;
- }
-});
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var _modules = require("./modules");
-
-var _types2 = require("./types");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function AnyTypeAnnotation() {
- this.word("any");
-}
-
-function ArrayTypeAnnotation(node) {
- this.print(node.elementType, node);
- this.token("[");
- this.token("]");
-}
-
-function BooleanTypeAnnotation() {
- this.word("boolean");
-}
-
-function BooleanLiteralTypeAnnotation(node) {
- this.word(node.value ? "true" : "false");
-}
-
-function NullLiteralTypeAnnotation() {
- this.word("null");
-}
-
-function DeclareClass(node, parent) {
- if (!t().isDeclareExportDeclaration(parent)) {
- this.word("declare");
- this.space();
- }
-
- this.word("class");
- this.space();
-
- this._interfaceish(node);
-}
-
-function DeclareFunction(node, parent) {
- if (!t().isDeclareExportDeclaration(parent)) {
- this.word("declare");
- this.space();
- }
-
- this.word("function");
- this.space();
- this.print(node.id, node);
- this.print(node.id.typeAnnotation.typeAnnotation, node);
-
- if (node.predicate) {
- this.space();
- this.print(node.predicate, node);
- }
-
- this.semicolon();
-}
-
-function InferredPredicate() {
- this.token("%");
- this.word("checks");
-}
-
-function DeclaredPredicate(node) {
- this.token("%");
- this.word("checks");
- this.token("(");
- this.print(node.value, node);
- this.token(")");
-}
-
-function DeclareInterface(node) {
- this.word("declare");
- this.space();
- this.InterfaceDeclaration(node);
-}
-
-function DeclareModule(node) {
- this.word("declare");
- this.space();
- this.word("module");
- this.space();
- this.print(node.id, node);
- this.space();
- this.print(node.body, node);
-}
-
-function DeclareModuleExports(node) {
- this.word("declare");
- this.space();
- this.word("module");
- this.token(".");
- this.word("exports");
- this.print(node.typeAnnotation, node);
-}
-
-function DeclareTypeAlias(node) {
- this.word("declare");
- this.space();
- this.TypeAlias(node);
-}
-
-function DeclareOpaqueType(node, parent) {
- if (!t().isDeclareExportDeclaration(parent)) {
- this.word("declare");
- this.space();
- }
-
- this.OpaqueType(node);
-}
-
-function DeclareVariable(node, parent) {
- if (!t().isDeclareExportDeclaration(parent)) {
- this.word("declare");
- this.space();
- }
-
- this.word("var");
- this.space();
- this.print(node.id, node);
- this.print(node.id.typeAnnotation, node);
- this.semicolon();
-}
-
-function DeclareExportDeclaration(node) {
- this.word("declare");
- this.space();
- this.word("export");
- this.space();
-
- if (node.default) {
- this.word("default");
- this.space();
- }
-
- FlowExportDeclaration.apply(this, arguments);
-}
-
-function DeclareExportAllDeclaration() {
- this.word("declare");
- this.space();
-
- _modules.ExportAllDeclaration.apply(this, arguments);
-}
-
-function FlowExportDeclaration(node) {
- if (node.declaration) {
- const declar = node.declaration;
- this.print(declar, node);
- if (!t().isStatement(declar)) this.semicolon();
- } else {
- this.token("{");
-
- if (node.specifiers.length) {
- this.space();
- this.printList(node.specifiers, node);
- this.space();
- }
-
- this.token("}");
-
- if (node.source) {
- this.space();
- this.word("from");
- this.space();
- this.print(node.source, node);
- }
-
- this.semicolon();
- }
-}
-
-function ExistsTypeAnnotation() {
- this.token("*");
-}
-
-function FunctionTypeAnnotation(node, parent) {
- this.print(node.typeParameters, node);
- this.token("(");
- this.printList(node.params, node);
-
- if (node.rest) {
- if (node.params.length) {
- this.token(",");
- this.space();
- }
-
- this.token("...");
- this.print(node.rest, node);
- }
-
- this.token(")");
-
- if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
- this.token(":");
- } else {
- this.space();
- this.token("=>");
- }
-
- this.space();
- this.print(node.returnType, node);
-}
-
-function FunctionTypeParam(node) {
- this.print(node.name, node);
- if (node.optional) this.token("?");
-
- if (node.name) {
- this.token(":");
- this.space();
- }
-
- this.print(node.typeAnnotation, node);
-}
-
-function InterfaceExtends(node) {
- this.print(node.id, node);
- this.print(node.typeParameters, node);
-}
-
-function _interfaceish(node) {
- this.print(node.id, node);
- this.print(node.typeParameters, node);
-
- if (node.extends.length) {
- this.space();
- this.word("extends");
- this.space();
- this.printList(node.extends, node);
- }
-
- if (node.mixins && node.mixins.length) {
- this.space();
- this.word("mixins");
- this.space();
- this.printList(node.mixins, node);
- }
-
- if (node.implements && node.implements.length) {
- this.space();
- this.word("implements");
- this.space();
- this.printList(node.implements, node);
- }
-
- this.space();
- this.print(node.body, node);
-}
-
-function _variance(node) {
- if (node.variance) {
- if (node.variance.kind === "plus") {
- this.token("+");
- } else if (node.variance.kind === "minus") {
- this.token("-");
- }
- }
-}
-
-function InterfaceDeclaration(node) {
- this.word("interface");
- this.space();
-
- this._interfaceish(node);
-}
-
-function andSeparator() {
- this.space();
- this.token("&");
- this.space();
-}
-
-function InterfaceTypeAnnotation(node) {
- this.word("interface");
-
- if (node.extends && node.extends.length) {
- this.space();
- this.word("extends");
- this.space();
- this.printList(node.extends, node);
- }
-
- this.space();
- this.print(node.body, node);
-}
-
-function IntersectionTypeAnnotation(node) {
- this.printJoin(node.types, node, {
- separator: andSeparator
- });
-}
-
-function MixedTypeAnnotation() {
- this.word("mixed");
-}
-
-function EmptyTypeAnnotation() {
- this.word("empty");
-}
-
-function NullableTypeAnnotation(node) {
- this.token("?");
- this.print(node.typeAnnotation, node);
-}
-
-function NumberTypeAnnotation() {
- this.word("number");
-}
-
-function StringTypeAnnotation() {
- this.word("string");
-}
-
-function ThisTypeAnnotation() {
- this.word("this");
-}
-
-function TupleTypeAnnotation(node) {
- this.token("[");
- this.printList(node.types, node);
- this.token("]");
-}
-
-function TypeofTypeAnnotation(node) {
- this.word("typeof");
- this.space();
- this.print(node.argument, node);
-}
-
-function TypeAlias(node) {
- this.word("type");
- this.space();
- this.print(node.id, node);
- this.print(node.typeParameters, node);
- this.space();
- this.token("=");
- this.space();
- this.print(node.right, node);
- this.semicolon();
-}
-
-function TypeAnnotation(node) {
- this.token(":");
- this.space();
- if (node.optional) this.token("?");
- this.print(node.typeAnnotation, node);
-}
-
-function TypeParameterInstantiation(node) {
- this.token("<");
- this.printList(node.params, node, {});
- this.token(">");
-}
-
-function TypeParameter(node) {
- this._variance(node);
-
- this.word(node.name);
-
- if (node.bound) {
- this.print(node.bound, node);
- }
-
- if (node.default) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.default, node);
- }
-}
-
-function OpaqueType(node) {
- this.word("opaque");
- this.space();
- this.word("type");
- this.space();
- this.print(node.id, node);
- this.print(node.typeParameters, node);
-
- if (node.supertype) {
- this.token(":");
- this.space();
- this.print(node.supertype, node);
- }
-
- if (node.impltype) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.impltype, node);
- }
-
- this.semicolon();
-}
-
-function ObjectTypeAnnotation(node) {
- if (node.exact) {
- this.token("{|");
- } else {
- this.token("{");
- }
-
- const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []);
-
- if (props.length) {
- this.space();
- this.printJoin(props, node, {
- addNewlines(leading) {
- if (leading && !props[0]) return 1;
- },
-
- indent: true,
- statement: true,
- iterator: () => {
- if (props.length !== 1 || node.inexact) {
- this.token(",");
- this.space();
- }
- }
- });
- this.space();
- }
-
- if (node.inexact) {
- this.indent();
- this.token("...");
-
- if (props.length) {
- this.newline();
- }
-
- this.dedent();
- }
-
- if (node.exact) {
- this.token("|}");
- } else {
- this.token("}");
- }
-}
-
-function ObjectTypeInternalSlot(node) {
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this.token("[");
- this.token("[");
- this.print(node.id, node);
- this.token("]");
- this.token("]");
- if (node.optional) this.token("?");
-
- if (!node.method) {
- this.token(":");
- this.space();
- }
-
- this.print(node.value, node);
-}
-
-function ObjectTypeCallProperty(node) {
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this.print(node.value, node);
-}
-
-function ObjectTypeIndexer(node) {
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this._variance(node);
-
- this.token("[");
-
- if (node.id) {
- this.print(node.id, node);
- this.token(":");
- this.space();
- }
-
- this.print(node.key, node);
- this.token("]");
- this.token(":");
- this.space();
- this.print(node.value, node);
-}
-
-function ObjectTypeProperty(node) {
- if (node.proto) {
- this.word("proto");
- this.space();
- }
-
- if (node.static) {
- this.word("static");
- this.space();
- }
-
- this._variance(node);
-
- this.print(node.key, node);
- if (node.optional) this.token("?");
-
- if (!node.method) {
- this.token(":");
- this.space();
- }
-
- this.print(node.value, node);
-}
-
-function ObjectTypeSpreadProperty(node) {
- this.token("...");
- this.print(node.argument, node);
-}
-
-function QualifiedTypeIdentifier(node) {
- this.print(node.qualification, node);
- this.token(".");
- this.print(node.id, node);
-}
-
-function orSeparator() {
- this.space();
- this.token("|");
- this.space();
-}
-
-function UnionTypeAnnotation(node) {
- this.printJoin(node.types, node, {
- separator: orSeparator
- });
-}
-
-function TypeCastExpression(node) {
- this.token("(");
- this.print(node.expression, node);
- this.print(node.typeAnnotation, node);
- this.token(")");
-}
-
-function Variance(node) {
- if (node.kind === "plus") {
- this.token("+");
- } else {
- this.token("-");
- }
-}
-
-function VoidTypeAnnotation() {
- this.word("void");
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js
deleted file mode 100644
index f2b4cecad56..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/index.js
+++ /dev/null
@@ -1,137 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _templateLiterals = require("./template-literals");
-
-Object.keys(_templateLiterals).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _templateLiterals[key];
- }
- });
-});
-
-var _expressions = require("./expressions");
-
-Object.keys(_expressions).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _expressions[key];
- }
- });
-});
-
-var _statements = require("./statements");
-
-Object.keys(_statements).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _statements[key];
- }
- });
-});
-
-var _classes = require("./classes");
-
-Object.keys(_classes).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _classes[key];
- }
- });
-});
-
-var _methods = require("./methods");
-
-Object.keys(_methods).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _methods[key];
- }
- });
-});
-
-var _modules = require("./modules");
-
-Object.keys(_modules).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _modules[key];
- }
- });
-});
-
-var _types = require("./types");
-
-Object.keys(_types).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _types[key];
- }
- });
-});
-
-var _flow = require("./flow");
-
-Object.keys(_flow).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _flow[key];
- }
- });
-});
-
-var _base = require("./base");
-
-Object.keys(_base).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _base[key];
- }
- });
-});
-
-var _jsx = require("./jsx");
-
-Object.keys(_jsx).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _jsx[key];
- }
- });
-});
-
-var _typescript = require("./typescript");
-
-Object.keys(_typescript).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _typescript[key];
- }
- });
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js
deleted file mode 100644
index 39965bacc19..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/methods.js
+++ /dev/null
@@ -1,167 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports._params = _params;
-exports._parameters = _parameters;
-exports._param = _param;
-exports._methodHead = _methodHead;
-exports._predicate = _predicate;
-exports._functionHead = _functionHead;
-exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
-exports.ArrowFunctionExpression = ArrowFunctionExpression;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _params(node) {
- this.print(node.typeParameters, node);
- this.token("(");
-
- this._parameters(node.params, node);
-
- this.token(")");
- this.print(node.returnType, node);
-}
-
-function _parameters(parameters, parent) {
- for (let i = 0; i < parameters.length; i++) {
- this._param(parameters[i], parent);
-
- if (i < parameters.length - 1) {
- this.token(",");
- this.space();
- }
- }
-}
-
-function _param(parameter, parent) {
- this.printJoin(parameter.decorators, parameter);
- this.print(parameter, parent);
- if (parameter.optional) this.token("?");
- this.print(parameter.typeAnnotation, parameter);
-}
-
-function _methodHead(node) {
- const kind = node.kind;
- const key = node.key;
-
- if (kind === "get" || kind === "set") {
- this.word(kind);
- this.space();
- }
-
- if (node.async) {
- this.word("async");
- this.space();
- }
-
- if (kind === "method" || kind === "init") {
- if (node.generator) {
- this.token("*");
- }
- }
-
- if (node.computed) {
- this.token("[");
- this.print(key, node);
- this.token("]");
- } else {
- this.print(key, node);
- }
-
- if (node.optional) {
- this.token("?");
- }
-
- this._params(node);
-}
-
-function _predicate(node) {
- if (node.predicate) {
- if (!node.returnType) {
- this.token(":");
- }
-
- this.space();
- this.print(node.predicate, node);
- }
-}
-
-function _functionHead(node) {
- if (node.async) {
- this.word("async");
- this.space();
- }
-
- this.word("function");
- if (node.generator) this.token("*");
- this.space();
-
- if (node.id) {
- this.print(node.id, node);
- }
-
- this._params(node);
-
- this._predicate(node);
-}
-
-function FunctionExpression(node) {
- this._functionHead(node);
-
- this.space();
- this.print(node.body, node);
-}
-
-function ArrowFunctionExpression(node) {
- if (node.async) {
- this.word("async");
- this.space();
- }
-
- const firstParam = node.params[0];
-
- if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
- if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) {
- this.token("(");
-
- if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) {
- this.indent();
- this.print(firstParam, node);
- this.dedent();
-
- this._catchUp("start", node.body.loc);
- } else {
- this.print(firstParam, node);
- }
-
- this.token(")");
- } else {
- this.print(firstParam, node);
- }
- } else {
- this._params(node);
- }
-
- this._predicate(node);
-
- this.space();
- this.token("=>");
- this.space();
- this.print(node.body, node);
-}
-
-function hasTypes(node, param) {
- return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js
deleted file mode 100644
index af87bd586e6..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/modules.js
+++ /dev/null
@@ -1,214 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.ImportSpecifier = ImportSpecifier;
-exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
-exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
-exports.ExportSpecifier = ExportSpecifier;
-exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
-exports.ExportAllDeclaration = ExportAllDeclaration;
-exports.ExportNamedDeclaration = ExportNamedDeclaration;
-exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
-exports.ImportDeclaration = ImportDeclaration;
-exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function ImportSpecifier(node) {
- if (node.importKind === "type" || node.importKind === "typeof") {
- this.word(node.importKind);
- this.space();
- }
-
- this.print(node.imported, node);
-
- if (node.local && node.local.name !== node.imported.name) {
- this.space();
- this.word("as");
- this.space();
- this.print(node.local, node);
- }
-}
-
-function ImportDefaultSpecifier(node) {
- this.print(node.local, node);
-}
-
-function ExportDefaultSpecifier(node) {
- this.print(node.exported, node);
-}
-
-function ExportSpecifier(node) {
- this.print(node.local, node);
-
- if (node.exported && node.local.name !== node.exported.name) {
- this.space();
- this.word("as");
- this.space();
- this.print(node.exported, node);
- }
-}
-
-function ExportNamespaceSpecifier(node) {
- this.token("*");
- this.space();
- this.word("as");
- this.space();
- this.print(node.exported, node);
-}
-
-function ExportAllDeclaration(node) {
- this.word("export");
- this.space();
-
- if (node.exportKind === "type") {
- this.word("type");
- this.space();
- }
-
- this.token("*");
- this.space();
- this.word("from");
- this.space();
- this.print(node.source, node);
- this.semicolon();
-}
-
-function ExportNamedDeclaration(node) {
- if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) {
- this.printJoin(node.declaration.decorators, node);
- }
-
- this.word("export");
- this.space();
- ExportDeclaration.apply(this, arguments);
-}
-
-function ExportDefaultDeclaration(node) {
- if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) {
- this.printJoin(node.declaration.decorators, node);
- }
-
- this.word("export");
- this.space();
- this.word("default");
- this.space();
- ExportDeclaration.apply(this, arguments);
-}
-
-function ExportDeclaration(node) {
- if (node.declaration) {
- const declar = node.declaration;
- this.print(declar, node);
- if (!t().isStatement(declar)) this.semicolon();
- } else {
- if (node.exportKind === "type") {
- this.word("type");
- this.space();
- }
-
- const specifiers = node.specifiers.slice(0);
- let hasSpecial = false;
-
- while (true) {
- const first = specifiers[0];
-
- if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) {
- hasSpecial = true;
- this.print(specifiers.shift(), node);
-
- if (specifiers.length) {
- this.token(",");
- this.space();
- }
- } else {
- break;
- }
- }
-
- if (specifiers.length || !specifiers.length && !hasSpecial) {
- this.token("{");
-
- if (specifiers.length) {
- this.space();
- this.printList(specifiers, node);
- this.space();
- }
-
- this.token("}");
- }
-
- if (node.source) {
- this.space();
- this.word("from");
- this.space();
- this.print(node.source, node);
- }
-
- this.semicolon();
- }
-}
-
-function ImportDeclaration(node) {
- this.word("import");
- this.space();
-
- if (node.importKind === "type" || node.importKind === "typeof") {
- this.word(node.importKind);
- this.space();
- }
-
- const specifiers = node.specifiers.slice(0);
-
- if (specifiers && specifiers.length) {
- while (true) {
- const first = specifiers[0];
-
- if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) {
- this.print(specifiers.shift(), node);
-
- if (specifiers.length) {
- this.token(",");
- this.space();
- }
- } else {
- break;
- }
- }
-
- if (specifiers.length) {
- this.token("{");
- this.space();
- this.printList(specifiers, node);
- this.space();
- this.token("}");
- }
-
- this.space();
- this.word("from");
- this.space();
- }
-
- this.print(node.source, node);
- this.semicolon();
-}
-
-function ImportNamespaceSpecifier(node) {
- this.token("*");
- this.space();
- this.word("as");
- this.space();
- this.print(node.local, node);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/statements.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/statements.js
deleted file mode 100644
index c74363de594..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/statements.js
+++ /dev/null
@@ -1,319 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.WithStatement = WithStatement;
-exports.IfStatement = IfStatement;
-exports.ForStatement = ForStatement;
-exports.WhileStatement = WhileStatement;
-exports.DoWhileStatement = DoWhileStatement;
-exports.LabeledStatement = LabeledStatement;
-exports.TryStatement = TryStatement;
-exports.CatchClause = CatchClause;
-exports.SwitchStatement = SwitchStatement;
-exports.SwitchCase = SwitchCase;
-exports.DebuggerStatement = DebuggerStatement;
-exports.VariableDeclaration = VariableDeclaration;
-exports.VariableDeclarator = VariableDeclarator;
-exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function WithStatement(node) {
- this.word("with");
- this.space();
- this.token("(");
- this.print(node.object, node);
- this.token(")");
- this.printBlock(node);
-}
-
-function IfStatement(node) {
- this.word("if");
- this.space();
- this.token("(");
- this.print(node.test, node);
- this.token(")");
- this.space();
- const needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent));
-
- if (needsBlock) {
- this.token("{");
- this.newline();
- this.indent();
- }
-
- this.printAndIndentOnComments(node.consequent, node);
-
- if (needsBlock) {
- this.dedent();
- this.newline();
- this.token("}");
- }
-
- if (node.alternate) {
- if (this.endsWith("}")) this.space();
- this.word("else");
- this.space();
- this.printAndIndentOnComments(node.alternate, node);
- }
-}
-
-function getLastStatement(statement) {
- if (!t().isStatement(statement.body)) return statement;
- return getLastStatement(statement.body);
-}
-
-function ForStatement(node) {
- this.word("for");
- this.space();
- this.token("(");
- this.inForStatementInitCounter++;
- this.print(node.init, node);
- this.inForStatementInitCounter--;
- this.token(";");
-
- if (node.test) {
- this.space();
- this.print(node.test, node);
- }
-
- this.token(";");
-
- if (node.update) {
- this.space();
- this.print(node.update, node);
- }
-
- this.token(")");
- this.printBlock(node);
-}
-
-function WhileStatement(node) {
- this.word("while");
- this.space();
- this.token("(");
- this.print(node.test, node);
- this.token(")");
- this.printBlock(node);
-}
-
-const buildForXStatement = function (op) {
- return function (node) {
- this.word("for");
- this.space();
-
- if (op === "of" && node.await) {
- this.word("await");
- this.space();
- }
-
- this.token("(");
- this.print(node.left, node);
- this.space();
- this.word(op);
- this.space();
- this.print(node.right, node);
- this.token(")");
- this.printBlock(node);
- };
-};
-
-const ForInStatement = buildForXStatement("in");
-exports.ForInStatement = ForInStatement;
-const ForOfStatement = buildForXStatement("of");
-exports.ForOfStatement = ForOfStatement;
-
-function DoWhileStatement(node) {
- this.word("do");
- this.space();
- this.print(node.body, node);
- this.space();
- this.word("while");
- this.space();
- this.token("(");
- this.print(node.test, node);
- this.token(")");
- this.semicolon();
-}
-
-function buildLabelStatement(prefix, key = "label") {
- return function (node) {
- this.word(prefix);
- const label = node[key];
-
- if (label) {
- this.space();
- const isLabel = key == "label";
- const terminatorState = this.startTerminatorless(isLabel);
- this.print(label, node);
- this.endTerminatorless(terminatorState);
- }
-
- this.semicolon();
- };
-}
-
-const ContinueStatement = buildLabelStatement("continue");
-exports.ContinueStatement = ContinueStatement;
-const ReturnStatement = buildLabelStatement("return", "argument");
-exports.ReturnStatement = ReturnStatement;
-const BreakStatement = buildLabelStatement("break");
-exports.BreakStatement = BreakStatement;
-const ThrowStatement = buildLabelStatement("throw", "argument");
-exports.ThrowStatement = ThrowStatement;
-
-function LabeledStatement(node) {
- this.print(node.label, node);
- this.token(":");
- this.space();
- this.print(node.body, node);
-}
-
-function TryStatement(node) {
- this.word("try");
- this.space();
- this.print(node.block, node);
- this.space();
-
- if (node.handlers) {
- this.print(node.handlers[0], node);
- } else {
- this.print(node.handler, node);
- }
-
- if (node.finalizer) {
- this.space();
- this.word("finally");
- this.space();
- this.print(node.finalizer, node);
- }
-}
-
-function CatchClause(node) {
- this.word("catch");
- this.space();
-
- if (node.param) {
- this.token("(");
- this.print(node.param, node);
- this.token(")");
- this.space();
- }
-
- this.print(node.body, node);
-}
-
-function SwitchStatement(node) {
- this.word("switch");
- this.space();
- this.token("(");
- this.print(node.discriminant, node);
- this.token(")");
- this.space();
- this.token("{");
- this.printSequence(node.cases, node, {
- indent: true,
-
- addNewlines(leading, cas) {
- if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
- }
-
- });
- this.token("}");
-}
-
-function SwitchCase(node) {
- if (node.test) {
- this.word("case");
- this.space();
- this.print(node.test, node);
- this.token(":");
- } else {
- this.word("default");
- this.token(":");
- }
-
- if (node.consequent.length) {
- this.newline();
- this.printSequence(node.consequent, node, {
- indent: true
- });
- }
-}
-
-function DebuggerStatement() {
- this.word("debugger");
- this.semicolon();
-}
-
-function variableDeclarationIndent() {
- this.token(",");
- this.newline();
- if (this.endsWith("\n")) for (let i = 0; i < 4; i++) this.space(true);
-}
-
-function constDeclarationIndent() {
- this.token(",");
- this.newline();
- if (this.endsWith("\n")) for (let i = 0; i < 6; i++) this.space(true);
-}
-
-function VariableDeclaration(node, parent) {
- if (node.declare) {
- this.word("declare");
- this.space();
- }
-
- this.word(node.kind);
- this.space();
- let hasInits = false;
-
- if (!t().isFor(parent)) {
- for (const declar of node.declarations) {
- if (declar.init) {
- hasInits = true;
- }
- }
- }
-
- let separator;
-
- if (hasInits) {
- separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
- }
-
- this.printList(node.declarations, node, {
- separator
- });
-
- if (t().isFor(parent)) {
- if (parent.left === node || parent.init === node) return;
- }
-
- this.semicolon();
-}
-
-function VariableDeclarator(node) {
- this.print(node.id, node);
- if (node.definite) this.token("!");
- this.print(node.id.typeAnnotation, node);
-
- if (node.init) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.init, node);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js
deleted file mode 100644
index 12ae494fb7f..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/types.js
+++ /dev/null
@@ -1,198 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.Identifier = Identifier;
-exports.ArgumentPlaceholder = ArgumentPlaceholder;
-exports.SpreadElement = exports.RestElement = RestElement;
-exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
-exports.ObjectMethod = ObjectMethod;
-exports.ObjectProperty = ObjectProperty;
-exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
-exports.RegExpLiteral = RegExpLiteral;
-exports.BooleanLiteral = BooleanLiteral;
-exports.NullLiteral = NullLiteral;
-exports.NumericLiteral = NumericLiteral;
-exports.StringLiteral = StringLiteral;
-exports.BigIntLiteral = BigIntLiteral;
-exports.PipelineTopicExpression = PipelineTopicExpression;
-exports.PipelineBareFunction = PipelineBareFunction;
-exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _jsesc() {
- const data = _interopRequireDefault(require("jsesc"));
-
- _jsesc = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function Identifier(node) {
- this.exactSource(node.loc, () => {
- this.word(node.name);
- });
-}
-
-function ArgumentPlaceholder() {
- this.token("?");
-}
-
-function RestElement(node) {
- this.token("...");
- this.print(node.argument, node);
-}
-
-function ObjectExpression(node) {
- const props = node.properties;
- this.token("{");
- this.printInnerComments(node);
-
- if (props.length) {
- this.space();
- this.printList(props, node, {
- indent: true,
- statement: true
- });
- this.space();
- }
-
- this.token("}");
-}
-
-function ObjectMethod(node) {
- this.printJoin(node.decorators, node);
-
- this._methodHead(node);
-
- this.space();
- this.print(node.body, node);
-}
-
-function ObjectProperty(node) {
- this.printJoin(node.decorators, node);
-
- if (node.computed) {
- this.token("[");
- this.print(node.key, node);
- this.token("]");
- } else {
- if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) {
- this.print(node.value, node);
- return;
- }
-
- this.print(node.key, node);
-
- if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) {
- return;
- }
- }
-
- this.token(":");
- this.space();
- this.print(node.value, node);
-}
-
-function ArrayExpression(node) {
- const elems = node.elements;
- const len = elems.length;
- this.token("[");
- this.printInnerComments(node);
-
- for (let i = 0; i < elems.length; i++) {
- const elem = elems[i];
-
- if (elem) {
- if (i > 0) this.space();
- this.print(elem, node);
- if (i < len - 1) this.token(",");
- } else {
- this.token(",");
- }
- }
-
- this.token("]");
-}
-
-function RegExpLiteral(node) {
- this.word(`/${node.pattern}/${node.flags}`);
-}
-
-function BooleanLiteral(node) {
- this.word(node.value ? "true" : "false");
-}
-
-function NullLiteral() {
- this.word("null");
-}
-
-function NumericLiteral(node) {
- const raw = this.getPossibleRaw(node);
- const value = node.value + "";
-
- if (raw == null) {
- this.number(value);
- } else if (this.format.minified) {
- this.number(raw.length < value.length ? raw : value);
- } else {
- this.number(raw);
- }
-}
-
-function StringLiteral(node) {
- const raw = this.getPossibleRaw(node);
-
- if (!this.format.minified && raw != null) {
- this.token(raw);
- return;
- }
-
- const opts = this.format.jsescOption;
-
- if (this.format.jsonCompatibleStrings) {
- opts.json = true;
- }
-
- const val = (0, _jsesc().default)(node.value, opts);
- return this.token(val);
-}
-
-function BigIntLiteral(node) {
- const raw = this.getPossibleRaw(node);
-
- if (!this.format.minified && raw != null) {
- this.token(raw);
- return;
- }
-
- this.token(node.value);
-}
-
-function PipelineTopicExpression(node) {
- this.print(node.expression, node);
-}
-
-function PipelineBareFunction(node) {
- this.print(node.callee, node);
-}
-
-function PipelinePrimaryTopicReference() {
- this.token("#");
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js
deleted file mode 100644
index 0355057de93..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/generators/typescript.js
+++ /dev/null
@@ -1,715 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.TSTypeAnnotation = TSTypeAnnotation;
-exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
-exports.TSTypeParameter = TSTypeParameter;
-exports.TSParameterProperty = TSParameterProperty;
-exports.TSDeclareFunction = TSDeclareFunction;
-exports.TSDeclareMethod = TSDeclareMethod;
-exports.TSQualifiedName = TSQualifiedName;
-exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
-exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
-exports.TSPropertySignature = TSPropertySignature;
-exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
-exports.TSMethodSignature = TSMethodSignature;
-exports.TSIndexSignature = TSIndexSignature;
-exports.TSAnyKeyword = TSAnyKeyword;
-exports.TSUnknownKeyword = TSUnknownKeyword;
-exports.TSNumberKeyword = TSNumberKeyword;
-exports.TSObjectKeyword = TSObjectKeyword;
-exports.TSBooleanKeyword = TSBooleanKeyword;
-exports.TSStringKeyword = TSStringKeyword;
-exports.TSSymbolKeyword = TSSymbolKeyword;
-exports.TSVoidKeyword = TSVoidKeyword;
-exports.TSUndefinedKeyword = TSUndefinedKeyword;
-exports.TSNullKeyword = TSNullKeyword;
-exports.TSNeverKeyword = TSNeverKeyword;
-exports.TSThisType = TSThisType;
-exports.TSFunctionType = TSFunctionType;
-exports.TSConstructorType = TSConstructorType;
-exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
-exports.TSTypeReference = TSTypeReference;
-exports.TSTypePredicate = TSTypePredicate;
-exports.TSTypeQuery = TSTypeQuery;
-exports.TSTypeLiteral = TSTypeLiteral;
-exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
-exports.tsPrintBraced = tsPrintBraced;
-exports.TSArrayType = TSArrayType;
-exports.TSTupleType = TSTupleType;
-exports.TSOptionalType = TSOptionalType;
-exports.TSRestType = TSRestType;
-exports.TSUnionType = TSUnionType;
-exports.TSIntersectionType = TSIntersectionType;
-exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
-exports.TSConditionalType = TSConditionalType;
-exports.TSInferType = TSInferType;
-exports.TSParenthesizedType = TSParenthesizedType;
-exports.TSTypeOperator = TSTypeOperator;
-exports.TSIndexedAccessType = TSIndexedAccessType;
-exports.TSMappedType = TSMappedType;
-exports.TSLiteralType = TSLiteralType;
-exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
-exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
-exports.TSInterfaceBody = TSInterfaceBody;
-exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
-exports.TSAsExpression = TSAsExpression;
-exports.TSTypeAssertion = TSTypeAssertion;
-exports.TSEnumDeclaration = TSEnumDeclaration;
-exports.TSEnumMember = TSEnumMember;
-exports.TSModuleDeclaration = TSModuleDeclaration;
-exports.TSModuleBlock = TSModuleBlock;
-exports.TSImportType = TSImportType;
-exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
-exports.TSExternalModuleReference = TSExternalModuleReference;
-exports.TSNonNullExpression = TSNonNullExpression;
-exports.TSExportAssignment = TSExportAssignment;
-exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
-exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
-
-function TSTypeAnnotation(node) {
- this.token(":");
- this.space();
- if (node.optional) this.token("?");
- this.print(node.typeAnnotation, node);
-}
-
-function TSTypeParameterInstantiation(node) {
- this.token("<");
- this.printList(node.params, node, {});
- this.token(">");
-}
-
-function TSTypeParameter(node) {
- this.word(node.name);
-
- if (node.constraint) {
- this.space();
- this.word("extends");
- this.space();
- this.print(node.constraint, node);
- }
-
- if (node.default) {
- this.space();
- this.token("=");
- this.space();
- this.print(node.default, node);
- }
-}
-
-function TSParameterProperty(node) {
- if (node.accessibility) {
- this.word(node.accessibility);
- this.space();
- }
-
- if (node.readonly) {
- this.word("readonly");
- this.space();
- }
-
- this._param(node.parameter);
-}
-
-function TSDeclareFunction(node) {
- if (node.declare) {
- this.word("declare");
- this.space();
- }
-
- this._functionHead(node);
-
- this.token(";");
-}
-
-function TSDeclareMethod(node) {
- this._classMethodHead(node);
-
- this.token(";");
-}
-
-function TSQualifiedName(node) {
- this.print(node.left, node);
- this.token(".");
- this.print(node.right, node);
-}
-
-function TSCallSignatureDeclaration(node) {
- this.tsPrintSignatureDeclarationBase(node);
-}
-
-function TSConstructSignatureDeclaration(node) {
- this.word("new");
- this.space();
- this.tsPrintSignatureDeclarationBase(node);
-}
-
-function TSPropertySignature(node) {
- const {
- readonly,
- initializer
- } = node;
-
- if (readonly) {
- this.word("readonly");
- this.space();
- }
-
- this.tsPrintPropertyOrMethodName(node);
- this.print(node.typeAnnotation, node);
-
- if (initializer) {
- this.space();
- this.token("=");
- this.space();
- this.print(initializer, node);
- }
-
- this.token(";");
-}
-
-function tsPrintPropertyOrMethodName(node) {
- if (node.computed) {
- this.token("[");
- }
-
- this.print(node.key, node);
-
- if (node.computed) {
- this.token("]");
- }
-
- if (node.optional) {
- this.token("?");
- }
-}
-
-function TSMethodSignature(node) {
- this.tsPrintPropertyOrMethodName(node);
- this.tsPrintSignatureDeclarationBase(node);
- this.token(";");
-}
-
-function TSIndexSignature(node) {
- const {
- readonly
- } = node;
-
- if (readonly) {
- this.word("readonly");
- this.space();
- }
-
- this.token("[");
-
- this._parameters(node.parameters, node);
-
- this.token("]");
- this.print(node.typeAnnotation, node);
- this.token(";");
-}
-
-function TSAnyKeyword() {
- this.word("any");
-}
-
-function TSUnknownKeyword() {
- this.word("unknown");
-}
-
-function TSNumberKeyword() {
- this.word("number");
-}
-
-function TSObjectKeyword() {
- this.word("object");
-}
-
-function TSBooleanKeyword() {
- this.word("boolean");
-}
-
-function TSStringKeyword() {
- this.word("string");
-}
-
-function TSSymbolKeyword() {
- this.word("symbol");
-}
-
-function TSVoidKeyword() {
- this.word("void");
-}
-
-function TSUndefinedKeyword() {
- this.word("undefined");
-}
-
-function TSNullKeyword() {
- this.word("null");
-}
-
-function TSNeverKeyword() {
- this.word("never");
-}
-
-function TSThisType() {
- this.word("this");
-}
-
-function TSFunctionType(node) {
- this.tsPrintFunctionOrConstructorType(node);
-}
-
-function TSConstructorType(node) {
- this.word("new");
- this.space();
- this.tsPrintFunctionOrConstructorType(node);
-}
-
-function tsPrintFunctionOrConstructorType(node) {
- const {
- typeParameters,
- parameters
- } = node;
- this.print(typeParameters, node);
- this.token("(");
-
- this._parameters(parameters, node);
-
- this.token(")");
- this.space();
- this.token("=>");
- this.space();
- this.print(node.typeAnnotation.typeAnnotation, node);
-}
-
-function TSTypeReference(node) {
- this.print(node.typeName, node);
- this.print(node.typeParameters, node);
-}
-
-function TSTypePredicate(node) {
- this.print(node.parameterName);
- this.space();
- this.word("is");
- this.space();
- this.print(node.typeAnnotation.typeAnnotation);
-}
-
-function TSTypeQuery(node) {
- this.word("typeof");
- this.space();
- this.print(node.exprName);
-}
-
-function TSTypeLiteral(node) {
- this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
-}
-
-function tsPrintTypeLiteralOrInterfaceBody(members, node) {
- this.tsPrintBraced(members, node);
-}
-
-function tsPrintBraced(members, node) {
- this.token("{");
-
- if (members.length) {
- this.indent();
- this.newline();
-
- for (const member of members) {
- this.print(member, node);
- this.newline();
- }
-
- this.dedent();
- this.rightBrace();
- } else {
- this.token("}");
- }
-}
-
-function TSArrayType(node) {
- this.print(node.elementType, node);
- this.token("[]");
-}
-
-function TSTupleType(node) {
- this.token("[");
- this.printList(node.elementTypes, node);
- this.token("]");
-}
-
-function TSOptionalType(node) {
- this.print(node.typeAnnotation, node);
- this.token("?");
-}
-
-function TSRestType(node) {
- this.token("...");
- this.print(node.typeAnnotation, node);
-}
-
-function TSUnionType(node) {
- this.tsPrintUnionOrIntersectionType(node, "|");
-}
-
-function TSIntersectionType(node) {
- this.tsPrintUnionOrIntersectionType(node, "&");
-}
-
-function tsPrintUnionOrIntersectionType(node, sep) {
- this.printJoin(node.types, node, {
- separator() {
- this.space();
- this.token(sep);
- this.space();
- }
-
- });
-}
-
-function TSConditionalType(node) {
- this.print(node.checkType);
- this.space();
- this.word("extends");
- this.space();
- this.print(node.extendsType);
- this.space();
- this.token("?");
- this.space();
- this.print(node.trueType);
- this.space();
- this.token(":");
- this.space();
- this.print(node.falseType);
-}
-
-function TSInferType(node) {
- this.token("infer");
- this.space();
- this.print(node.typeParameter);
-}
-
-function TSParenthesizedType(node) {
- this.token("(");
- this.print(node.typeAnnotation, node);
- this.token(")");
-}
-
-function TSTypeOperator(node) {
- this.token(node.operator);
- this.space();
- this.print(node.typeAnnotation, node);
-}
-
-function TSIndexedAccessType(node) {
- this.print(node.objectType, node);
- this.token("[");
- this.print(node.indexType, node);
- this.token("]");
-}
-
-function TSMappedType(node) {
- const {
- readonly,
- typeParameter,
- optional
- } = node;
- this.token("{");
- this.space();
-
- if (readonly) {
- tokenIfPlusMinus(this, readonly);
- this.word("readonly");
- this.space();
- }
-
- this.token("[");
- this.word(typeParameter.name);
- this.space();
- this.word("in");
- this.space();
- this.print(typeParameter.constraint, typeParameter);
- this.token("]");
-
- if (optional) {
- tokenIfPlusMinus(this, optional);
- this.token("?");
- }
-
- this.token(":");
- this.space();
- this.print(node.typeAnnotation, node);
- this.space();
- this.token("}");
-}
-
-function tokenIfPlusMinus(self, tok) {
- if (tok !== true) {
- self.token(tok);
- }
-}
-
-function TSLiteralType(node) {
- this.print(node.literal, node);
-}
-
-function TSExpressionWithTypeArguments(node) {
- this.print(node.expression, node);
- this.print(node.typeParameters, node);
-}
-
-function TSInterfaceDeclaration(node) {
- const {
- declare,
- id,
- typeParameters,
- extends: extendz,
- body
- } = node;
-
- if (declare) {
- this.word("declare");
- this.space();
- }
-
- this.word("interface");
- this.space();
- this.print(id, node);
- this.print(typeParameters, node);
-
- if (extendz) {
- this.space();
- this.word("extends");
- this.space();
- this.printList(extendz, node);
- }
-
- this.space();
- this.print(body, node);
-}
-
-function TSInterfaceBody(node) {
- this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
-}
-
-function TSTypeAliasDeclaration(node) {
- const {
- declare,
- id,
- typeParameters,
- typeAnnotation
- } = node;
-
- if (declare) {
- this.word("declare");
- this.space();
- }
-
- this.word("type");
- this.space();
- this.print(id, node);
- this.print(typeParameters, node);
- this.space();
- this.token("=");
- this.space();
- this.print(typeAnnotation, node);
- this.token(";");
-}
-
-function TSAsExpression(node) {
- const {
- expression,
- typeAnnotation
- } = node;
- this.print(expression, node);
- this.space();
- this.word("as");
- this.space();
- this.print(typeAnnotation, node);
-}
-
-function TSTypeAssertion(node) {
- const {
- typeAnnotation,
- expression
- } = node;
- this.token("<");
- this.print(typeAnnotation, node);
- this.token(">");
- this.space();
- this.print(expression, node);
-}
-
-function TSEnumDeclaration(node) {
- const {
- declare,
- const: isConst,
- id,
- members
- } = node;
-
- if (declare) {
- this.word("declare");
- this.space();
- }
-
- if (isConst) {
- this.word("const");
- this.space();
- }
-
- this.word("enum");
- this.space();
- this.print(id, node);
- this.space();
- this.tsPrintBraced(members, node);
-}
-
-function TSEnumMember(node) {
- const {
- id,
- initializer
- } = node;
- this.print(id, node);
-
- if (initializer) {
- this.space();
- this.token("=");
- this.space();
- this.print(initializer, node);
- }
-
- this.token(",");
-}
-
-function TSModuleDeclaration(node) {
- const {
- declare,
- id
- } = node;
-
- if (declare) {
- this.word("declare");
- this.space();
- }
-
- if (!node.global) {
- this.word(id.type === "Identifier" ? "namespace" : "module");
- this.space();
- }
-
- this.print(id, node);
-
- if (!node.body) {
- this.token(";");
- return;
- }
-
- let body = node.body;
-
- while (body.type === "TSModuleDeclaration") {
- this.token(".");
- this.print(body.id, body);
- body = body.body;
- }
-
- this.space();
- this.print(body, node);
-}
-
-function TSModuleBlock(node) {
- this.tsPrintBraced(node.body, node);
-}
-
-function TSImportType(node) {
- const {
- argument,
- qualifier,
- typeParameters
- } = node;
- this.word("import");
- this.token("(");
- this.print(argument, node);
- this.token(")");
-
- if (qualifier) {
- this.token(".");
- this.print(qualifier, node);
- }
-
- if (typeParameters) {
- this.print(typeParameters, node);
- }
-}
-
-function TSImportEqualsDeclaration(node) {
- const {
- isExport,
- id,
- moduleReference
- } = node;
-
- if (isExport) {
- this.word("export");
- this.space();
- }
-
- this.word("import");
- this.space();
- this.print(id, node);
- this.space();
- this.token("=");
- this.space();
- this.print(moduleReference, node);
- this.token(";");
-}
-
-function TSExternalModuleReference(node) {
- this.token("require(");
- this.print(node.expression, node);
- this.token(")");
-}
-
-function TSNonNullExpression(node) {
- this.print(node.expression, node);
- this.token("!");
-}
-
-function TSExportAssignment(node) {
- this.word("export");
- this.space();
- this.token("=");
- this.space();
- this.print(node.expression, node);
- this.token(";");
-}
-
-function TSNamespaceExportDeclaration(node) {
- this.word("export");
- this.space();
- this.word("as");
- this.space();
- this.word("namespace");
- this.space();
- this.print(node.id, node);
-}
-
-function tsPrintSignatureDeclarationBase(node) {
- const {
- typeParameters,
- parameters
- } = node;
- this.print(typeParameters, node);
- this.token("(");
-
- this._parameters(parameters, node);
-
- this.token(")");
- this.print(node.typeAnnotation, node);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js
deleted file mode 100644
index fcdb288b7f2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/index.js
+++ /dev/null
@@ -1,92 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = _default;
-exports.CodeGenerator = void 0;
-
-var _sourceMap = _interopRequireDefault(require("./source-map"));
-
-var _printer = _interopRequireDefault(require("./printer"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-class Generator extends _printer.default {
- constructor(ast, opts = {}, code) {
- const format = normalizeOptions(code, opts);
- const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
- super(format, map);
- this.ast = ast;
- }
-
- generate() {
- return super.generate(this.ast);
- }
-
-}
-
-function normalizeOptions(code, opts) {
- const format = {
- auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
- auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
- shouldPrintComment: opts.shouldPrintComment,
- retainLines: opts.retainLines,
- retainFunctionParens: opts.retainFunctionParens,
- comments: opts.comments == null || opts.comments,
- compact: opts.compact,
- minified: opts.minified,
- concise: opts.concise,
- jsonCompatibleStrings: opts.jsonCompatibleStrings,
- indent: {
- adjustMultilineComment: true,
- style: " ",
- base: 0
- },
- decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
- jsescOption: Object.assign({
- quotes: "double",
- wrap: true
- }, opts.jsescOption)
- };
-
- if (format.minified) {
- format.compact = true;
-
- format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
- } else {
- format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
- }
-
- if (format.compact === "auto") {
- format.compact = code.length > 500000;
-
- if (format.compact) {
- console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`);
- }
- }
-
- if (format.compact) {
- format.indent.adjustMultilineComment = false;
- }
-
- return format;
-}
-
-class CodeGenerator {
- constructor(ast, opts, code) {
- this._generator = new Generator(ast, opts, code);
- }
-
- generate() {
- return this._generator.generate();
- }
-
-}
-
-exports.CodeGenerator = CodeGenerator;
-
-function _default(ast, opts, code) {
- const gen = new Generator(ast, opts, code);
- return gen.generate();
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js
deleted file mode 100644
index bef46f0eede..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/index.js
+++ /dev/null
@@ -1,117 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.needsWhitespace = needsWhitespace;
-exports.needsWhitespaceBefore = needsWhitespaceBefore;
-exports.needsWhitespaceAfter = needsWhitespaceAfter;
-exports.needsParens = needsParens;
-
-var whitespace = _interopRequireWildcard(require("./whitespace"));
-
-var parens = _interopRequireWildcard(require("./parentheses"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function expandAliases(obj) {
- const newObj = {};
-
- function add(type, func) {
- const fn = newObj[type];
- newObj[type] = fn ? function (node, parent, stack) {
- const result = fn(node, parent, stack);
- return result == null ? func(node, parent, stack) : result;
- } : func;
- }
-
- for (const type of Object.keys(obj)) {
- const aliases = t().FLIPPED_ALIAS_KEYS[type];
-
- if (aliases) {
- for (const alias of aliases) {
- add(alias, obj[type]);
- }
- } else {
- add(type, obj[type]);
- }
- }
-
- return newObj;
-}
-
-const expandedParens = expandAliases(parens);
-const expandedWhitespaceNodes = expandAliases(whitespace.nodes);
-const expandedWhitespaceList = expandAliases(whitespace.list);
-
-function find(obj, node, parent, printStack) {
- const fn = obj[node.type];
- return fn ? fn(node, parent, printStack) : null;
-}
-
-function isOrHasCallExpression(node) {
- if (t().isCallExpression(node)) {
- return true;
- }
-
- if (t().isMemberExpression(node)) {
- return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);
- } else {
- return false;
- }
-}
-
-function needsWhitespace(node, parent, type) {
- if (!node) return 0;
-
- if (t().isExpressionStatement(node)) {
- node = node.expression;
- }
-
- let linesInfo = find(expandedWhitespaceNodes, node, parent);
-
- if (!linesInfo) {
- const items = find(expandedWhitespaceList, node, parent);
-
- if (items) {
- for (let i = 0; i < items.length; i++) {
- linesInfo = needsWhitespace(items[i], node, type);
- if (linesInfo) break;
- }
- }
- }
-
- if (typeof linesInfo === "object" && linesInfo !== null) {
- return linesInfo[type] || 0;
- }
-
- return 0;
-}
-
-function needsWhitespaceBefore(node, parent) {
- return needsWhitespace(node, parent, "before");
-}
-
-function needsWhitespaceAfter(node, parent) {
- return needsWhitespace(node, parent, "after");
-}
-
-function needsParens(node, parent, printStack) {
- if (!parent) return false;
-
- if (t().isNewExpression(parent) && parent.callee === node) {
- if (isOrHasCallExpression(node)) return true;
- }
-
- return find(expandedParens, node, parent, printStack);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js
deleted file mode 100644
index 3f98dc18f8e..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/parentheses.js
+++ /dev/null
@@ -1,253 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.NullableTypeAnnotation = NullableTypeAnnotation;
-exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
-exports.UpdateExpression = UpdateExpression;
-exports.ObjectExpression = ObjectExpression;
-exports.DoExpression = DoExpression;
-exports.Binary = Binary;
-exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
-exports.TSAsExpression = TSAsExpression;
-exports.TSTypeAssertion = TSTypeAssertion;
-exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
-exports.BinaryExpression = BinaryExpression;
-exports.SequenceExpression = SequenceExpression;
-exports.AwaitExpression = exports.YieldExpression = YieldExpression;
-exports.ClassExpression = ClassExpression;
-exports.UnaryLike = UnaryLike;
-exports.FunctionExpression = FunctionExpression;
-exports.ArrowFunctionExpression = ArrowFunctionExpression;
-exports.ConditionalExpression = ConditionalExpression;
-exports.OptionalMemberExpression = OptionalMemberExpression;
-exports.AssignmentExpression = AssignmentExpression;
-exports.NewExpression = NewExpression;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const PRECEDENCE = {
- "||": 0,
- "&&": 1,
- "|": 2,
- "^": 3,
- "&": 4,
- "==": 5,
- "===": 5,
- "!=": 5,
- "!==": 5,
- "<": 6,
- ">": 6,
- "<=": 6,
- ">=": 6,
- in: 6,
- instanceof: 6,
- ">>": 7,
- "<<": 7,
- ">>>": 7,
- "+": 8,
- "-": 8,
- "*": 9,
- "/": 9,
- "%": 9,
- "**": 10
-};
-
-const isClassExtendsClause = (node, parent) => (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node;
-
-function NullableTypeAnnotation(node, parent) {
- return t().isArrayTypeAnnotation(parent);
-}
-
-function FunctionTypeAnnotation(node, parent) {
- return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent);
-}
-
-function UpdateExpression(node, parent) {
- return t().isMemberExpression(parent, {
- object: node
- }) || t().isCallExpression(parent, {
- callee: node
- }) || t().isNewExpression(parent, {
- callee: node
- }) || isClassExtendsClause(node, parent);
-}
-
-function ObjectExpression(node, parent, printStack) {
- return isFirstInStatement(printStack, {
- considerArrow: true
- });
-}
-
-function DoExpression(node, parent, printStack) {
- return isFirstInStatement(printStack);
-}
-
-function Binary(node, parent) {
- if (node.operator === "**" && t().isBinaryExpression(parent, {
- operator: "**"
- })) {
- return parent.left === node;
- }
-
- if (isClassExtendsClause(node, parent)) {
- return true;
- }
-
- if ((t().isCallExpression(parent) || t().isNewExpression(parent)) && parent.callee === node || t().isUnaryLike(parent) || t().isMemberExpression(parent) && parent.object === node || t().isAwaitExpression(parent)) {
- return true;
- }
-
- if (t().isBinary(parent)) {
- const parentOp = parent.operator;
- const parentPos = PRECEDENCE[parentOp];
- const nodeOp = node.operator;
- const nodePos = PRECEDENCE[nodeOp];
-
- if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) {
- return true;
- }
- }
-
- return false;
-}
-
-function UnionTypeAnnotation(node, parent) {
- return t().isArrayTypeAnnotation(parent) || t().isNullableTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isUnionTypeAnnotation(parent);
-}
-
-function TSAsExpression() {
- return true;
-}
-
-function TSTypeAssertion() {
- return true;
-}
-
-function TSUnionType(node, parent) {
- return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent);
-}
-
-function BinaryExpression(node, parent) {
- return node.operator === "in" && (t().isVariableDeclarator(parent) || t().isFor(parent));
-}
-
-function SequenceExpression(node, parent) {
- if (t().isForStatement(parent) || t().isThrowStatement(parent) || t().isReturnStatement(parent) || t().isIfStatement(parent) && parent.test === node || t().isWhileStatement(parent) && parent.test === node || t().isForInStatement(parent) && parent.right === node || t().isSwitchStatement(parent) && parent.discriminant === node || t().isExpressionStatement(parent) && parent.expression === node) {
- return false;
- }
-
- return true;
-}
-
-function YieldExpression(node, parent) {
- return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
-}
-
-function ClassExpression(node, parent, printStack) {
- return isFirstInStatement(printStack, {
- considerDefaultExports: true
- });
-}
-
-function UnaryLike(node, parent) {
- return t().isMemberExpression(parent, {
- object: node
- }) || t().isCallExpression(parent, {
- callee: node
- }) || t().isNewExpression(parent, {
- callee: node
- }) || t().isBinaryExpression(parent, {
- operator: "**",
- left: node
- }) || isClassExtendsClause(node, parent);
-}
-
-function FunctionExpression(node, parent, printStack) {
- return isFirstInStatement(printStack, {
- considerDefaultExports: true
- });
-}
-
-function ArrowFunctionExpression(node, parent) {
- return t().isExportDeclaration(parent) || ConditionalExpression(node, parent);
-}
-
-function ConditionalExpression(node, parent) {
- if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, {
- test: node
- }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) {
- return true;
- }
-
- return UnaryLike(node, parent);
-}
-
-function OptionalMemberExpression(node, parent) {
- return t().isCallExpression(parent) || t().isMemberExpression(parent);
-}
-
-function AssignmentExpression(node) {
- if (t().isObjectPattern(node.left)) {
- return true;
- } else {
- return ConditionalExpression(...arguments);
- }
-}
-
-function NewExpression(node, parent) {
- return isClassExtendsClause(node, parent);
-}
-
-function isFirstInStatement(printStack, {
- considerArrow = false,
- considerDefaultExports = false
-} = {}) {
- let i = printStack.length - 1;
- let node = printStack[i];
- i--;
- let parent = printStack[i];
-
- while (i > 0) {
- if (t().isExpressionStatement(parent, {
- expression: node
- }) || t().isTaggedTemplateExpression(parent) || considerDefaultExports && t().isExportDefaultDeclaration(parent, {
- declaration: node
- }) || considerArrow && t().isArrowFunctionExpression(parent, {
- body: node
- })) {
- return true;
- }
-
- if (t().isCallExpression(parent, {
- callee: node
- }) || t().isSequenceExpression(parent) && parent.expressions[0] === node || t().isMemberExpression(parent, {
- object: node
- }) || t().isConditional(parent, {
- test: node
- }) || t().isBinary(parent, {
- left: node
- }) || t().isAssignmentExpression(parent, {
- left: node
- })) {
- node = parent;
- i--;
- parent = printStack[i];
- } else {
- return false;
- }
- }
-
- return false;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js
deleted file mode 100644
index 061218601cb..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/node/whitespace.js
+++ /dev/null
@@ -1,192 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.list = exports.nodes = void 0;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function crawl(node, state = {}) {
- if (t().isMemberExpression(node)) {
- crawl(node.object, state);
- if (node.computed) crawl(node.property, state);
- } else if (t().isBinary(node) || t().isAssignmentExpression(node)) {
- crawl(node.left, state);
- crawl(node.right, state);
- } else if (t().isCallExpression(node)) {
- state.hasCall = true;
- crawl(node.callee, state);
- } else if (t().isFunction(node)) {
- state.hasFunction = true;
- } else if (t().isIdentifier(node)) {
- state.hasHelper = state.hasHelper || isHelper(node.callee);
- }
-
- return state;
-}
-
-function isHelper(node) {
- if (t().isMemberExpression(node)) {
- return isHelper(node.object) || isHelper(node.property);
- } else if (t().isIdentifier(node)) {
- return node.name === "require" || node.name[0] === "_";
- } else if (t().isCallExpression(node)) {
- return isHelper(node.callee);
- } else if (t().isBinary(node) || t().isAssignmentExpression(node)) {
- return t().isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
- } else {
- return false;
- }
-}
-
-function isType(node) {
- return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node);
-}
-
-const nodes = {
- AssignmentExpression(node) {
- const state = crawl(node.right);
-
- if (state.hasCall && state.hasHelper || state.hasFunction) {
- return {
- before: state.hasFunction,
- after: true
- };
- }
- },
-
- SwitchCase(node, parent) {
- return {
- before: node.consequent.length || parent.cases[0] === node,
- after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
- };
- },
-
- LogicalExpression(node) {
- if (t().isFunction(node.left) || t().isFunction(node.right)) {
- return {
- after: true
- };
- }
- },
-
- Literal(node) {
- if (node.value === "use strict") {
- return {
- after: true
- };
- }
- },
-
- CallExpression(node) {
- if (t().isFunction(node.callee) || isHelper(node)) {
- return {
- before: true,
- after: true
- };
- }
- },
-
- VariableDeclaration(node) {
- for (let i = 0; i < node.declarations.length; i++) {
- const declar = node.declarations[i];
- let enabled = isHelper(declar.id) && !isType(declar.init);
-
- if (!enabled) {
- const state = crawl(declar.init);
- enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
- }
-
- if (enabled) {
- return {
- before: true,
- after: true
- };
- }
- }
- },
-
- IfStatement(node) {
- if (t().isBlockStatement(node.consequent)) {
- return {
- before: true,
- after: true
- };
- }
- }
-
-};
-exports.nodes = nodes;
-
-nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
- if (parent.properties[0] === node) {
- return {
- before: true
- };
- }
-};
-
-nodes.ObjectTypeCallProperty = function (node, parent) {
- if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) {
- return {
- before: true
- };
- }
-};
-
-nodes.ObjectTypeIndexer = function (node, parent) {
- if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) {
- return {
- before: true
- };
- }
-};
-
-nodes.ObjectTypeInternalSlot = function (node, parent) {
- if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) {
- return {
- before: true
- };
- }
-};
-
-const list = {
- VariableDeclaration(node) {
- return node.declarations.map(decl => decl.init);
- },
-
- ArrayExpression(node) {
- return node.elements;
- },
-
- ObjectExpression(node) {
- return node.properties;
- }
-
-};
-exports.list = list;
-[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) {
- if (typeof amounts === "boolean") {
- amounts = {
- after: amounts,
- before: amounts
- };
- }
-
- [type].concat(t().FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
- nodes[type] = function () {
- return amounts;
- };
- });
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js
deleted file mode 100644
index 9458169f23a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/printer.js
+++ /dev/null
@@ -1,501 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-function _isInteger() {
- const data = _interopRequireDefault(require("lodash/isInteger"));
-
- _isInteger = function () {
- return data;
- };
-
- return data;
-}
-
-function _repeat() {
- const data = _interopRequireDefault(require("lodash/repeat"));
-
- _repeat = function () {
- return data;
- };
-
- return data;
-}
-
-var _buffer = _interopRequireDefault(require("./buffer"));
-
-var n = _interopRequireWildcard(require("./node"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var generatorFunctions = _interopRequireWildcard(require("./generators"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const SCIENTIFIC_NOTATION = /e/i;
-const ZERO_DECIMAL_INTEGER = /\.0+$/;
-const NON_DECIMAL_LITERAL = /^0[box]/;
-
-class Printer {
- constructor(format, map) {
- this.inForStatementInitCounter = 0;
- this._printStack = [];
- this._indent = 0;
- this._insideAux = false;
- this._printedCommentStarts = {};
- this._parenPushNewlineState = null;
- this._noLineTerminator = false;
- this._printAuxAfterOnNextUserNode = false;
- this._printedComments = new WeakSet();
- this._endsWithInteger = false;
- this._endsWithWord = false;
- this.format = format || {};
- this._buf = new _buffer.default(map);
- }
-
- generate(ast) {
- this.print(ast);
-
- this._maybeAddAuxComment();
-
- return this._buf.get();
- }
-
- indent() {
- if (this.format.compact || this.format.concise) return;
- this._indent++;
- }
-
- dedent() {
- if (this.format.compact || this.format.concise) return;
- this._indent--;
- }
-
- semicolon(force = false) {
- this._maybeAddAuxComment();
-
- this._append(";", !force);
- }
-
- rightBrace() {
- if (this.format.minified) {
- this._buf.removeLastSemicolon();
- }
-
- this.token("}");
- }
-
- space(force = false) {
- if (this.format.compact) return;
-
- if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
- this._space();
- }
- }
-
- word(str) {
- if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
- this._space();
- }
-
- this._maybeAddAuxComment();
-
- this._append(str);
-
- this._endsWithWord = true;
- }
-
- number(str) {
- this.word(str);
- this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
- }
-
- token(str) {
- if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
- this._space();
- }
-
- this._maybeAddAuxComment();
-
- this._append(str);
- }
-
- newline(i) {
- if (this.format.retainLines || this.format.compact) return;
-
- if (this.format.concise) {
- this.space();
- return;
- }
-
- if (this.endsWith("\n\n")) return;
- if (typeof i !== "number") i = 1;
- i = Math.min(2, i);
- if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
- if (i <= 0) return;
-
- for (let j = 0; j < i; j++) {
- this._newline();
- }
- }
-
- endsWith(str) {
- return this._buf.endsWith(str);
- }
-
- removeTrailingNewline() {
- this._buf.removeTrailingNewline();
- }
-
- exactSource(loc, cb) {
- this._catchUp("start", loc);
-
- this._buf.exactSource(loc, cb);
- }
-
- source(prop, loc) {
- this._catchUp(prop, loc);
-
- this._buf.source(prop, loc);
- }
-
- withSource(prop, loc, cb) {
- this._catchUp(prop, loc);
-
- this._buf.withSource(prop, loc, cb);
- }
-
- _space() {
- this._append(" ", true);
- }
-
- _newline() {
- this._append("\n", true);
- }
-
- _append(str, queue = false) {
- this._maybeAddParen(str);
-
- this._maybeIndent(str);
-
- if (queue) this._buf.queue(str);else this._buf.append(str);
- this._endsWithWord = false;
- this._endsWithInteger = false;
- }
-
- _maybeIndent(str) {
- if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
- this._buf.queue(this._getIndent());
- }
- }
-
- _maybeAddParen(str) {
- const parenPushNewlineState = this._parenPushNewlineState;
- if (!parenPushNewlineState) return;
- this._parenPushNewlineState = null;
- let i;
-
- for (i = 0; i < str.length && str[i] === " "; i++) continue;
-
- if (i === str.length) return;
- const cha = str[i];
-
- if (cha !== "\n") {
- if (cha !== "/") return;
- if (i + 1 === str.length) return;
- const chaPost = str[i + 1];
- if (chaPost !== "/" && chaPost !== "*") return;
- }
-
- this.token("(");
- this.indent();
- parenPushNewlineState.printed = true;
- }
-
- _catchUp(prop, loc) {
- if (!this.format.retainLines) return;
- const pos = loc ? loc[prop] : null;
-
- if (pos && pos.line !== null) {
- const count = pos.line - this._buf.getCurrentLine();
-
- for (let i = 0; i < count; i++) {
- this._newline();
- }
- }
- }
-
- _getIndent() {
- return (0, _repeat().default)(this.format.indent.style, this._indent);
- }
-
- startTerminatorless(isLabel = false) {
- if (isLabel) {
- this._noLineTerminator = true;
- return null;
- } else {
- return this._parenPushNewlineState = {
- printed: false
- };
- }
- }
-
- endTerminatorless(state) {
- this._noLineTerminator = false;
-
- if (state && state.printed) {
- this.dedent();
- this.newline();
- this.token(")");
- }
- }
-
- print(node, parent) {
- if (!node) return;
- const oldConcise = this.format.concise;
-
- if (node._compact) {
- this.format.concise = true;
- }
-
- const printMethod = this[node.type];
-
- if (!printMethod) {
- throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node && node.constructor.name)}`);
- }
-
- this._printStack.push(node);
-
- const oldInAux = this._insideAux;
- this._insideAux = !node.loc;
-
- this._maybeAddAuxComment(this._insideAux && !oldInAux);
-
- let needsParens = n.needsParens(node, parent, this._printStack);
-
- if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
- needsParens = true;
- }
-
- if (needsParens) this.token("(");
-
- this._printLeadingComments(node);
-
- const loc = t().isProgram(node) || t().isFile(node) ? null : node.loc;
- this.withSource("start", loc, () => {
- printMethod.call(this, node, parent);
- });
-
- this._printTrailingComments(node);
-
- if (needsParens) this.token(")");
-
- this._printStack.pop();
-
- this.format.concise = oldConcise;
- this._insideAux = oldInAux;
- }
-
- _maybeAddAuxComment(enteredPositionlessNode) {
- if (enteredPositionlessNode) this._printAuxBeforeComment();
- if (!this._insideAux) this._printAuxAfterComment();
- }
-
- _printAuxBeforeComment() {
- if (this._printAuxAfterOnNextUserNode) return;
- this._printAuxAfterOnNextUserNode = true;
- const comment = this.format.auxiliaryCommentBefore;
-
- if (comment) {
- this._printComment({
- type: "CommentBlock",
- value: comment
- });
- }
- }
-
- _printAuxAfterComment() {
- if (!this._printAuxAfterOnNextUserNode) return;
- this._printAuxAfterOnNextUserNode = false;
- const comment = this.format.auxiliaryCommentAfter;
-
- if (comment) {
- this._printComment({
- type: "CommentBlock",
- value: comment
- });
- }
- }
-
- getPossibleRaw(node) {
- const extra = node.extra;
-
- if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
- return extra.raw;
- }
- }
-
- printJoin(nodes, parent, opts = {}) {
- if (!nodes || !nodes.length) return;
- if (opts.indent) this.indent();
- const newlineOpts = {
- addNewlines: opts.addNewlines
- };
-
- for (let i = 0; i < nodes.length; i++) {
- const node = nodes[i];
- if (!node) continue;
- if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
- this.print(node, parent);
-
- if (opts.iterator) {
- opts.iterator(node, i);
- }
-
- if (opts.separator && i < nodes.length - 1) {
- opts.separator.call(this);
- }
-
- if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
- }
-
- if (opts.indent) this.dedent();
- }
-
- printAndIndentOnComments(node, parent) {
- const indent = node.leadingComments && node.leadingComments.length > 0;
- if (indent) this.indent();
- this.print(node, parent);
- if (indent) this.dedent();
- }
-
- printBlock(parent) {
- const node = parent.body;
-
- if (!t().isEmptyStatement(node)) {
- this.space();
- }
-
- this.print(node, parent);
- }
-
- _printTrailingComments(node) {
- this._printComments(this._getComments(false, node));
- }
-
- _printLeadingComments(node) {
- this._printComments(this._getComments(true, node));
- }
-
- printInnerComments(node, indent = true) {
- if (!node.innerComments || !node.innerComments.length) return;
- if (indent) this.indent();
-
- this._printComments(node.innerComments);
-
- if (indent) this.dedent();
- }
-
- printSequence(nodes, parent, opts = {}) {
- opts.statement = true;
- return this.printJoin(nodes, parent, opts);
- }
-
- printList(items, parent, opts = {}) {
- if (opts.separator == null) {
- opts.separator = commaSeparator;
- }
-
- return this.printJoin(items, parent, opts);
- }
-
- _printNewline(leading, node, parent, opts) {
- if (this.format.retainLines || this.format.compact) return;
-
- if (this.format.concise) {
- this.space();
- return;
- }
-
- let lines = 0;
-
- if (this._buf.hasContent()) {
- if (!leading) lines++;
- if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
- const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;
- if (needs(node, parent)) lines++;
- }
-
- this.newline(lines);
- }
-
- _getComments(leading, node) {
- return node && (leading ? node.leadingComments : node.trailingComments) || [];
- }
-
- _printComment(comment) {
- if (!this.format.shouldPrintComment(comment.value)) return;
- if (comment.ignore) return;
- if (this._printedComments.has(comment)) return;
-
- this._printedComments.add(comment);
-
- if (comment.start != null) {
- if (this._printedCommentStarts[comment.start]) return;
- this._printedCommentStarts[comment.start] = true;
- }
-
- const isBlockComment = comment.type === "CommentBlock";
- this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0);
- if (!this.endsWith("[") && !this.endsWith("{")) this.space();
- let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`;
-
- if (isBlockComment && this.format.indent.adjustMultilineComment) {
- const offset = comment.loc && comment.loc.start.column;
-
- if (offset) {
- const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
- val = val.replace(newlineRegex, "\n");
- }
-
- const indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());
- val = val.replace(/\n(?!$)/g, `\n${(0, _repeat().default)(" ", indentSize)}`);
- }
-
- if (this.endsWith("/")) this._space();
- this.withSource("start", comment.loc, () => {
- this._append(val);
- });
- this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0);
- }
-
- _printComments(comments) {
- if (!comments || !comments.length) return;
-
- for (const comment of comments) {
- this._printComment(comment);
- }
- }
-
-}
-
-exports.default = Printer;
-Object.assign(Printer.prototype, generatorFunctions);
-
-function commaSeparator() {
- this.token(",");
- this.space();
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js b/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js
deleted file mode 100644
index 12b70308db4..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/lib/source-map.js
+++ /dev/null
@@ -1,81 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-function _sourceMap() {
- const data = _interopRequireDefault(require("source-map"));
-
- _sourceMap = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-class SourceMap {
- constructor(opts, code) {
- this._cachedMap = null;
- this._code = code;
- this._opts = opts;
- this._rawMappings = [];
- }
-
- get() {
- if (!this._cachedMap) {
- const map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({
- sourceRoot: this._opts.sourceRoot
- });
- const code = this._code;
-
- if (typeof code === "string") {
- map.setSourceContent(this._opts.sourceFileName, code);
- } else if (typeof code === "object") {
- Object.keys(code).forEach(sourceFileName => {
- map.setSourceContent(sourceFileName, code[sourceFileName]);
- });
- }
-
- this._rawMappings.forEach(map.addMapping, map);
- }
-
- return this._cachedMap.toJSON();
- }
-
- getRawMappings() {
- return this._rawMappings.slice();
- }
-
- mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
- if (this._lastGenLine !== generatedLine && line === null) return;
-
- if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
- return;
- }
-
- this._cachedMap = null;
- this._lastGenLine = generatedLine;
- this._lastSourceLine = line;
- this._lastSourceColumn = column;
-
- this._rawMappings.push({
- name: identifierName || undefined,
- generated: {
- line: generatedLine,
- column: generatedColumn
- },
- source: line == null ? undefined : filename || this._opts.sourceFileName,
- original: line == null ? undefined : {
- line: line,
- column: column
- }
- });
- }
-
-}
-
-exports.default = SourceMap; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json
deleted file mode 100644
index 6eca8973ea3..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/generator/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/types": "^7.5.5",
- "jsesc": "^2.5.1",
- "lodash": "^4.17.13",
- "source-map": "^0.5.0",
- "trim-right": "^1.0.1"
- },
- "deprecated": false,
- "description": "Turns an AST into code.",
- "devDependencies": {
- "@babel/helper-fixtures": "^7.5.5",
- "@babel/parser": "^7.5.5"
- },
- "files": [
- "lib"
- ],
- "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/generator",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-generator"
- },
- "version": "7.5.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE
deleted file mode 100644
index a06ec0e70f2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) 2014-2018 Sebastian McKenzie and other contributors
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js
deleted file mode 100644
index c6dd4afbf55..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/lib/index.js
+++ /dev/null
@@ -1,198 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = _default;
-
-function _helperGetFunctionArity() {
- const data = _interopRequireDefault(require("@babel/helper-get-function-arity"));
-
- _helperGetFunctionArity = function () {
- return data;
- };
-
- return data;
-}
-
-function _template() {
- const data = _interopRequireDefault(require("@babel/template"));
-
- _template = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const buildPropertyMethodAssignmentWrapper = (0, _template().default)(`
- (function (FUNCTION_KEY) {
- function FUNCTION_ID() {
- return FUNCTION_KEY.apply(this, arguments);
- }
-
- FUNCTION_ID.toString = function () {
- return FUNCTION_KEY.toString();
- }
-
- return FUNCTION_ID;
- })(FUNCTION)
-`);
-const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template().default)(`
- (function (FUNCTION_KEY) {
- function* FUNCTION_ID() {
- return yield* FUNCTION_KEY.apply(this, arguments);
- }
-
- FUNCTION_ID.toString = function () {
- return FUNCTION_KEY.toString();
- };
-
- return FUNCTION_ID;
- })(FUNCTION)
-`);
-const visitor = {
- "ReferencedIdentifier|BindingIdentifier"(path, state) {
- if (path.node.name !== state.name) return;
- const localDeclar = path.scope.getBindingIdentifier(state.name);
- if (localDeclar !== state.outerDeclar) return;
- state.selfReference = true;
- path.stop();
- }
-
-};
-
-function getNameFromLiteralId(id) {
- if (t().isNullLiteral(id)) {
- return "null";
- }
-
- if (t().isRegExpLiteral(id)) {
- return `_${id.pattern}_${id.flags}`;
- }
-
- if (t().isTemplateLiteral(id)) {
- return id.quasis.map(quasi => quasi.value.raw).join("");
- }
-
- if (id.value !== undefined) {
- return id.value + "";
- }
-
- return "";
-}
-
-function wrap(state, method, id, scope) {
- if (state.selfReference) {
- if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
- scope.rename(id.name);
- } else {
- if (!t().isFunction(method)) return;
- let build = buildPropertyMethodAssignmentWrapper;
-
- if (method.generator) {
- build = buildGeneratorPropertyMethodAssignmentWrapper;
- }
-
- const template = build({
- FUNCTION: method,
- FUNCTION_ID: id,
- FUNCTION_KEY: scope.generateUidIdentifier(id.name)
- }).expression;
- const params = template.callee.body.body[0].params;
-
- for (let i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) {
- params.push(scope.generateUidIdentifier("x"));
- }
-
- return template;
- }
- }
-
- method.id = id;
- scope.getProgramParent().references[id.name] = true;
-}
-
-function visit(node, name, scope) {
- const state = {
- selfAssignment: false,
- selfReference: false,
- outerDeclar: scope.getBindingIdentifier(name),
- references: [],
- name: name
- };
- const binding = scope.getOwnBinding(name);
-
- if (binding) {
- if (binding.kind === "param") {
- state.selfReference = true;
- } else {}
- } else if (state.outerDeclar || scope.hasGlobal(name)) {
- scope.traverse(node, visitor, state);
- }
-
- return state;
-}
-
-function _default({
- node,
- parent,
- scope,
- id
-}, localBinding = false) {
- if (node.id) return;
-
- if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, {
- kind: "method"
- })) && (!parent.computed || t().isLiteral(parent.key))) {
- id = parent.key;
- } else if (t().isVariableDeclarator(parent)) {
- id = parent.id;
-
- if (t().isIdentifier(id) && !localBinding) {
- const binding = scope.parent.getBinding(id.name);
-
- if (binding && binding.constant && scope.getBinding(id.name) === binding) {
- node.id = t().cloneNode(id);
- node.id[t().NOT_LOCAL_BINDING] = true;
- return;
- }
- }
- } else if (t().isAssignmentExpression(parent)) {
- id = parent.left;
- } else if (!id) {
- return;
- }
-
- let name;
-
- if (id && t().isLiteral(id)) {
- name = getNameFromLiteralId(id);
- } else if (id && t().isIdentifier(id)) {
- name = id.name;
- }
-
- if (name === undefined) {
- return;
- }
-
- name = t().toBindingIdentifierName(name);
- id = t().identifier(name);
- id[t().NOT_LOCAL_BINDING] = true;
- const state = visit(node, name, scope);
- return wrap(state, node, id, scope) || node;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json
deleted file mode 100644
index dfed420aaec..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-function-name/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "bundleDependencies": false,
- "dependencies": {
- "@babel/helper-get-function-arity": "^7.0.0",
- "@babel/template": "^7.1.0",
- "@babel/types": "^7.0.0"
- },
- "deprecated": false,
- "description": "Helper function to change the property 'name' of every function",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/helper-function-name",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name"
- },
- "version": "7.1.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE
deleted file mode 100644
index 620366eb900..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-MIT License
-
-Copyright (c) 2014-2018 Sebastian McKenzie <sebmck@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js
deleted file mode 100644
index 5723401db71..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/lib/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = _default;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _default(node) {
- const params = node.params;
-
- for (let i = 0; i < params.length; i++) {
- const param = params[i];
-
- if (t().isAssignmentPattern(param) || t().isRestElement(param)) {
- return i;
- }
- }
-
- return params.length;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json
deleted file mode 100644
index 49d2e854dae..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-get-function-arity/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "bundleDependencies": false,
- "dependencies": {
- "@babel/types": "^7.0.0"
- },
- "deprecated": false,
- "description": "Helper function to get function arity",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/helper-get-function-arity",
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity"
- },
- "version": "7.0.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js
deleted file mode 100644
index ddb34bc3513..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/lib/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = splitExportDeclaration;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function splitExportDeclaration(exportDeclaration) {
- if (!exportDeclaration.isExportDeclaration()) {
- throw new Error("Only export declarations can be splitted.");
- }
-
- const isDefault = exportDeclaration.isExportDefaultDeclaration();
- const declaration = exportDeclaration.get("declaration");
- const isClassDeclaration = declaration.isClassDeclaration();
-
- if (isDefault) {
- const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
- const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
- let id = declaration.node.id;
- let needBindingRegistration = false;
-
- if (!id) {
- needBindingRegistration = true;
- id = scope.generateUidIdentifier("default");
-
- if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
- declaration.node.id = t().cloneNode(id);
- }
- }
-
- const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]);
- const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]);
- exportDeclaration.insertAfter(updatedExportDeclaration);
- exportDeclaration.replaceWith(updatedDeclaration);
-
- if (needBindingRegistration) {
- scope.registerDeclaration(exportDeclaration);
- }
-
- return exportDeclaration;
- }
-
- if (exportDeclaration.get("specifiers").length > 0) {
- throw new Error("It doesn't make sense to split exported specifiers.");
- }
-
- const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
- const specifiers = Object.keys(bindingIdentifiers).map(name => {
- return t().exportSpecifier(t().identifier(name), t().identifier(name));
- });
- const aliasDeclar = t().exportNamedDeclaration(null, specifiers);
- exportDeclaration.insertAfter(aliasDeclar);
- exportDeclaration.replaceWith(declaration.node);
- return exportDeclaration;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json
deleted file mode 100644
index 8f3e0fdbd78..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/helper-split-export-declaration/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "bundleDependencies": false,
- "dependencies": {
- "@babel/types": "^7.4.4"
- },
- "deprecated": false,
- "description": ">",
- "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/helper-split-export-declaration",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration"
- },
- "version": "7.4.4"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js
deleted file mode 100644
index 6ac5b4a350b..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/lib/index.js
+++ /dev/null
@@ -1,129 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.shouldHighlight = shouldHighlight;
-exports.getChalk = getChalk;
-exports.default = highlight;
-
-function _jsTokens() {
- const data = _interopRequireWildcard(require("js-tokens"));
-
- _jsTokens = function () {
- return data;
- };
-
- return data;
-}
-
-function _esutils() {
- const data = _interopRequireDefault(require("esutils"));
-
- _esutils = function () {
- return data;
- };
-
- return data;
-}
-
-function _chalk() {
- const data = _interopRequireDefault(require("chalk"));
-
- _chalk = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function getDefs(chalk) {
- return {
- keyword: chalk.cyan,
- capitalized: chalk.yellow,
- jsx_tag: chalk.yellow,
- punctuator: chalk.yellow,
- number: chalk.magenta,
- string: chalk.green,
- regex: chalk.magenta,
- comment: chalk.grey,
- invalid: chalk.white.bgRed.bold
- };
-}
-
-const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
-const JSX_TAG = /^[a-z][\w-]*$/i;
-const BRACKET = /^[()[\]{}]$/;
-
-function getTokenType(match) {
- const [offset, text] = match.slice(-2);
- const token = (0, _jsTokens().matchToToken)(match);
-
- if (token.type === "name") {
- if (_esutils().default.keyword.isReservedWordES6(token.value)) {
- return "keyword";
- }
-
- if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
- return "jsx_tag";
- }
-
- if (token.value[0] !== token.value[0].toLowerCase()) {
- return "capitalized";
- }
- }
-
- if (token.type === "punctuator" && BRACKET.test(token.value)) {
- return "bracket";
- }
-
- if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
- return "punctuator";
- }
-
- return token.type;
-}
-
-function highlightTokens(defs, text) {
- return text.replace(_jsTokens().default, function (...args) {
- const type = getTokenType(args);
- const colorize = defs[type];
-
- if (colorize) {
- return args[0].split(NEWLINE).map(str => colorize(str)).join("\n");
- } else {
- return args[0];
- }
- });
-}
-
-function shouldHighlight(options) {
- return _chalk().default.supportsColor || options.forceColor;
-}
-
-function getChalk(options) {
- let chalk = _chalk().default;
-
- if (options.forceColor) {
- chalk = new (_chalk().default.constructor)({
- enabled: true,
- level: 1
- });
- }
-
- return chalk;
-}
-
-function highlight(code, options = {}) {
- if (shouldHighlight(options)) {
- const chalk = getChalk(options);
- const defs = getDefs(chalk);
- return highlightTokens(defs, code);
- } else {
- return code;
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json
deleted file mode 100644
index 9c16718356c..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/highlight/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "author": {
- "name": "suchipi",
- "email": "me@suchipi.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "chalk": "^2.0.0",
- "esutils": "^2.0.2",
- "js-tokens": "^4.0.0"
- },
- "deprecated": false,
- "description": "Syntax highlight JavaScript strings for output in terminals.",
- "devDependencies": {
- "strip-ansi": "^4.0.0"
- },
- "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/highlight",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight"
- },
- "version": "7.5.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md
deleted file mode 100644
index 65092a05347..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/parser
-
-> A JavaScript parser
-
-See our website [@babel/parser](https://babeljs.io/docs/en/next/babel-parser.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen) associated with this package.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/parser
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/parser --dev
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js b/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js
deleted file mode 100755
index 58f00b845c0..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/bin/babel-parser.js
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env node
-/* eslint no-var: 0 */
-
-var parser = require("..");
-var fs = require("fs");
-
-var filename = process.argv[2];
-if (!filename) {
- console.error("no filename specified");
- process.exit(0);
-}
-
-var file = fs.readFileSync(filename, "utf8");
-var ast = parser.parse(file);
-
-console.log(JSON.stringify(ast, null, " "));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js
deleted file mode 100644
index 81b6994d07e..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/lib/index.js
+++ /dev/null
@@ -1,11353 +0,0 @@
-'use strict';
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-const beforeExpr = true;
-const startsExpr = true;
-const isLoop = true;
-const isAssign = true;
-const prefix = true;
-const postfix = true;
-class TokenType {
- constructor(label, conf = {}) {
- this.label = label;
- this.keyword = conf.keyword;
- this.beforeExpr = !!conf.beforeExpr;
- this.startsExpr = !!conf.startsExpr;
- this.rightAssociative = !!conf.rightAssociative;
- this.isLoop = !!conf.isLoop;
- this.isAssign = !!conf.isAssign;
- this.prefix = !!conf.prefix;
- this.postfix = !!conf.postfix;
- this.binop = conf.binop != null ? conf.binop : null;
- this.updateContext = null;
- }
-
-}
-const keywords = new Map();
-
-function createKeyword(name, options = {}) {
- options.keyword = name;
- const token = new TokenType(name, options);
- keywords.set(name, token);
- return token;
-}
-
-function createBinop(name, binop) {
- return new TokenType(name, {
- beforeExpr,
- binop
- });
-}
-
-const types = {
- num: new TokenType("num", {
- startsExpr
- }),
- bigint: new TokenType("bigint", {
- startsExpr
- }),
- regexp: new TokenType("regexp", {
- startsExpr
- }),
- string: new TokenType("string", {
- startsExpr
- }),
- name: new TokenType("name", {
- startsExpr
- }),
- eof: new TokenType("eof"),
- bracketL: new TokenType("[", {
- beforeExpr,
- startsExpr
- }),
- bracketR: new TokenType("]"),
- braceL: new TokenType("{", {
- beforeExpr,
- startsExpr
- }),
- braceBarL: new TokenType("{|", {
- beforeExpr,
- startsExpr
- }),
- braceR: new TokenType("}"),
- braceBarR: new TokenType("|}"),
- parenL: new TokenType("(", {
- beforeExpr,
- startsExpr
- }),
- parenR: new TokenType(")"),
- comma: new TokenType(",", {
- beforeExpr
- }),
- semi: new TokenType(";", {
- beforeExpr
- }),
- colon: new TokenType(":", {
- beforeExpr
- }),
- doubleColon: new TokenType("::", {
- beforeExpr
- }),
- dot: new TokenType("."),
- question: new TokenType("?", {
- beforeExpr
- }),
- questionDot: new TokenType("?."),
- arrow: new TokenType("=>", {
- beforeExpr
- }),
- template: new TokenType("template"),
- ellipsis: new TokenType("...", {
- beforeExpr
- }),
- backQuote: new TokenType("`", {
- startsExpr
- }),
- dollarBraceL: new TokenType("${", {
- beforeExpr,
- startsExpr
- }),
- at: new TokenType("@"),
- hash: new TokenType("#", {
- startsExpr
- }),
- interpreterDirective: new TokenType("#!..."),
- eq: new TokenType("=", {
- beforeExpr,
- isAssign
- }),
- assign: new TokenType("_=", {
- beforeExpr,
- isAssign
- }),
- incDec: new TokenType("++/--", {
- prefix,
- postfix,
- startsExpr
- }),
- bang: new TokenType("!", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- tilde: new TokenType("~", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- pipeline: createBinop("|>", 0),
- nullishCoalescing: createBinop("??", 1),
- logicalOR: createBinop("||", 1),
- logicalAND: createBinop("&&", 2),
- bitwiseOR: createBinop("|", 3),
- bitwiseXOR: createBinop("^", 4),
- bitwiseAND: createBinop("&", 5),
- equality: createBinop("==/!=/===/!==", 6),
- relational: createBinop("</>/<=/>=", 7),
- bitShift: createBinop("<</>>/>>>", 8),
- plusMin: new TokenType("+/-", {
- beforeExpr,
- binop: 9,
- prefix,
- startsExpr
- }),
- modulo: createBinop("%", 10),
- star: createBinop("*", 10),
- slash: createBinop("/", 10),
- exponent: new TokenType("**", {
- beforeExpr,
- binop: 11,
- rightAssociative: true
- }),
- _break: createKeyword("break"),
- _case: createKeyword("case", {
- beforeExpr
- }),
- _catch: createKeyword("catch"),
- _continue: createKeyword("continue"),
- _debugger: createKeyword("debugger"),
- _default: createKeyword("default", {
- beforeExpr
- }),
- _do: createKeyword("do", {
- isLoop,
- beforeExpr
- }),
- _else: createKeyword("else", {
- beforeExpr
- }),
- _finally: createKeyword("finally"),
- _for: createKeyword("for", {
- isLoop
- }),
- _function: createKeyword("function", {
- startsExpr
- }),
- _if: createKeyword("if"),
- _return: createKeyword("return", {
- beforeExpr
- }),
- _switch: createKeyword("switch"),
- _throw: createKeyword("throw", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- _try: createKeyword("try"),
- _var: createKeyword("var"),
- _const: createKeyword("const"),
- _while: createKeyword("while", {
- isLoop
- }),
- _with: createKeyword("with"),
- _new: createKeyword("new", {
- beforeExpr,
- startsExpr
- }),
- _this: createKeyword("this", {
- startsExpr
- }),
- _super: createKeyword("super", {
- startsExpr
- }),
- _class: createKeyword("class", {
- startsExpr
- }),
- _extends: createKeyword("extends", {
- beforeExpr
- }),
- _export: createKeyword("export"),
- _import: createKeyword("import", {
- startsExpr
- }),
- _null: createKeyword("null", {
- startsExpr
- }),
- _true: createKeyword("true", {
- startsExpr
- }),
- _false: createKeyword("false", {
- startsExpr
- }),
- _in: createKeyword("in", {
- beforeExpr,
- binop: 7
- }),
- _instanceof: createKeyword("instanceof", {
- beforeExpr,
- binop: 7
- }),
- _typeof: createKeyword("typeof", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- _void: createKeyword("void", {
- beforeExpr,
- prefix,
- startsExpr
- }),
- _delete: createKeyword("delete", {
- beforeExpr,
- prefix,
- startsExpr
- })
-};
-
-const SCOPE_OTHER = 0b000000000,
- SCOPE_PROGRAM = 0b000000001,
- SCOPE_FUNCTION = 0b000000010,
- SCOPE_ASYNC = 0b000000100,
- SCOPE_GENERATOR = 0b000001000,
- SCOPE_ARROW = 0b000010000,
- SCOPE_SIMPLE_CATCH = 0b000100000,
- SCOPE_SUPER = 0b001000000,
- SCOPE_DIRECT_SUPER = 0b010000000,
- SCOPE_CLASS = 0b100000000,
- SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION;
-function functionFlags(isAsync, isGenerator) {
- return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0);
-}
-const BIND_KIND_VALUE = 0b00000000001,
- BIND_KIND_TYPE = 0b00000000010,
- BIND_SCOPE_VAR = 0b00000000100,
- BIND_SCOPE_LEXICAL = 0b00000001000,
- BIND_SCOPE_FUNCTION = 0b00000010000,
- BIND_FLAGS_NONE = 0b00001000000,
- BIND_FLAGS_CLASS = 0b00010000000,
- BIND_FLAGS_TS_ENUM = 0b00100000000,
- BIND_FLAGS_TS_CONST_ENUM = 0b01000000000,
- BIND_FLAGS_TS_EXPORT_ONLY = 0b10000000000;
-const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
- BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
- BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
- BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
- BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
- BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
- BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
- BIND_TS_FN_TYPE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
- BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
- BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
- BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
- BIND_TS_NAMESPACE = BIND_TS_FN_TYPE;
-
-function isSimpleProperty(node) {
- return node != null && node.type === "Property" && node.kind === "init" && node.method === false;
-}
-
-var estree = (superClass => class extends superClass {
- estreeParseRegExpLiteral({
- pattern,
- flags
- }) {
- let regex = null;
-
- try {
- regex = new RegExp(pattern, flags);
- } catch (e) {}
-
- const node = this.estreeParseLiteral(regex);
- node.regex = {
- pattern,
- flags
- };
- return node;
- }
-
- estreeParseLiteral(value) {
- return this.parseLiteral(value, "Literal");
- }
-
- directiveToStmt(directive) {
- const directiveLiteral = directive.value;
- const stmt = this.startNodeAt(directive.start, directive.loc.start);
- const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
- expression.value = directiveLiteral.value;
- expression.raw = directiveLiteral.extra.raw;
- stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
- stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
- return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
- }
-
- initFunction(node, isAsync) {
- super.initFunction(node, isAsync);
- node.expression = false;
- }
-
- checkDeclaration(node) {
- if (isSimpleProperty(node)) {
- this.checkDeclaration(node.value);
- } else {
- super.checkDeclaration(node);
- }
- }
-
- checkGetterSetterParams(method) {
- const prop = method;
- const paramCount = prop.kind === "get" ? 0 : 1;
- const start = prop.start;
-
- if (prop.value.params.length !== paramCount) {
- if (prop.kind === "get") {
- this.raise(start, "getter must not have any formal parameters");
- } else {
- this.raise(start, "setter must have exactly one formal parameter");
- }
- }
-
- if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
- this.raise(start, "setter function argument must not be a rest parameter");
- }
- }
-
- checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) {
- switch (expr.type) {
- case "ObjectPattern":
- expr.properties.forEach(prop => {
- this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern");
- });
- break;
-
- default:
- super.checkLVal(expr, bindingType, checkClashes, contextDescription);
- }
- }
-
- checkPropClash(prop, propHash) {
- if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) {
- return;
- }
-
- const key = prop.key;
- const name = key.type === "Identifier" ? key.name : String(key.value);
-
- if (name === "__proto__" && prop.kind === "init") {
- if (propHash.proto) {
- this.raise(key.start, "Redefinition of __proto__ property");
- }
-
- propHash.proto = true;
- }
- }
-
- isStrictBody(node) {
- const isBlockStatement = node.body.type === "BlockStatement";
-
- if (isBlockStatement && node.body.body.length > 0) {
- for (let _i = 0, _node$body$body = node.body.body; _i < _node$body$body.length; _i++) {
- const directive = _node$body$body[_i];
-
- if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") {
- if (directive.expression.value === "use strict") return true;
- } else {
- break;
- }
- }
- }
-
- return false;
- }
-
- isValidDirective(stmt) {
- return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);
- }
-
- stmtToDirective(stmt) {
- const directive = super.stmtToDirective(stmt);
- const value = stmt.expression.value;
- directive.value.value = value;
- return directive;
- }
-
- parseBlockBody(node, allowDirectives, topLevel, end) {
- super.parseBlockBody(node, allowDirectives, topLevel, end);
- const directiveStatements = node.directives.map(d => this.directiveToStmt(d));
- node.body = directiveStatements.concat(node.body);
- delete node.directives;
- }
-
- pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
- this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
-
- if (method.typeParameters) {
- method.value.typeParameters = method.typeParameters;
- delete method.typeParameters;
- }
-
- classBody.body.push(method);
- }
-
- parseExprAtom(refShorthandDefaultPos) {
- switch (this.state.type) {
- case types.regexp:
- return this.estreeParseRegExpLiteral(this.state.value);
-
- case types.num:
- case types.string:
- return this.estreeParseLiteral(this.state.value);
-
- case types._null:
- return this.estreeParseLiteral(null);
-
- case types._true:
- return this.estreeParseLiteral(true);
-
- case types._false:
- return this.estreeParseLiteral(false);
-
- default:
- return super.parseExprAtom(refShorthandDefaultPos);
- }
- }
-
- parseLiteral(value, type, startPos, startLoc) {
- const node = super.parseLiteral(value, type, startPos, startLoc);
- node.raw = node.extra.raw;
- delete node.extra;
- return node;
- }
-
- parseFunctionBody(node, allowExpression, isMethod = false) {
- super.parseFunctionBody(node, allowExpression, isMethod);
- node.expression = node.body.type !== "BlockStatement";
- }
-
- parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
- let funcNode = this.startNode();
- funcNode.kind = node.kind;
- funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
- funcNode.type = "FunctionExpression";
- delete funcNode.kind;
- node.value = funcNode;
- type = type === "ClassMethod" ? "MethodDefinition" : type;
- return this.finishNode(node, type);
- }
-
- parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {
- const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc);
-
- if (node) {
- node.type = "Property";
- if (node.kind === "method") node.kind = "init";
- node.shorthand = false;
- }
-
- return node;
- }
-
- parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
- const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
-
- if (node) {
- node.kind = "init";
- node.type = "Property";
- }
-
- return node;
- }
-
- toAssignable(node, isBinding, contextDescription) {
- if (isSimpleProperty(node)) {
- this.toAssignable(node.value, isBinding, contextDescription);
- return node;
- }
-
- return super.toAssignable(node, isBinding, contextDescription);
- }
-
- toAssignableObjectExpressionProp(prop, isBinding, isLast) {
- if (prop.kind === "get" || prop.kind === "set") {
- this.raise(prop.key.start, "Object pattern can't contain getter or setter");
- } else if (prop.method) {
- this.raise(prop.key.start, "Object pattern can't contain methods");
- } else {
- super.toAssignableObjectExpressionProp(prop, isBinding, isLast);
- }
- }
-
-});
-
-const lineBreak = /\r\n?|[\n\u2028\u2029]/;
-const lineBreakG = new RegExp(lineBreak.source, "g");
-function isNewLine(code) {
- switch (code) {
- case 10:
- case 13:
- case 8232:
- case 8233:
- return true;
-
- default:
- return false;
- }
-}
-const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
-function isWhitespace(code) {
- switch (code) {
- case 0x0009:
- case 0x000b:
- case 0x000c:
- case 32:
- case 160:
- case 5760:
- case 0x2000:
- case 0x2001:
- case 0x2002:
- case 0x2003:
- case 0x2004:
- case 0x2005:
- case 0x2006:
- case 0x2007:
- case 0x2008:
- case 0x2009:
- case 0x200a:
- case 0x202f:
- case 0x205f:
- case 0x3000:
- case 0xfeff:
- return true;
-
- default:
- return false;
- }
-}
-
-class TokContext {
- constructor(token, isExpr, preserveSpace, override) {
- this.token = token;
- this.isExpr = !!isExpr;
- this.preserveSpace = !!preserveSpace;
- this.override = override;
- }
-
-}
-const types$1 = {
- braceStatement: new TokContext("{", false),
- braceExpression: new TokContext("{", true),
- templateQuasi: new TokContext("${", false),
- parenStatement: new TokContext("(", false),
- parenExpression: new TokContext("(", true),
- template: new TokContext("`", true, true, p => p.readTmplToken()),
- functionExpression: new TokContext("function", true),
- functionStatement: new TokContext("function", false)
-};
-
-types.parenR.updateContext = types.braceR.updateContext = function () {
- if (this.state.context.length === 1) {
- this.state.exprAllowed = true;
- return;
- }
-
- let out = this.state.context.pop();
-
- if (out === types$1.braceStatement && this.curContext().token === "function") {
- out = this.state.context.pop();
- }
-
- this.state.exprAllowed = !out.isExpr;
-};
-
-types.name.updateContext = function (prevType) {
- let allowed = false;
-
- if (prevType !== types.dot) {
- if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) {
- allowed = true;
- }
- }
-
- this.state.exprAllowed = allowed;
-
- if (this.state.isIterator) {
- this.state.isIterator = false;
- }
-};
-
-types.braceL.updateContext = function (prevType) {
- this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);
- this.state.exprAllowed = true;
-};
-
-types.dollarBraceL.updateContext = function () {
- this.state.context.push(types$1.templateQuasi);
- this.state.exprAllowed = true;
-};
-
-types.parenL.updateContext = function (prevType) {
- const statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
- this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);
- this.state.exprAllowed = true;
-};
-
-types.incDec.updateContext = function () {};
-
-types._function.updateContext = types._class.updateContext = function (prevType) {
- if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) {
- this.state.context.push(types$1.functionExpression);
- } else {
- this.state.context.push(types$1.functionStatement);
- }
-
- this.state.exprAllowed = false;
-};
-
-types.backQuote.updateContext = function () {
- if (this.curContext() === types$1.template) {
- this.state.context.pop();
- } else {
- this.state.context.push(types$1.template);
- }
-
- this.state.exprAllowed = false;
-};
-
-const reservedWords = {
- strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
- strictBind: ["eval", "arguments"]
-};
-const reservedWordsStrictSet = new Set(reservedWords.strict);
-const reservedWordsStrictBindSet = new Set(reservedWords.strict.concat(reservedWords.strictBind));
-const isReservedWord = (word, inModule) => {
- return inModule && word === "await" || word === "enum";
-};
-function isStrictReservedWord(word, inModule) {
- return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
-}
-function isStrictBindReservedWord(word, inModule) {
- return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word);
-}
-function isKeyword(word) {
- return keywords.has(word);
-}
-const keywordRelationalOperator = /^in(stanceof)?$/;
-let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
-let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
-const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
-const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
-const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 754, 9486, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541];
-const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 232, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 792487, 239];
-
-function isInAstralSet(code, set) {
- let pos = 0x10000;
-
- for (let i = 0, length = set.length; i < length; i += 2) {
- pos += set[i];
- if (pos > code) return false;
- pos += set[i + 1];
- if (pos >= code) return true;
- }
-
- return false;
-}
-
-function isIdentifierStart(code) {
- if (code < 65) return code === 36;
- if (code <= 90) return true;
- if (code < 97) return code === 95;
- if (code <= 122) return true;
-
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }
-
- return isInAstralSet(code, astralIdentifierStartCodes);
-}
-function isIteratorStart(current, next) {
- return current === 64 && next === 64;
-}
-function isIdentifierChar(code) {
- if (code < 48) return code === 36;
- if (code < 58) return true;
- if (code < 65) return false;
- if (code <= 90) return true;
- if (code < 97) return code === 95;
- if (code <= 122) return true;
-
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
- }
-
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
-}
-
-const reservedTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void", "interface", "extends", "_"];
-
-function isEsModuleType(bodyElement) {
- return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
-}
-
-function hasTypeImportKind(node) {
- return node.importKind === "type" || node.importKind === "typeof";
-}
-
-function isMaybeDefaultImport(state) {
- return (state.type === types.name || !!state.type.keyword) && state.value !== "from";
-}
-
-const exportSuggestions = {
- const: "declare export var",
- let: "declare export var",
- type: "export type",
- interface: "export interface"
-};
-
-function partition(list, test) {
- const list1 = [];
- const list2 = [];
-
- for (let i = 0; i < list.length; i++) {
- (test(list[i], i, list) ? list1 : list2).push(list[i]);
- }
-
- return [list1, list2];
-}
-
-const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
-var flow = (superClass => class extends superClass {
- constructor(options, input) {
- super(options, input);
- this.flowPragma = undefined;
- }
-
- shouldParseTypes() {
- return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
- }
-
- finishToken(type, val) {
- if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) {
- if (this.flowPragma === undefined) {
- this.flowPragma = null;
- }
- }
-
- return super.finishToken(type, val);
- }
-
- addComment(comment) {
- if (this.flowPragma === undefined) {
- const matches = FLOW_PRAGMA_REGEX.exec(comment.value);
-
- if (!matches) ; else if (matches[1] === "flow") {
- this.flowPragma = "flow";
- } else if (matches[1] === "noflow") {
- this.flowPragma = "noflow";
- } else {
- throw new Error("Unexpected flow pragma");
- }
- }
-
- return super.addComment(comment);
- }
-
- flowParseTypeInitialiser(tok) {
- const oldInType = this.state.inType;
- this.state.inType = true;
- this.expect(tok || types.colon);
- const type = this.flowParseType();
- this.state.inType = oldInType;
- return type;
- }
-
- flowParsePredicate() {
- const node = this.startNode();
- const moduloLoc = this.state.startLoc;
- const moduloPos = this.state.start;
- this.expect(types.modulo);
- const checksLoc = this.state.startLoc;
- this.expectContextual("checks");
-
- if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {
- this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here.");
- }
-
- if (this.eat(types.parenL)) {
- node.value = this.parseExpression();
- this.expect(types.parenR);
- return this.finishNode(node, "DeclaredPredicate");
- } else {
- return this.finishNode(node, "InferredPredicate");
- }
- }
-
- flowParseTypeAndPredicateInitialiser() {
- const oldInType = this.state.inType;
- this.state.inType = true;
- this.expect(types.colon);
- let type = null;
- let predicate = null;
-
- if (this.match(types.modulo)) {
- this.state.inType = oldInType;
- predicate = this.flowParsePredicate();
- } else {
- type = this.flowParseType();
- this.state.inType = oldInType;
-
- if (this.match(types.modulo)) {
- predicate = this.flowParsePredicate();
- }
- }
-
- return [type, predicate];
- }
-
- flowParseDeclareClass(node) {
- this.next();
- this.flowParseInterfaceish(node, true);
- return this.finishNode(node, "DeclareClass");
- }
-
- flowParseDeclareFunction(node) {
- this.next();
- const id = node.id = this.parseIdentifier();
- const typeNode = this.startNode();
- const typeContainer = this.startNode();
-
- if (this.isRelational("<")) {
- typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- typeNode.typeParameters = null;
- }
-
- this.expect(types.parenL);
- const tmp = this.flowParseFunctionTypeParams();
- typeNode.params = tmp.params;
- typeNode.rest = tmp.rest;
- this.expect(types.parenR);
- [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
- typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
- id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
- this.resetEndLocation(id);
- this.semicolon();
- return this.finishNode(node, "DeclareFunction");
- }
-
- flowParseDeclare(node, insideModule) {
- if (this.match(types._class)) {
- return this.flowParseDeclareClass(node);
- } else if (this.match(types._function)) {
- return this.flowParseDeclareFunction(node);
- } else if (this.match(types._var)) {
- return this.flowParseDeclareVariable(node);
- } else if (this.eatContextual("module")) {
- if (this.match(types.dot)) {
- return this.flowParseDeclareModuleExports(node);
- } else {
- if (insideModule) {
- this.unexpected(this.state.lastTokStart, "`declare module` cannot be used inside another `declare module`");
- }
-
- return this.flowParseDeclareModule(node);
- }
- } else if (this.isContextual("type")) {
- return this.flowParseDeclareTypeAlias(node);
- } else if (this.isContextual("opaque")) {
- return this.flowParseDeclareOpaqueType(node);
- } else if (this.isContextual("interface")) {
- return this.flowParseDeclareInterface(node);
- } else if (this.match(types._export)) {
- return this.flowParseDeclareExportDeclaration(node, insideModule);
- } else {
- throw this.unexpected();
- }
- }
-
- flowParseDeclareVariable(node) {
- this.next();
- node.id = this.flowParseTypeAnnotatableIdentifier(true);
- this.semicolon();
- return this.finishNode(node, "DeclareVariable");
- }
-
- flowParseDeclareModule(node) {
- this.scope.enter(SCOPE_OTHER);
-
- if (this.match(types.string)) {
- node.id = this.parseExprAtom();
- } else {
- node.id = this.parseIdentifier();
- }
-
- const bodyNode = node.body = this.startNode();
- const body = bodyNode.body = [];
- this.expect(types.braceL);
-
- while (!this.match(types.braceR)) {
- let bodyNode = this.startNode();
-
- if (this.match(types._import)) {
- this.next();
-
- if (!this.isContextual("type") && !this.match(types._typeof)) {
- this.unexpected(this.state.lastTokStart, "Imports within a `declare module` body must always be `import type` or `import typeof`");
- }
-
- this.parseImport(bodyNode);
- } else {
- this.expectContextual("declare", "Only declares and type imports are allowed inside declare module");
- bodyNode = this.flowParseDeclare(bodyNode, true);
- }
-
- body.push(bodyNode);
- }
-
- this.scope.exit();
- this.expect(types.braceR);
- this.finishNode(bodyNode, "BlockStatement");
- let kind = null;
- let hasModuleExport = false;
- const errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module";
- body.forEach(bodyElement => {
- if (isEsModuleType(bodyElement)) {
- if (kind === "CommonJS") {
- this.unexpected(bodyElement.start, errorMessage);
- }
-
- kind = "ES";
- } else if (bodyElement.type === "DeclareModuleExports") {
- if (hasModuleExport) {
- this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement");
- }
-
- if (kind === "ES") this.unexpected(bodyElement.start, errorMessage);
- kind = "CommonJS";
- hasModuleExport = true;
- }
- });
- node.kind = kind || "CommonJS";
- return this.finishNode(node, "DeclareModule");
- }
-
- flowParseDeclareExportDeclaration(node, insideModule) {
- this.expect(types._export);
-
- if (this.eat(types._default)) {
- if (this.match(types._function) || this.match(types._class)) {
- node.declaration = this.flowParseDeclare(this.startNode());
- } else {
- node.declaration = this.flowParseType();
- this.semicolon();
- }
-
- node.default = true;
- return this.finishNode(node, "DeclareExportDeclaration");
- } else {
- if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
- const label = this.state.value;
- const suggestion = exportSuggestions[label];
- this.unexpected(this.state.start, `\`declare export ${label}\` is not supported. Use \`${suggestion}\` instead`);
- }
-
- if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) {
- node.declaration = this.flowParseDeclare(this.startNode());
- node.default = false;
- return this.finishNode(node, "DeclareExportDeclaration");
- } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
- node = this.parseExport(node);
-
- if (node.type === "ExportNamedDeclaration") {
- node.type = "ExportDeclaration";
- node.default = false;
- delete node.exportKind;
- }
-
- node.type = "Declare" + node.type;
- return node;
- }
- }
-
- throw this.unexpected();
- }
-
- flowParseDeclareModuleExports(node) {
- this.next();
- this.expectContextual("exports");
- node.typeAnnotation = this.flowParseTypeAnnotation();
- this.semicolon();
- return this.finishNode(node, "DeclareModuleExports");
- }
-
- flowParseDeclareTypeAlias(node) {
- this.next();
- this.flowParseTypeAlias(node);
- node.type = "DeclareTypeAlias";
- return node;
- }
-
- flowParseDeclareOpaqueType(node) {
- this.next();
- this.flowParseOpaqueType(node, true);
- node.type = "DeclareOpaqueType";
- return node;
- }
-
- flowParseDeclareInterface(node) {
- this.next();
- this.flowParseInterfaceish(node);
- return this.finishNode(node, "DeclareInterface");
- }
-
- flowParseInterfaceish(node, isClass = false) {
- node.id = this.flowParseRestrictedIdentifier(!isClass);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- }
-
- node.extends = [];
- node.implements = [];
- node.mixins = [];
-
- if (this.eat(types._extends)) {
- do {
- node.extends.push(this.flowParseInterfaceExtends());
- } while (!isClass && this.eat(types.comma));
- }
-
- if (this.isContextual("mixins")) {
- this.next();
-
- do {
- node.mixins.push(this.flowParseInterfaceExtends());
- } while (this.eat(types.comma));
- }
-
- if (this.isContextual("implements")) {
- this.next();
-
- do {
- node.implements.push(this.flowParseInterfaceExtends());
- } while (this.eat(types.comma));
- }
-
- node.body = this.flowParseObjectType({
- allowStatic: isClass,
- allowExact: false,
- allowSpread: false,
- allowProto: isClass,
- allowInexact: false
- });
- }
-
- flowParseInterfaceExtends() {
- const node = this.startNode();
- node.id = this.flowParseQualifiedTypeIdentifier();
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterInstantiation();
- } else {
- node.typeParameters = null;
- }
-
- return this.finishNode(node, "InterfaceExtends");
- }
-
- flowParseInterface(node) {
- this.flowParseInterfaceish(node);
- return this.finishNode(node, "InterfaceDeclaration");
- }
-
- checkNotUnderscore(word) {
- if (word === "_") {
- throw this.unexpected(null, "`_` is only allowed as a type argument to call or new");
- }
- }
-
- checkReservedType(word, startLoc) {
- if (reservedTypes.indexOf(word) > -1) {
- this.raise(startLoc, `Cannot overwrite reserved type ${word}`);
- }
- }
-
- flowParseRestrictedIdentifier(liberal) {
- this.checkReservedType(this.state.value, this.state.start);
- return this.parseIdentifier(liberal);
- }
-
- flowParseTypeAlias(node) {
- node.id = this.flowParseRestrictedIdentifier();
- this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- }
-
- node.right = this.flowParseTypeInitialiser(types.eq);
- this.semicolon();
- return this.finishNode(node, "TypeAlias");
- }
-
- flowParseOpaqueType(node, declare) {
- this.expectContextual("type");
- node.id = this.flowParseRestrictedIdentifier(true);
- this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- } else {
- node.typeParameters = null;
- }
-
- node.supertype = null;
-
- if (this.match(types.colon)) {
- node.supertype = this.flowParseTypeInitialiser(types.colon);
- }
-
- node.impltype = null;
-
- if (!declare) {
- node.impltype = this.flowParseTypeInitialiser(types.eq);
- }
-
- this.semicolon();
- return this.finishNode(node, "OpaqueType");
- }
-
- flowParseTypeParameter(requireDefault = false) {
- const nodeStart = this.state.start;
- const node = this.startNode();
- const variance = this.flowParseVariance();
- const ident = this.flowParseTypeAnnotatableIdentifier();
- node.name = ident.name;
- node.variance = variance;
- node.bound = ident.typeAnnotation;
-
- if (this.match(types.eq)) {
- this.eat(types.eq);
- node.default = this.flowParseType();
- } else {
- if (requireDefault) {
- this.unexpected(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.");
- }
- }
-
- return this.finishNode(node, "TypeParameter");
- }
-
- flowParseTypeParameterDeclaration() {
- const oldInType = this.state.inType;
- const node = this.startNode();
- node.params = [];
- this.state.inType = true;
-
- if (this.isRelational("<") || this.match(types.jsxTagStart)) {
- this.next();
- } else {
- this.unexpected();
- }
-
- let defaultRequired = false;
-
- do {
- const typeParameter = this.flowParseTypeParameter(defaultRequired);
- node.params.push(typeParameter);
-
- if (typeParameter.default) {
- defaultRequired = true;
- }
-
- if (!this.isRelational(">")) {
- this.expect(types.comma);
- }
- } while (!this.isRelational(">"));
-
- this.expectRelational(">");
- this.state.inType = oldInType;
- return this.finishNode(node, "TypeParameterDeclaration");
- }
-
- flowParseTypeParameterInstantiation() {
- const node = this.startNode();
- const oldInType = this.state.inType;
- node.params = [];
- this.state.inType = true;
- this.expectRelational("<");
- const oldNoAnonFunctionType = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = false;
-
- while (!this.isRelational(">")) {
- node.params.push(this.flowParseType());
-
- if (!this.isRelational(">")) {
- this.expect(types.comma);
- }
- }
-
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- this.expectRelational(">");
- this.state.inType = oldInType;
- return this.finishNode(node, "TypeParameterInstantiation");
- }
-
- flowParseTypeParameterInstantiationCallOrNew() {
- const node = this.startNode();
- const oldInType = this.state.inType;
- node.params = [];
- this.state.inType = true;
- this.expectRelational("<");
-
- while (!this.isRelational(">")) {
- node.params.push(this.flowParseTypeOrImplicitInstantiation());
-
- if (!this.isRelational(">")) {
- this.expect(types.comma);
- }
- }
-
- this.expectRelational(">");
- this.state.inType = oldInType;
- return this.finishNode(node, "TypeParameterInstantiation");
- }
-
- flowParseInterfaceType() {
- const node = this.startNode();
- this.expectContextual("interface");
- node.extends = [];
-
- if (this.eat(types._extends)) {
- do {
- node.extends.push(this.flowParseInterfaceExtends());
- } while (this.eat(types.comma));
- }
-
- node.body = this.flowParseObjectType({
- allowStatic: false,
- allowExact: false,
- allowSpread: false,
- allowProto: false,
- allowInexact: false
- });
- return this.finishNode(node, "InterfaceTypeAnnotation");
- }
-
- flowParseObjectPropertyKey() {
- return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
- }
-
- flowParseObjectTypeIndexer(node, isStatic, variance) {
- node.static = isStatic;
-
- if (this.lookahead().type === types.colon) {
- node.id = this.flowParseObjectPropertyKey();
- node.key = this.flowParseTypeInitialiser();
- } else {
- node.id = null;
- node.key = this.flowParseType();
- }
-
- this.expect(types.bracketR);
- node.value = this.flowParseTypeInitialiser();
- node.variance = variance;
- return this.finishNode(node, "ObjectTypeIndexer");
- }
-
- flowParseObjectTypeInternalSlot(node, isStatic) {
- node.static = isStatic;
- node.id = this.flowParseObjectPropertyKey();
- this.expect(types.bracketR);
- this.expect(types.bracketR);
-
- if (this.isRelational("<") || this.match(types.parenL)) {
- node.method = true;
- node.optional = false;
- node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
- } else {
- node.method = false;
-
- if (this.eat(types.question)) {
- node.optional = true;
- }
-
- node.value = this.flowParseTypeInitialiser();
- }
-
- return this.finishNode(node, "ObjectTypeInternalSlot");
- }
-
- flowParseObjectTypeMethodish(node) {
- node.params = [];
- node.rest = null;
- node.typeParameters = null;
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- this.expect(types.parenL);
-
- while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
- node.params.push(this.flowParseFunctionTypeParam());
-
- if (!this.match(types.parenR)) {
- this.expect(types.comma);
- }
- }
-
- if (this.eat(types.ellipsis)) {
- node.rest = this.flowParseFunctionTypeParam();
- }
-
- this.expect(types.parenR);
- node.returnType = this.flowParseTypeInitialiser();
- return this.finishNode(node, "FunctionTypeAnnotation");
- }
-
- flowParseObjectTypeCallProperty(node, isStatic) {
- const valueNode = this.startNode();
- node.static = isStatic;
- node.value = this.flowParseObjectTypeMethodish(valueNode);
- return this.finishNode(node, "ObjectTypeCallProperty");
- }
-
- flowParseObjectType({
- allowStatic,
- allowExact,
- allowSpread,
- allowProto,
- allowInexact
- }) {
- const oldInType = this.state.inType;
- this.state.inType = true;
- const nodeStart = this.startNode();
- nodeStart.callProperties = [];
- nodeStart.properties = [];
- nodeStart.indexers = [];
- nodeStart.internalSlots = [];
- let endDelim;
- let exact;
- let inexact = false;
-
- if (allowExact && this.match(types.braceBarL)) {
- this.expect(types.braceBarL);
- endDelim = types.braceBarR;
- exact = true;
- } else {
- this.expect(types.braceL);
- endDelim = types.braceR;
- exact = false;
- }
-
- nodeStart.exact = exact;
-
- while (!this.match(endDelim)) {
- let isStatic = false;
- let protoStart = null;
- const node = this.startNode();
-
- if (allowProto && this.isContextual("proto")) {
- const lookahead = this.lookahead();
-
- if (lookahead.type !== types.colon && lookahead.type !== types.question) {
- this.next();
- protoStart = this.state.start;
- allowStatic = false;
- }
- }
-
- if (allowStatic && this.isContextual("static")) {
- const lookahead = this.lookahead();
-
- if (lookahead.type !== types.colon && lookahead.type !== types.question) {
- this.next();
- isStatic = true;
- }
- }
-
- const variance = this.flowParseVariance();
-
- if (this.eat(types.bracketL)) {
- if (protoStart != null) {
- this.unexpected(protoStart);
- }
-
- if (this.eat(types.bracketL)) {
- if (variance) {
- this.unexpected(variance.start);
- }
-
- nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
- } else {
- nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
- }
- } else if (this.match(types.parenL) || this.isRelational("<")) {
- if (protoStart != null) {
- this.unexpected(protoStart);
- }
-
- if (variance) {
- this.unexpected(variance.start);
- }
-
- nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
- } else {
- let kind = "init";
-
- if (this.isContextual("get") || this.isContextual("set")) {
- const lookahead = this.lookahead();
-
- if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) {
- kind = this.state.value;
- this.next();
- }
- }
-
- const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact);
-
- if (propOrInexact === null) {
- inexact = true;
- } else {
- nodeStart.properties.push(propOrInexact);
- }
- }
-
- this.flowObjectTypeSemicolon();
- }
-
- this.expect(endDelim);
-
- if (allowSpread) {
- nodeStart.inexact = inexact;
- }
-
- const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
- this.state.inType = oldInType;
- return out;
- }
-
- flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
- if (this.match(types.ellipsis)) {
- if (!allowSpread) {
- this.unexpected(null, "Spread operator cannot appear in class or interface definitions");
- }
-
- if (protoStart != null) {
- this.unexpected(protoStart);
- }
-
- if (variance) {
- this.unexpected(variance.start, "Spread properties cannot have variance");
- }
-
- this.expect(types.ellipsis);
- const isInexactToken = this.eat(types.comma) || this.eat(types.semi);
-
- if (this.match(types.braceR)) {
- if (allowInexact) return null;
- this.unexpected(null, "Explicit inexact syntax is only allowed inside inexact objects");
- }
-
- if (this.match(types.braceBarR)) {
- this.unexpected(null, "Explicit inexact syntax cannot appear inside an explicit exact object type");
- }
-
- if (isInexactToken) {
- this.unexpected(null, "Explicit inexact syntax must appear at the end of an inexact object");
- }
-
- node.argument = this.flowParseType();
- return this.finishNode(node, "ObjectTypeSpreadProperty");
- } else {
- node.key = this.flowParseObjectPropertyKey();
- node.static = isStatic;
- node.proto = protoStart != null;
- node.kind = kind;
- let optional = false;
-
- if (this.isRelational("<") || this.match(types.parenL)) {
- node.method = true;
-
- if (protoStart != null) {
- this.unexpected(protoStart);
- }
-
- if (variance) {
- this.unexpected(variance.start);
- }
-
- node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
-
- if (kind === "get" || kind === "set") {
- this.flowCheckGetterSetterParams(node);
- }
- } else {
- if (kind !== "init") this.unexpected();
- node.method = false;
-
- if (this.eat(types.question)) {
- optional = true;
- }
-
- node.value = this.flowParseTypeInitialiser();
- node.variance = variance;
- }
-
- node.optional = optional;
- return this.finishNode(node, "ObjectTypeProperty");
- }
- }
-
- flowCheckGetterSetterParams(property) {
- const paramCount = property.kind === "get" ? 0 : 1;
- const start = property.start;
- const length = property.value.params.length + (property.value.rest ? 1 : 0);
-
- if (length !== paramCount) {
- if (property.kind === "get") {
- this.raise(start, "getter must not have any formal parameters");
- } else {
- this.raise(start, "setter must have exactly one formal parameter");
- }
- }
-
- if (property.kind === "set" && property.value.rest) {
- this.raise(start, "setter function argument must not be a rest parameter");
- }
- }
-
- flowObjectTypeSemicolon() {
- if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {
- this.unexpected();
- }
- }
-
- flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
- startPos = startPos || this.state.start;
- startLoc = startLoc || this.state.startLoc;
- let node = id || this.parseIdentifier();
-
- while (this.eat(types.dot)) {
- const node2 = this.startNodeAt(startPos, startLoc);
- node2.qualification = node;
- node2.id = this.parseIdentifier();
- node = this.finishNode(node2, "QualifiedTypeIdentifier");
- }
-
- return node;
- }
-
- flowParseGenericType(startPos, startLoc, id) {
- const node = this.startNodeAt(startPos, startLoc);
- node.typeParameters = null;
- node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterInstantiation();
- }
-
- return this.finishNode(node, "GenericTypeAnnotation");
- }
-
- flowParseTypeofType() {
- const node = this.startNode();
- this.expect(types._typeof);
- node.argument = this.flowParsePrimaryType();
- return this.finishNode(node, "TypeofTypeAnnotation");
- }
-
- flowParseTupleType() {
- const node = this.startNode();
- node.types = [];
- this.expect(types.bracketL);
-
- while (this.state.pos < this.length && !this.match(types.bracketR)) {
- node.types.push(this.flowParseType());
- if (this.match(types.bracketR)) break;
- this.expect(types.comma);
- }
-
- this.expect(types.bracketR);
- return this.finishNode(node, "TupleTypeAnnotation");
- }
-
- flowParseFunctionTypeParam() {
- let name = null;
- let optional = false;
- let typeAnnotation = null;
- const node = this.startNode();
- const lh = this.lookahead();
-
- if (lh.type === types.colon || lh.type === types.question) {
- name = this.parseIdentifier();
-
- if (this.eat(types.question)) {
- optional = true;
- }
-
- typeAnnotation = this.flowParseTypeInitialiser();
- } else {
- typeAnnotation = this.flowParseType();
- }
-
- node.name = name;
- node.optional = optional;
- node.typeAnnotation = typeAnnotation;
- return this.finishNode(node, "FunctionTypeParam");
- }
-
- reinterpretTypeAsFunctionTypeParam(type) {
- const node = this.startNodeAt(type.start, type.loc.start);
- node.name = null;
- node.optional = false;
- node.typeAnnotation = type;
- return this.finishNode(node, "FunctionTypeParam");
- }
-
- flowParseFunctionTypeParams(params = []) {
- let rest = null;
-
- while (!this.match(types.parenR) && !this.match(types.ellipsis)) {
- params.push(this.flowParseFunctionTypeParam());
-
- if (!this.match(types.parenR)) {
- this.expect(types.comma);
- }
- }
-
- if (this.eat(types.ellipsis)) {
- rest = this.flowParseFunctionTypeParam();
- }
-
- return {
- params,
- rest
- };
- }
-
- flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
- switch (id.name) {
- case "any":
- return this.finishNode(node, "AnyTypeAnnotation");
-
- case "bool":
- case "boolean":
- return this.finishNode(node, "BooleanTypeAnnotation");
-
- case "mixed":
- return this.finishNode(node, "MixedTypeAnnotation");
-
- case "empty":
- return this.finishNode(node, "EmptyTypeAnnotation");
-
- case "number":
- return this.finishNode(node, "NumberTypeAnnotation");
-
- case "string":
- return this.finishNode(node, "StringTypeAnnotation");
-
- default:
- this.checkNotUnderscore(id.name);
- return this.flowParseGenericType(startPos, startLoc, id);
- }
- }
-
- flowParsePrimaryType() {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const node = this.startNode();
- let tmp;
- let type;
- let isGroupedType = false;
- const oldNoAnonFunctionType = this.state.noAnonFunctionType;
-
- switch (this.state.type) {
- case types.name:
- if (this.isContextual("interface")) {
- return this.flowParseInterfaceType();
- }
-
- return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
-
- case types.braceL:
- return this.flowParseObjectType({
- allowStatic: false,
- allowExact: false,
- allowSpread: true,
- allowProto: false,
- allowInexact: true
- });
-
- case types.braceBarL:
- return this.flowParseObjectType({
- allowStatic: false,
- allowExact: true,
- allowSpread: true,
- allowProto: false,
- allowInexact: false
- });
-
- case types.bracketL:
- this.state.noAnonFunctionType = false;
- type = this.flowParseTupleType();
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- return type;
-
- case types.relational:
- if (this.state.value === "<") {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- this.expect(types.parenL);
- tmp = this.flowParseFunctionTypeParams();
- node.params = tmp.params;
- node.rest = tmp.rest;
- this.expect(types.parenR);
- this.expect(types.arrow);
- node.returnType = this.flowParseType();
- return this.finishNode(node, "FunctionTypeAnnotation");
- }
-
- break;
-
- case types.parenL:
- this.next();
-
- if (!this.match(types.parenR) && !this.match(types.ellipsis)) {
- if (this.match(types.name)) {
- const token = this.lookahead().type;
- isGroupedType = token !== types.question && token !== types.colon;
- } else {
- isGroupedType = true;
- }
- }
-
- if (isGroupedType) {
- this.state.noAnonFunctionType = false;
- type = this.flowParseType();
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
-
- if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {
- this.expect(types.parenR);
- return type;
- } else {
- this.eat(types.comma);
- }
- }
-
- if (type) {
- tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
- } else {
- tmp = this.flowParseFunctionTypeParams();
- }
-
- node.params = tmp.params;
- node.rest = tmp.rest;
- this.expect(types.parenR);
- this.expect(types.arrow);
- node.returnType = this.flowParseType();
- node.typeParameters = null;
- return this.finishNode(node, "FunctionTypeAnnotation");
-
- case types.string:
- return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
-
- case types._true:
- case types._false:
- node.value = this.match(types._true);
- this.next();
- return this.finishNode(node, "BooleanLiteralTypeAnnotation");
-
- case types.plusMin:
- if (this.state.value === "-") {
- this.next();
-
- if (this.match(types.num)) {
- return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
- }
-
- if (this.match(types.bigint)) {
- return this.parseLiteral(-this.state.value, "BigIntLiteralTypeAnnotation", node.start, node.loc.start);
- }
-
- this.unexpected(null, `Unexpected token, expected "number" or "bigint"`);
- }
-
- this.unexpected();
-
- case types.num:
- return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
-
- case types.bigint:
- return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
-
- case types._void:
- this.next();
- return this.finishNode(node, "VoidTypeAnnotation");
-
- case types._null:
- this.next();
- return this.finishNode(node, "NullLiteralTypeAnnotation");
-
- case types._this:
- this.next();
- return this.finishNode(node, "ThisTypeAnnotation");
-
- case types.star:
- this.next();
- return this.finishNode(node, "ExistsTypeAnnotation");
-
- default:
- if (this.state.type.keyword === "typeof") {
- return this.flowParseTypeofType();
- } else if (this.state.type.keyword) {
- const label = this.state.type.label;
- this.next();
- return super.createIdentifier(node, label);
- }
-
- }
-
- throw this.unexpected();
- }
-
- flowParsePostfixType() {
- const startPos = this.state.start,
- startLoc = this.state.startLoc;
- let type = this.flowParsePrimaryType();
-
- while (this.match(types.bracketL) && !this.canInsertSemicolon()) {
- const node = this.startNodeAt(startPos, startLoc);
- node.elementType = type;
- this.expect(types.bracketL);
- this.expect(types.bracketR);
- type = this.finishNode(node, "ArrayTypeAnnotation");
- }
-
- return type;
- }
-
- flowParsePrefixType() {
- const node = this.startNode();
-
- if (this.eat(types.question)) {
- node.typeAnnotation = this.flowParsePrefixType();
- return this.finishNode(node, "NullableTypeAnnotation");
- } else {
- return this.flowParsePostfixType();
- }
- }
-
- flowParseAnonFunctionWithoutParens() {
- const param = this.flowParsePrefixType();
-
- if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {
- const node = this.startNodeAt(param.start, param.loc.start);
- node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
- node.rest = null;
- node.returnType = this.flowParseType();
- node.typeParameters = null;
- return this.finishNode(node, "FunctionTypeAnnotation");
- }
-
- return param;
- }
-
- flowParseIntersectionType() {
- const node = this.startNode();
- this.eat(types.bitwiseAND);
- const type = this.flowParseAnonFunctionWithoutParens();
- node.types = [type];
-
- while (this.eat(types.bitwiseAND)) {
- node.types.push(this.flowParseAnonFunctionWithoutParens());
- }
-
- return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
- }
-
- flowParseUnionType() {
- const node = this.startNode();
- this.eat(types.bitwiseOR);
- const type = this.flowParseIntersectionType();
- node.types = [type];
-
- while (this.eat(types.bitwiseOR)) {
- node.types.push(this.flowParseIntersectionType());
- }
-
- return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
- }
-
- flowParseType() {
- const oldInType = this.state.inType;
- this.state.inType = true;
- const type = this.flowParseUnionType();
- this.state.inType = oldInType;
- this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;
- return type;
- }
-
- flowParseTypeOrImplicitInstantiation() {
- if (this.state.type === types.name && this.state.value === "_") {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const node = this.parseIdentifier();
- return this.flowParseGenericType(startPos, startLoc, node);
- } else {
- return this.flowParseType();
- }
- }
-
- flowParseTypeAnnotation() {
- const node = this.startNode();
- node.typeAnnotation = this.flowParseTypeInitialiser();
- return this.finishNode(node, "TypeAnnotation");
- }
-
- flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
- const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
-
- if (this.match(types.colon)) {
- ident.typeAnnotation = this.flowParseTypeAnnotation();
- this.resetEndLocation(ident);
- }
-
- return ident;
- }
-
- typeCastToParameter(node) {
- node.expression.typeAnnotation = node.typeAnnotation;
- this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
- return node.expression;
- }
-
- flowParseVariance() {
- let variance = null;
-
- if (this.match(types.plusMin)) {
- variance = this.startNode();
-
- if (this.state.value === "+") {
- variance.kind = "plus";
- } else {
- variance.kind = "minus";
- }
-
- this.next();
- this.finishNode(variance, "Variance");
- }
-
- return variance;
- }
-
- parseFunctionBody(node, allowExpressionBody, isMethod = false) {
- if (allowExpressionBody) {
- return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
- }
-
- return super.parseFunctionBody(node, false, isMethod);
- }
-
- parseFunctionBodyAndFinish(node, type, isMethod = false) {
- if (this.match(types.colon)) {
- const typeNode = this.startNode();
- [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
- node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
- }
-
- super.parseFunctionBodyAndFinish(node, type, isMethod);
- }
-
- parseStatement(context, topLevel) {
- if (this.state.strict && this.match(types.name) && this.state.value === "interface") {
- const node = this.startNode();
- this.next();
- return this.flowParseInterface(node);
- } else {
- const stmt = super.parseStatement(context, topLevel);
-
- if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {
- this.flowPragma = null;
- }
-
- return stmt;
- }
- }
-
- parseExpressionStatement(node, expr) {
- if (expr.type === "Identifier") {
- if (expr.name === "declare") {
- if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) {
- return this.flowParseDeclare(node);
- }
- } else if (this.match(types.name)) {
- if (expr.name === "interface") {
- return this.flowParseInterface(node);
- } else if (expr.name === "type") {
- return this.flowParseTypeAlias(node);
- } else if (expr.name === "opaque") {
- return this.flowParseOpaqueType(node, false);
- }
- }
- }
-
- return super.parseExpressionStatement(node, expr);
- }
-
- shouldParseExportDeclaration() {
- return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || super.shouldParseExportDeclaration();
- }
-
- isExportDefaultSpecifier() {
- if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) {
- return false;
- }
-
- return super.isExportDefaultSpecifier();
- }
-
- parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
- if (!this.match(types.question)) return expr;
-
- if (refNeedsArrowPos) {
- const state = this.state.clone();
-
- try {
- return super.parseConditional(expr, noIn, startPos, startLoc);
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- refNeedsArrowPos.start = err.pos || this.state.start;
- return expr;
- } else {
- throw err;
- }
- }
- }
-
- this.expect(types.question);
- const state = this.state.clone();
- const originalNoArrowAt = this.state.noArrowAt;
- const node = this.startNodeAt(startPos, startLoc);
- let {
- consequent,
- failed
- } = this.tryParseConditionalConsequent();
- let [valid, invalid] = this.getArrowLikeExpressions(consequent);
-
- if (failed || invalid.length > 0) {
- const noArrowAt = [...originalNoArrowAt];
-
- if (invalid.length > 0) {
- this.state = state;
- this.state.noArrowAt = noArrowAt;
-
- for (let i = 0; i < invalid.length; i++) {
- noArrowAt.push(invalid[i].start);
- }
-
- ({
- consequent,
- failed
- } = this.tryParseConditionalConsequent());
- [valid, invalid] = this.getArrowLikeExpressions(consequent);
- }
-
- if (failed && valid.length > 1) {
- this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.");
- }
-
- if (failed && valid.length === 1) {
- this.state = state;
- this.state.noArrowAt = noArrowAt.concat(valid[0].start);
- ({
- consequent,
- failed
- } = this.tryParseConditionalConsequent());
- }
-
- this.getArrowLikeExpressions(consequent, true);
- }
-
- this.state.noArrowAt = originalNoArrowAt;
- this.expect(types.colon);
- node.test = expr;
- node.consequent = consequent;
- node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(noIn, undefined, undefined, undefined));
- return this.finishNode(node, "ConditionalExpression");
- }
-
- tryParseConditionalConsequent() {
- this.state.noArrowParamsConversionAt.push(this.state.start);
- const consequent = this.parseMaybeAssign();
- const failed = !this.match(types.colon);
- this.state.noArrowParamsConversionAt.pop();
- return {
- consequent,
- failed
- };
- }
-
- getArrowLikeExpressions(node, disallowInvalid) {
- const stack = [node];
- const arrows = [];
-
- while (stack.length !== 0) {
- const node = stack.pop();
-
- if (node.type === "ArrowFunctionExpression") {
- if (node.typeParameters || !node.returnType) {
- this.toAssignableList(node.params, true, "arrow function parameters");
- this.scope.enter(functionFlags(false, false) | SCOPE_ARROW);
- super.checkParams(node, false, true);
- this.scope.exit();
- } else {
- arrows.push(node);
- }
-
- stack.push(node.body);
- } else if (node.type === "ConditionalExpression") {
- stack.push(node.consequent);
- stack.push(node.alternate);
- }
- }
-
- if (disallowInvalid) {
- for (let i = 0; i < arrows.length; i++) {
- this.toAssignableList(node.params, true, "arrow function parameters");
- }
-
- return [arrows, []];
- }
-
- return partition(arrows, node => {
- try {
- this.toAssignableList(node.params, true, "arrow function parameters");
- return true;
- } catch (err) {
- return false;
- }
- });
- }
-
- forwardNoArrowParamsConversionAt(node, parse) {
- let result;
-
- if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
- this.state.noArrowParamsConversionAt.push(this.state.start);
- result = parse();
- this.state.noArrowParamsConversionAt.pop();
- } else {
- result = parse();
- }
-
- return result;
- }
-
- parseParenItem(node, startPos, startLoc) {
- node = super.parseParenItem(node, startPos, startLoc);
-
- if (this.eat(types.question)) {
- node.optional = true;
- this.resetEndLocation(node);
- }
-
- if (this.match(types.colon)) {
- const typeCastNode = this.startNodeAt(startPos, startLoc);
- typeCastNode.expression = node;
- typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
- return this.finishNode(typeCastNode, "TypeCastExpression");
- }
-
- return node;
- }
-
- assertModuleNodeAllowed(node) {
- if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
- return;
- }
-
- super.assertModuleNodeAllowed(node);
- }
-
- parseExport(node) {
- const decl = super.parseExport(node);
-
- if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
- decl.exportKind = decl.exportKind || "value";
- }
-
- return decl;
- }
-
- parseExportDeclaration(node) {
- if (this.isContextual("type")) {
- node.exportKind = "type";
- const declarationNode = this.startNode();
- this.next();
-
- if (this.match(types.braceL)) {
- node.specifiers = this.parseExportSpecifiers();
- this.parseExportFrom(node);
- return null;
- } else {
- return this.flowParseTypeAlias(declarationNode);
- }
- } else if (this.isContextual("opaque")) {
- node.exportKind = "type";
- const declarationNode = this.startNode();
- this.next();
- return this.flowParseOpaqueType(declarationNode, false);
- } else if (this.isContextual("interface")) {
- node.exportKind = "type";
- const declarationNode = this.startNode();
- this.next();
- return this.flowParseInterface(declarationNode);
- } else {
- return super.parseExportDeclaration(node);
- }
- }
-
- eatExportStar(node) {
- if (super.eatExportStar(...arguments)) return true;
-
- if (this.isContextual("type") && this.lookahead().type === types.star) {
- node.exportKind = "type";
- this.next();
- this.next();
- return true;
- }
-
- return false;
- }
-
- maybeParseExportNamespaceSpecifier(node) {
- const pos = this.state.start;
- const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
-
- if (hasNamespace && node.exportKind === "type") {
- this.unexpected(pos);
- }
-
- return hasNamespace;
- }
-
- parseClassId(node, isStatement, optionalId) {
- super.parseClassId(node, isStatement, optionalId);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- }
- }
-
- getTokenFromCode(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (code === 123 && next === 124) {
- return this.finishOp(types.braceBarL, 2);
- } else if (this.state.inType && (code === 62 || code === 60)) {
- return this.finishOp(types.relational, 1);
- } else if (isIteratorStart(code, next)) {
- this.state.isIterator = true;
- return super.readWord();
- } else {
- return super.getTokenFromCode(code);
- }
- }
-
- toAssignable(node, isBinding, contextDescription) {
- if (node.type === "TypeCastExpression") {
- return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription);
- } else {
- return super.toAssignable(node, isBinding, contextDescription);
- }
- }
-
- toAssignableList(exprList, isBinding, contextDescription) {
- for (let i = 0; i < exprList.length; i++) {
- const expr = exprList[i];
-
- if (expr && expr.type === "TypeCastExpression") {
- exprList[i] = this.typeCastToParameter(expr);
- }
- }
-
- return super.toAssignableList(exprList, isBinding, contextDescription);
- }
-
- toReferencedList(exprList, isParenthesizedExpr) {
- for (let i = 0; i < exprList.length; i++) {
- const expr = exprList[i];
-
- if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
- this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis");
- }
- }
-
- return exprList;
- }
-
- checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) {
- if (expr.type !== "TypeCastExpression") {
- return super.checkLVal(expr, bindingType, checkClashes, contextDescription);
- }
- }
-
- parseClassProperty(node) {
- if (this.match(types.colon)) {
- node.typeAnnotation = this.flowParseTypeAnnotation();
- }
-
- return super.parseClassProperty(node);
- }
-
- parseClassPrivateProperty(node) {
- if (this.match(types.colon)) {
- node.typeAnnotation = this.flowParseTypeAnnotation();
- }
-
- return super.parseClassPrivateProperty(node);
- }
-
- isClassMethod() {
- return this.isRelational("<") || super.isClassMethod();
- }
-
- isClassProperty() {
- return this.match(types.colon) || super.isClassProperty();
- }
-
- isNonstaticConstructor(method) {
- return !this.match(types.colon) && super.isNonstaticConstructor(method);
- }
-
- pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
- if (method.variance) {
- this.unexpected(method.variance.start);
- }
-
- delete method.variance;
-
- if (this.isRelational("<")) {
- method.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
- }
-
- pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- if (method.variance) {
- this.unexpected(method.variance.start);
- }
-
- delete method.variance;
-
- if (this.isRelational("<")) {
- method.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
- }
-
- parseClassSuper(node) {
- super.parseClassSuper(node);
-
- if (node.superClass && this.isRelational("<")) {
- node.superTypeParameters = this.flowParseTypeParameterInstantiation();
- }
-
- if (this.isContextual("implements")) {
- this.next();
- const implemented = node.implements = [];
-
- do {
- const node = this.startNode();
- node.id = this.flowParseRestrictedIdentifier(true);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterInstantiation();
- } else {
- node.typeParameters = null;
- }
-
- implemented.push(this.finishNode(node, "ClassImplements"));
- } while (this.eat(types.comma));
- }
- }
-
- parsePropertyName(node) {
- const variance = this.flowParseVariance();
- const key = super.parsePropertyName(node);
- node.variance = variance;
- return key;
- }
-
- parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {
- if (prop.variance) {
- this.unexpected(prop.variance.start);
- }
-
- delete prop.variance;
- let typeParameters;
-
- if (this.isRelational("<")) {
- typeParameters = this.flowParseTypeParameterDeclaration();
- if (!this.match(types.parenL)) this.unexpected();
- }
-
- super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);
-
- if (typeParameters) {
- (prop.value || prop).typeParameters = typeParameters;
- }
- }
-
- parseAssignableListItemTypes(param) {
- if (this.eat(types.question)) {
- if (param.type !== "Identifier") {
- throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature.");
- }
-
- param.optional = true;
- }
-
- if (this.match(types.colon)) {
- param.typeAnnotation = this.flowParseTypeAnnotation();
- }
-
- this.resetEndLocation(param);
- return param;
- }
-
- parseMaybeDefault(startPos, startLoc, left) {
- const node = super.parseMaybeDefault(startPos, startLoc, left);
-
- if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
- this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`");
- }
-
- return node;
- }
-
- shouldParseDefaultImport(node) {
- if (!hasTypeImportKind(node)) {
- return super.shouldParseDefaultImport(node);
- }
-
- return isMaybeDefaultImport(this.state);
- }
-
- parseImportSpecifierLocal(node, specifier, type, contextDescription) {
- specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier();
- this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription);
- node.specifiers.push(this.finishNode(specifier, type));
- }
-
- maybeParseDefaultImportSpecifier(node) {
- node.importKind = "value";
- let kind = null;
-
- if (this.match(types._typeof)) {
- kind = "typeof";
- } else if (this.isContextual("type")) {
- kind = "type";
- }
-
- if (kind) {
- const lh = this.lookahead();
-
- if (kind === "type" && lh.type === types.star) {
- this.unexpected(lh.start);
- }
-
- if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) {
- this.next();
- node.importKind = kind;
- }
- }
-
- return super.maybeParseDefaultImportSpecifier(node);
- }
-
- parseImportSpecifier(node) {
- const specifier = this.startNode();
- const firstIdentLoc = this.state.start;
- const firstIdent = this.parseIdentifier(true);
- let specifierTypeKind = null;
-
- if (firstIdent.name === "type") {
- specifierTypeKind = "type";
- } else if (firstIdent.name === "typeof") {
- specifierTypeKind = "typeof";
- }
-
- let isBinding = false;
-
- if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
- const as_ident = this.parseIdentifier(true);
-
- if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {
- specifier.imported = as_ident;
- specifier.importKind = specifierTypeKind;
- specifier.local = as_ident.__clone();
- } else {
- specifier.imported = firstIdent;
- specifier.importKind = null;
- specifier.local = this.parseIdentifier();
- }
- } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {
- specifier.imported = this.parseIdentifier(true);
- specifier.importKind = specifierTypeKind;
-
- if (this.eatContextual("as")) {
- specifier.local = this.parseIdentifier();
- } else {
- isBinding = true;
- specifier.local = specifier.imported.__clone();
- }
- } else {
- isBinding = true;
- specifier.imported = firstIdent;
- specifier.importKind = null;
- specifier.local = specifier.imported.__clone();
- }
-
- const nodeIsTypeImport = hasTypeImportKind(node);
- const specifierIsTypeImport = hasTypeImportKind(specifier);
-
- if (nodeIsTypeImport && specifierIsTypeImport) {
- this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements");
- }
-
- if (nodeIsTypeImport || specifierIsTypeImport) {
- this.checkReservedType(specifier.local.name, specifier.local.start);
- }
-
- if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
- this.checkReservedWord(specifier.local.name, specifier.start, true, true);
- }
-
- this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier");
- node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
- }
-
- parseFunctionParams(node, allowModifiers) {
- const kind = node.kind;
-
- if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
- node.typeParameters = this.flowParseTypeParameterDeclaration();
- }
-
- super.parseFunctionParams(node, allowModifiers);
- }
-
- parseVarId(decl, kind) {
- super.parseVarId(decl, kind);
-
- if (this.match(types.colon)) {
- decl.id.typeAnnotation = this.flowParseTypeAnnotation();
- this.resetEndLocation(decl.id);
- }
- }
-
- parseAsyncArrowFromCallExpression(node, call) {
- if (this.match(types.colon)) {
- const oldNoAnonFunctionType = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = true;
- node.returnType = this.flowParseTypeAnnotation();
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- }
-
- return super.parseAsyncArrowFromCallExpression(node, call);
- }
-
- shouldParseAsyncArrow() {
- return this.match(types.colon) || super.shouldParseAsyncArrow();
- }
-
- parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
- let jsxError = null;
-
- if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) {
- const state = this.state.clone();
-
- try {
- return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- const cLength = this.state.context.length;
-
- if (this.state.context[cLength - 1] === types$1.j_oTag) {
- this.state.context.length -= 2;
- }
-
- jsxError = err;
- } else {
- throw err;
- }
- }
- }
-
- if (jsxError != null || this.isRelational("<")) {
- let arrowExpression;
- let typeParameters;
-
- try {
- typeParameters = this.flowParseTypeParameterDeclaration();
- arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos));
- arrowExpression.typeParameters = typeParameters;
- this.resetStartLocationFromNode(arrowExpression, typeParameters);
- } catch (err) {
- throw jsxError || err;
- }
-
- if (arrowExpression.type === "ArrowFunctionExpression") {
- return arrowExpression;
- } else if (jsxError != null) {
- throw jsxError;
- } else {
- this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration");
- }
- }
-
- return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);
- }
-
- parseArrow(node) {
- if (this.match(types.colon)) {
- const state = this.state.clone();
-
- try {
- const oldNoAnonFunctionType = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = true;
- const typeNode = this.startNode();
- [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
- this.state.noAnonFunctionType = oldNoAnonFunctionType;
- if (this.canInsertSemicolon()) this.unexpected();
- if (!this.match(types.arrow)) this.unexpected();
- node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- } else {
- throw err;
- }
- }
- }
-
- return super.parseArrow(node);
- }
-
- shouldParseArrow() {
- return this.match(types.colon) || super.shouldParseArrow();
- }
-
- setArrowFunctionParameters(node, params) {
- if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
- node.params = params;
- } else {
- super.setArrowFunctionParameters(node, params);
- }
- }
-
- checkParams(node, allowDuplicates, isArrowFunction) {
- if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
- return;
- }
-
- return super.checkParams(node, allowDuplicates, isArrowFunction);
- }
-
- parseParenAndDistinguishExpression(canBeArrow) {
- return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
- }
-
- parseSubscripts(base, startPos, startLoc, noCalls) {
- if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
- this.next();
- const node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
- base = this.finishNode(node, "CallExpression");
- } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) {
- const state = this.state.clone();
- let error;
-
- try {
- const node = this.parseAsyncArrowWithTypeParameters(startPos, startLoc);
- if (node) return node;
- } catch (e) {
- error = e;
- }
-
- this.state = state;
-
- try {
- return super.parseSubscripts(base, startPos, startLoc, noCalls);
- } catch (e) {
- throw error || e;
- }
- }
-
- return super.parseSubscripts(base, startPos, startLoc, noCalls);
- }
-
- parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow) {
- if (this.match(types.questionDot) && this.isLookaheadRelational("<")) {
- this.expectPlugin("optionalChaining");
- subscriptState.optionalChainMember = true;
-
- if (noCalls) {
- subscriptState.stop = true;
- return base;
- }
-
- this.next();
- const node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- node.typeArguments = this.flowParseTypeParameterInstantiation();
- this.expect(types.parenL);
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
- node.optional = true;
- return this.finishNode(node, "OptionalCallExpression");
- } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
- const node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- const state = this.state.clone();
-
- try {
- node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
- this.expect(types.parenL);
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
-
- if (subscriptState.optionalChainMember) {
- node.optional = false;
- return this.finishNode(node, "OptionalCallExpression");
- }
-
- return this.finishNode(node, "CallExpression");
- } catch (e) {
- if (e instanceof SyntaxError) {
- this.state = state;
- } else {
- throw e;
- }
- }
- }
-
- return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow);
- }
-
- parseNewArguments(node) {
- let targs = null;
-
- if (this.shouldParseTypes() && this.isRelational("<")) {
- const state = this.state.clone();
-
- try {
- targs = this.flowParseTypeParameterInstantiationCallOrNew();
- } catch (e) {
- if (e instanceof SyntaxError) {
- this.state = state;
- } else {
- throw e;
- }
- }
- }
-
- node.typeArguments = targs;
- super.parseNewArguments(node);
- }
-
- parseAsyncArrowWithTypeParameters(startPos, startLoc) {
- const node = this.startNodeAt(startPos, startLoc);
- this.parseFunctionParams(node);
- if (!this.parseArrow(node)) return;
- return this.parseArrowExpression(node, undefined, true);
- }
-
- readToken_mult_modulo(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (code === 42 && next === 47 && this.state.hasFlowComment) {
- this.state.hasFlowComment = false;
- this.state.pos += 2;
- this.nextToken();
- return;
- }
-
- super.readToken_mult_modulo(code);
- }
-
- readToken_pipe_amp(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (code === 124 && next === 125) {
- this.finishOp(types.braceBarR, 2);
- return;
- }
-
- super.readToken_pipe_amp(code);
- }
-
- parseTopLevel(file, program) {
- const fileNode = super.parseTopLevel(file, program);
-
- if (this.state.hasFlowComment) {
- this.unexpected(null, "Unterminated flow-comment");
- }
-
- return fileNode;
- }
-
- skipBlockComment() {
- if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
- if (this.state.hasFlowComment) {
- this.unexpected(null, "Cannot have a flow comment inside another flow comment");
- }
-
- this.hasFlowCommentCompletion();
- this.state.pos += this.skipFlowComment();
- this.state.hasFlowComment = true;
- return;
- }
-
- if (this.state.hasFlowComment) {
- const end = this.input.indexOf("*-/", this.state.pos += 2);
- if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
- this.state.pos = end + 3;
- return;
- }
-
- super.skipBlockComment();
- }
-
- skipFlowComment() {
- const {
- pos
- } = this.state;
- let shiftToFirstNonWhiteSpace = 2;
-
- while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
- shiftToFirstNonWhiteSpace++;
- }
-
- const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
- const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
-
- if (ch2 === 58 && ch3 === 58) {
- return shiftToFirstNonWhiteSpace + 2;
- }
-
- if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
- return shiftToFirstNonWhiteSpace + 12;
- }
-
- if (ch2 === 58 && ch3 !== 58) {
- return shiftToFirstNonWhiteSpace;
- }
-
- return false;
- }
-
- hasFlowCommentCompletion() {
- const end = this.input.indexOf("*/", this.state.pos);
-
- if (end === -1) {
- this.raise(this.state.pos, "Unterminated comment");
- }
- }
-
-});
-
-const entities = {
- quot: "\u0022",
- amp: "&",
- apos: "\u0027",
- lt: "<",
- gt: ">",
- nbsp: "\u00A0",
- iexcl: "\u00A1",
- cent: "\u00A2",
- pound: "\u00A3",
- curren: "\u00A4",
- yen: "\u00A5",
- brvbar: "\u00A6",
- sect: "\u00A7",
- uml: "\u00A8",
- copy: "\u00A9",
- ordf: "\u00AA",
- laquo: "\u00AB",
- not: "\u00AC",
- shy: "\u00AD",
- reg: "\u00AE",
- macr: "\u00AF",
- deg: "\u00B0",
- plusmn: "\u00B1",
- sup2: "\u00B2",
- sup3: "\u00B3",
- acute: "\u00B4",
- micro: "\u00B5",
- para: "\u00B6",
- middot: "\u00B7",
- cedil: "\u00B8",
- sup1: "\u00B9",
- ordm: "\u00BA",
- raquo: "\u00BB",
- frac14: "\u00BC",
- frac12: "\u00BD",
- frac34: "\u00BE",
- iquest: "\u00BF",
- Agrave: "\u00C0",
- Aacute: "\u00C1",
- Acirc: "\u00C2",
- Atilde: "\u00C3",
- Auml: "\u00C4",
- Aring: "\u00C5",
- AElig: "\u00C6",
- Ccedil: "\u00C7",
- Egrave: "\u00C8",
- Eacute: "\u00C9",
- Ecirc: "\u00CA",
- Euml: "\u00CB",
- Igrave: "\u00CC",
- Iacute: "\u00CD",
- Icirc: "\u00CE",
- Iuml: "\u00CF",
- ETH: "\u00D0",
- Ntilde: "\u00D1",
- Ograve: "\u00D2",
- Oacute: "\u00D3",
- Ocirc: "\u00D4",
- Otilde: "\u00D5",
- Ouml: "\u00D6",
- times: "\u00D7",
- Oslash: "\u00D8",
- Ugrave: "\u00D9",
- Uacute: "\u00DA",
- Ucirc: "\u00DB",
- Uuml: "\u00DC",
- Yacute: "\u00DD",
- THORN: "\u00DE",
- szlig: "\u00DF",
- agrave: "\u00E0",
- aacute: "\u00E1",
- acirc: "\u00E2",
- atilde: "\u00E3",
- auml: "\u00E4",
- aring: "\u00E5",
- aelig: "\u00E6",
- ccedil: "\u00E7",
- egrave: "\u00E8",
- eacute: "\u00E9",
- ecirc: "\u00EA",
- euml: "\u00EB",
- igrave: "\u00EC",
- iacute: "\u00ED",
- icirc: "\u00EE",
- iuml: "\u00EF",
- eth: "\u00F0",
- ntilde: "\u00F1",
- ograve: "\u00F2",
- oacute: "\u00F3",
- ocirc: "\u00F4",
- otilde: "\u00F5",
- ouml: "\u00F6",
- divide: "\u00F7",
- oslash: "\u00F8",
- ugrave: "\u00F9",
- uacute: "\u00FA",
- ucirc: "\u00FB",
- uuml: "\u00FC",
- yacute: "\u00FD",
- thorn: "\u00FE",
- yuml: "\u00FF",
- OElig: "\u0152",
- oelig: "\u0153",
- Scaron: "\u0160",
- scaron: "\u0161",
- Yuml: "\u0178",
- fnof: "\u0192",
- circ: "\u02C6",
- tilde: "\u02DC",
- Alpha: "\u0391",
- Beta: "\u0392",
- Gamma: "\u0393",
- Delta: "\u0394",
- Epsilon: "\u0395",
- Zeta: "\u0396",
- Eta: "\u0397",
- Theta: "\u0398",
- Iota: "\u0399",
- Kappa: "\u039A",
- Lambda: "\u039B",
- Mu: "\u039C",
- Nu: "\u039D",
- Xi: "\u039E",
- Omicron: "\u039F",
- Pi: "\u03A0",
- Rho: "\u03A1",
- Sigma: "\u03A3",
- Tau: "\u03A4",
- Upsilon: "\u03A5",
- Phi: "\u03A6",
- Chi: "\u03A7",
- Psi: "\u03A8",
- Omega: "\u03A9",
- alpha: "\u03B1",
- beta: "\u03B2",
- gamma: "\u03B3",
- delta: "\u03B4",
- epsilon: "\u03B5",
- zeta: "\u03B6",
- eta: "\u03B7",
- theta: "\u03B8",
- iota: "\u03B9",
- kappa: "\u03BA",
- lambda: "\u03BB",
- mu: "\u03BC",
- nu: "\u03BD",
- xi: "\u03BE",
- omicron: "\u03BF",
- pi: "\u03C0",
- rho: "\u03C1",
- sigmaf: "\u03C2",
- sigma: "\u03C3",
- tau: "\u03C4",
- upsilon: "\u03C5",
- phi: "\u03C6",
- chi: "\u03C7",
- psi: "\u03C8",
- omega: "\u03C9",
- thetasym: "\u03D1",
- upsih: "\u03D2",
- piv: "\u03D6",
- ensp: "\u2002",
- emsp: "\u2003",
- thinsp: "\u2009",
- zwnj: "\u200C",
- zwj: "\u200D",
- lrm: "\u200E",
- rlm: "\u200F",
- ndash: "\u2013",
- mdash: "\u2014",
- lsquo: "\u2018",
- rsquo: "\u2019",
- sbquo: "\u201A",
- ldquo: "\u201C",
- rdquo: "\u201D",
- bdquo: "\u201E",
- dagger: "\u2020",
- Dagger: "\u2021",
- bull: "\u2022",
- hellip: "\u2026",
- permil: "\u2030",
- prime: "\u2032",
- Prime: "\u2033",
- lsaquo: "\u2039",
- rsaquo: "\u203A",
- oline: "\u203E",
- frasl: "\u2044",
- euro: "\u20AC",
- image: "\u2111",
- weierp: "\u2118",
- real: "\u211C",
- trade: "\u2122",
- alefsym: "\u2135",
- larr: "\u2190",
- uarr: "\u2191",
- rarr: "\u2192",
- darr: "\u2193",
- harr: "\u2194",
- crarr: "\u21B5",
- lArr: "\u21D0",
- uArr: "\u21D1",
- rArr: "\u21D2",
- dArr: "\u21D3",
- hArr: "\u21D4",
- forall: "\u2200",
- part: "\u2202",
- exist: "\u2203",
- empty: "\u2205",
- nabla: "\u2207",
- isin: "\u2208",
- notin: "\u2209",
- ni: "\u220B",
- prod: "\u220F",
- sum: "\u2211",
- minus: "\u2212",
- lowast: "\u2217",
- radic: "\u221A",
- prop: "\u221D",
- infin: "\u221E",
- ang: "\u2220",
- and: "\u2227",
- or: "\u2228",
- cap: "\u2229",
- cup: "\u222A",
- int: "\u222B",
- there4: "\u2234",
- sim: "\u223C",
- cong: "\u2245",
- asymp: "\u2248",
- ne: "\u2260",
- equiv: "\u2261",
- le: "\u2264",
- ge: "\u2265",
- sub: "\u2282",
- sup: "\u2283",
- nsub: "\u2284",
- sube: "\u2286",
- supe: "\u2287",
- oplus: "\u2295",
- otimes: "\u2297",
- perp: "\u22A5",
- sdot: "\u22C5",
- lceil: "\u2308",
- rceil: "\u2309",
- lfloor: "\u230A",
- rfloor: "\u230B",
- lang: "\u2329",
- rang: "\u232A",
- loz: "\u25CA",
- spades: "\u2660",
- clubs: "\u2663",
- hearts: "\u2665",
- diams: "\u2666"
-};
-
-const HEX_NUMBER = /^[\da-fA-F]+$/;
-const DECIMAL_NUMBER = /^\d+$/;
-types$1.j_oTag = new TokContext("<tag", false);
-types$1.j_cTag = new TokContext("</tag", false);
-types$1.j_expr = new TokContext("<tag>...</tag>", true, true);
-types.jsxName = new TokenType("jsxName");
-types.jsxText = new TokenType("jsxText", {
- beforeExpr: true
-});
-types.jsxTagStart = new TokenType("jsxTagStart", {
- startsExpr: true
-});
-types.jsxTagEnd = new TokenType("jsxTagEnd");
-
-types.jsxTagStart.updateContext = function () {
- this.state.context.push(types$1.j_expr);
- this.state.context.push(types$1.j_oTag);
- this.state.exprAllowed = false;
-};
-
-types.jsxTagEnd.updateContext = function (prevType) {
- const out = this.state.context.pop();
-
- if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {
- this.state.context.pop();
- this.state.exprAllowed = this.curContext() === types$1.j_expr;
- } else {
- this.state.exprAllowed = true;
- }
-};
-
-function isFragment(object) {
- return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
-}
-
-function getQualifiedJSXName(object) {
- if (object.type === "JSXIdentifier") {
- return object.name;
- }
-
- if (object.type === "JSXNamespacedName") {
- return object.namespace.name + ":" + object.name.name;
- }
-
- if (object.type === "JSXMemberExpression") {
- return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
- }
-
- throw new Error("Node had unexpected type: " + object.type);
-}
-
-var jsx = (superClass => class extends superClass {
- jsxReadToken() {
- let out = "";
- let chunkStart = this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.length) {
- this.raise(this.state.start, "Unterminated JSX contents");
- }
-
- const ch = this.input.charCodeAt(this.state.pos);
-
- switch (ch) {
- case 60:
- case 123:
- if (this.state.pos === this.state.start) {
- if (ch === 60 && this.state.exprAllowed) {
- ++this.state.pos;
- return this.finishToken(types.jsxTagStart);
- }
-
- return super.getTokenFromCode(ch);
- }
-
- out += this.input.slice(chunkStart, this.state.pos);
- return this.finishToken(types.jsxText, out);
-
- case 38:
- out += this.input.slice(chunkStart, this.state.pos);
- out += this.jsxReadEntity();
- chunkStart = this.state.pos;
- break;
-
- default:
- if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.state.pos);
- out += this.jsxReadNewLine(true);
- chunkStart = this.state.pos;
- } else {
- ++this.state.pos;
- }
-
- }
- }
- }
-
- jsxReadNewLine(normalizeCRLF) {
- const ch = this.input.charCodeAt(this.state.pos);
- let out;
- ++this.state.pos;
-
- if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
- ++this.state.pos;
- out = normalizeCRLF ? "\n" : "\r\n";
- } else {
- out = String.fromCharCode(ch);
- }
-
- ++this.state.curLine;
- this.state.lineStart = this.state.pos;
- return out;
- }
-
- jsxReadString(quote) {
- let out = "";
- let chunkStart = ++this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.length) {
- this.raise(this.state.start, "Unterminated string constant");
- }
-
- const ch = this.input.charCodeAt(this.state.pos);
- if (ch === quote) break;
-
- if (ch === 38) {
- out += this.input.slice(chunkStart, this.state.pos);
- out += this.jsxReadEntity();
- chunkStart = this.state.pos;
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.state.pos);
- out += this.jsxReadNewLine(false);
- chunkStart = this.state.pos;
- } else {
- ++this.state.pos;
- }
- }
-
- out += this.input.slice(chunkStart, this.state.pos++);
- return this.finishToken(types.string, out);
- }
-
- jsxReadEntity() {
- let str = "";
- let count = 0;
- let entity;
- let ch = this.input[this.state.pos];
- const startPos = ++this.state.pos;
-
- while (this.state.pos < this.length && count++ < 10) {
- ch = this.input[this.state.pos++];
-
- if (ch === ";") {
- if (str[0] === "#") {
- if (str[1] === "x") {
- str = str.substr(2);
-
- if (HEX_NUMBER.test(str)) {
- entity = String.fromCodePoint(parseInt(str, 16));
- }
- } else {
- str = str.substr(1);
-
- if (DECIMAL_NUMBER.test(str)) {
- entity = String.fromCodePoint(parseInt(str, 10));
- }
- }
- } else {
- entity = entities[str];
- }
-
- break;
- }
-
- str += ch;
- }
-
- if (!entity) {
- this.state.pos = startPos;
- return "&";
- }
-
- return entity;
- }
-
- jsxReadWord() {
- let ch;
- const start = this.state.pos;
-
- do {
- ch = this.input.charCodeAt(++this.state.pos);
- } while (isIdentifierChar(ch) || ch === 45);
-
- return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));
- }
-
- jsxParseIdentifier() {
- const node = this.startNode();
-
- if (this.match(types.jsxName)) {
- node.name = this.state.value;
- } else if (this.state.type.keyword) {
- node.name = this.state.type.keyword;
- } else {
- this.unexpected();
- }
-
- this.next();
- return this.finishNode(node, "JSXIdentifier");
- }
-
- jsxParseNamespacedName() {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const name = this.jsxParseIdentifier();
- if (!this.eat(types.colon)) return name;
- const node = this.startNodeAt(startPos, startLoc);
- node.namespace = name;
- node.name = this.jsxParseIdentifier();
- return this.finishNode(node, "JSXNamespacedName");
- }
-
- jsxParseElementName() {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- let node = this.jsxParseNamespacedName();
-
- while (this.eat(types.dot)) {
- const newNode = this.startNodeAt(startPos, startLoc);
- newNode.object = node;
- newNode.property = this.jsxParseIdentifier();
- node = this.finishNode(newNode, "JSXMemberExpression");
- }
-
- return node;
- }
-
- jsxParseAttributeValue() {
- let node;
-
- switch (this.state.type) {
- case types.braceL:
- node = this.startNode();
- this.next();
- node = this.jsxParseExpressionContainer(node);
-
- if (node.expression.type === "JSXEmptyExpression") {
- throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression");
- } else {
- return node;
- }
-
- case types.jsxTagStart:
- case types.string:
- return this.parseExprAtom();
-
- default:
- throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text");
- }
- }
-
- jsxParseEmptyExpression() {
- const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
- return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
- }
-
- jsxParseSpreadChild(node) {
- this.next();
- node.expression = this.parseExpression();
- this.expect(types.braceR);
- return this.finishNode(node, "JSXSpreadChild");
- }
-
- jsxParseExpressionContainer(node) {
- if (this.match(types.braceR)) {
- node.expression = this.jsxParseEmptyExpression();
- } else {
- node.expression = this.parseExpression();
- }
-
- this.expect(types.braceR);
- return this.finishNode(node, "JSXExpressionContainer");
- }
-
- jsxParseAttribute() {
- const node = this.startNode();
-
- if (this.eat(types.braceL)) {
- this.expect(types.ellipsis);
- node.argument = this.parseMaybeAssign();
- this.expect(types.braceR);
- return this.finishNode(node, "JSXSpreadAttribute");
- }
-
- node.name = this.jsxParseNamespacedName();
- node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;
- return this.finishNode(node, "JSXAttribute");
- }
-
- jsxParseOpeningElementAt(startPos, startLoc) {
- const node = this.startNodeAt(startPos, startLoc);
-
- if (this.match(types.jsxTagEnd)) {
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXOpeningFragment");
- }
-
- node.name = this.jsxParseElementName();
- return this.jsxParseOpeningElementAfterName(node);
- }
-
- jsxParseOpeningElementAfterName(node) {
- const attributes = [];
-
- while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {
- attributes.push(this.jsxParseAttribute());
- }
-
- node.attributes = attributes;
- node.selfClosing = this.eat(types.slash);
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXOpeningElement");
- }
-
- jsxParseClosingElementAt(startPos, startLoc) {
- const node = this.startNodeAt(startPos, startLoc);
-
- if (this.match(types.jsxTagEnd)) {
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXClosingFragment");
- }
-
- node.name = this.jsxParseElementName();
- this.expect(types.jsxTagEnd);
- return this.finishNode(node, "JSXClosingElement");
- }
-
- jsxParseElementAt(startPos, startLoc) {
- const node = this.startNodeAt(startPos, startLoc);
- const children = [];
- const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
- let closingElement = null;
-
- if (!openingElement.selfClosing) {
- contents: for (;;) {
- switch (this.state.type) {
- case types.jsxTagStart:
- startPos = this.state.start;
- startLoc = this.state.startLoc;
- this.next();
-
- if (this.eat(types.slash)) {
- closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
- break contents;
- }
-
- children.push(this.jsxParseElementAt(startPos, startLoc));
- break;
-
- case types.jsxText:
- children.push(this.parseExprAtom());
- break;
-
- case types.braceL:
- {
- const node = this.startNode();
- this.next();
-
- if (this.match(types.ellipsis)) {
- children.push(this.jsxParseSpreadChild(node));
- } else {
- children.push(this.jsxParseExpressionContainer(node));
- }
-
- break;
- }
-
- default:
- throw this.unexpected();
- }
- }
-
- if (isFragment(openingElement) && !isFragment(closingElement)) {
- this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>");
- } else if (!isFragment(openingElement) && isFragment(closingElement)) {
- this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
- } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
- if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
- this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">");
- }
- }
- }
-
- if (isFragment(openingElement)) {
- node.openingFragment = openingElement;
- node.closingFragment = closingElement;
- } else {
- node.openingElement = openingElement;
- node.closingElement = closingElement;
- }
-
- node.children = children;
-
- if (this.match(types.relational) && this.state.value === "<") {
- this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...</>?");
- }
-
- return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
- }
-
- jsxParseElement() {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- this.next();
- return this.jsxParseElementAt(startPos, startLoc);
- }
-
- parseExprAtom(refShortHandDefaultPos) {
- if (this.match(types.jsxText)) {
- return this.parseLiteral(this.state.value, "JSXText");
- } else if (this.match(types.jsxTagStart)) {
- return this.jsxParseElement();
- } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
- this.finishToken(types.jsxTagStart);
- return this.jsxParseElement();
- } else {
- return super.parseExprAtom(refShortHandDefaultPos);
- }
- }
-
- getTokenFromCode(code) {
- if (this.state.inPropertyName) return super.getTokenFromCode(code);
- const context = this.curContext();
-
- if (context === types$1.j_expr) {
- return this.jsxReadToken();
- }
-
- if (context === types$1.j_oTag || context === types$1.j_cTag) {
- if (isIdentifierStart(code)) {
- return this.jsxReadWord();
- }
-
- if (code === 62) {
- ++this.state.pos;
- return this.finishToken(types.jsxTagEnd);
- }
-
- if ((code === 34 || code === 39) && context === types$1.j_oTag) {
- return this.jsxReadString(code);
- }
- }
-
- if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
- ++this.state.pos;
- return this.finishToken(types.jsxTagStart);
- }
-
- return super.getTokenFromCode(code);
- }
-
- updateContext(prevType) {
- if (this.match(types.braceL)) {
- const curContext = this.curContext();
-
- if (curContext === types$1.j_oTag) {
- this.state.context.push(types$1.braceExpression);
- } else if (curContext === types$1.j_expr) {
- this.state.context.push(types$1.templateQuasi);
- } else {
- super.updateContext(prevType);
- }
-
- this.state.exprAllowed = true;
- } else if (this.match(types.slash) && prevType === types.jsxTagStart) {
- this.state.context.length -= 2;
- this.state.context.push(types$1.j_cTag);
- this.state.exprAllowed = false;
- } else {
- return super.updateContext(prevType);
- }
- }
-
-});
-
-class Scope {
- constructor(flags) {
- this.var = [];
- this.lexical = [];
- this.functions = [];
- this.flags = flags;
- }
-
-}
-class ScopeHandler {
- constructor(raise, inModule) {
- this.scopeStack = [];
- this.undefinedExports = new Map();
- this.raise = raise;
- this.inModule = inModule;
- }
-
- get inFunction() {
- return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
- }
-
- get inGenerator() {
- return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
- }
-
- get inAsync() {
- return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
- }
-
- get allowSuper() {
- return (this.currentThisScope().flags & SCOPE_SUPER) > 0;
- }
-
- get allowDirectSuper() {
- return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
- }
-
- get inNonArrowFunction() {
- return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;
- }
-
- get treatFunctionsAsVar() {
- return this.treatFunctionsAsVarInScope(this.currentScope());
- }
-
- createScope(flags) {
- return new Scope(flags);
- }
-
- enter(flags) {
- this.scopeStack.push(this.createScope(flags));
- }
-
- exit() {
- this.scopeStack.pop();
- }
-
- treatFunctionsAsVarInScope(scope) {
- return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM);
- }
-
- declareName(name, bindingType, pos) {
- let scope = this.currentScope();
-
- if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
- this.checkRedeclarationInScope(scope, name, bindingType, pos);
-
- if (bindingType & BIND_SCOPE_FUNCTION) {
- scope.functions.push(name);
- } else {
- scope.lexical.push(name);
- }
-
- if (bindingType & BIND_SCOPE_LEXICAL) {
- this.maybeExportDefined(scope, name);
- }
- } else if (bindingType & BIND_SCOPE_VAR) {
- for (let i = this.scopeStack.length - 1; i >= 0; --i) {
- scope = this.scopeStack[i];
- this.checkRedeclarationInScope(scope, name, bindingType, pos);
- scope.var.push(name);
- this.maybeExportDefined(scope, name);
- if (scope.flags & SCOPE_VAR) break;
- }
- }
-
- if (this.inModule && scope.flags & SCOPE_PROGRAM) {
- this.undefinedExports.delete(name);
- }
- }
-
- maybeExportDefined(scope, name) {
- if (this.inModule && scope.flags & SCOPE_PROGRAM) {
- this.undefinedExports.delete(name);
- }
- }
-
- checkRedeclarationInScope(scope, name, bindingType, pos) {
- if (this.isRedeclaredInScope(scope, name, bindingType)) {
- this.raise(pos, `Identifier '${name}' has already been declared`);
- }
- }
-
- isRedeclaredInScope(scope, name, bindingType) {
- if (!(bindingType & BIND_KIND_VALUE)) return false;
-
- if (bindingType & BIND_SCOPE_LEXICAL) {
- return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
- }
-
- if (bindingType & BIND_SCOPE_FUNCTION) {
- return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name) > -1;
- }
-
- return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1;
- }
-
- checkLocalExport(id) {
- if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) {
- this.undefinedExports.set(id.name, id.start);
- }
- }
-
- currentScope() {
- return this.scopeStack[this.scopeStack.length - 1];
- }
-
- currentVarScope() {
- for (let i = this.scopeStack.length - 1;; i--) {
- const scope = this.scopeStack[i];
-
- if (scope.flags & SCOPE_VAR) {
- return scope;
- }
- }
- }
-
- currentThisScope() {
- for (let i = this.scopeStack.length - 1;; i--) {
- const scope = this.scopeStack[i];
-
- if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) {
- return scope;
- }
- }
- }
-
-}
-
-class TypeScriptScope extends Scope {
- constructor(...args) {
- super(...args);
- this.types = [];
- this.enums = [];
- this.constEnums = [];
- this.classes = [];
- this.exportOnlyBindings = [];
- }
-
-}
-
-class TypeScriptScopeHandler extends ScopeHandler {
- createScope(flags) {
- return new TypeScriptScope(flags);
- }
-
- declareName(name, bindingType, pos) {
- const scope = this.currentScope();
-
- if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
- this.maybeExportDefined(scope, name);
- scope.exportOnlyBindings.push(name);
- return;
- }
-
- super.declareName(...arguments);
-
- if (bindingType & BIND_KIND_TYPE) {
- if (!(bindingType & BIND_KIND_VALUE)) {
- this.checkRedeclarationInScope(scope, name, bindingType, pos);
- this.maybeExportDefined(scope, name);
- }
-
- scope.types.push(name);
- }
-
- if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name);
- if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name);
- if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name);
- }
-
- isRedeclaredInScope(scope, name, bindingType) {
- if (scope.enums.indexOf(name) > -1) {
- if (bindingType & BIND_FLAGS_TS_ENUM) {
- const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
- const wasConst = scope.constEnums.indexOf(name) > -1;
- return isConst !== wasConst;
- }
-
- return true;
- }
-
- if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) {
- if (scope.lexical.indexOf(name) > -1) {
- return !!(bindingType & BIND_KIND_VALUE);
- } else {
- return false;
- }
- }
-
- if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) {
- return true;
- }
-
- return super.isRedeclaredInScope(...arguments);
- }
-
- checkLocalExport(id) {
- if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) {
- super.checkLocalExport(id);
- }
- }
-
-}
-
-function nonNull(x) {
- if (x == null) {
- throw new Error(`Unexpected ${x} value.`);
- }
-
- return x;
-}
-
-function assert(x) {
- if (!x) {
- throw new Error("Assert fail");
- }
-}
-
-function keywordTypeFromName(value) {
- switch (value) {
- case "any":
- return "TSAnyKeyword";
-
- case "boolean":
- return "TSBooleanKeyword";
-
- case "bigint":
- return "TSBigIntKeyword";
-
- case "never":
- return "TSNeverKeyword";
-
- case "number":
- return "TSNumberKeyword";
-
- case "object":
- return "TSObjectKeyword";
-
- case "string":
- return "TSStringKeyword";
-
- case "symbol":
- return "TSSymbolKeyword";
-
- case "undefined":
- return "TSUndefinedKeyword";
-
- case "unknown":
- return "TSUnknownKeyword";
-
- default:
- return undefined;
- }
-}
-
-var typescript = (superClass => class extends superClass {
- getScopeHandler() {
- return TypeScriptScopeHandler;
- }
-
- tsIsIdentifier() {
- return this.match(types.name);
- }
-
- tsNextTokenCanFollowModifier() {
- this.next();
- return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang);
- }
-
- tsParseModifier(allowedModifiers) {
- if (!this.match(types.name)) {
- return undefined;
- }
-
- const modifier = this.state.value;
-
- if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
- return modifier;
- }
-
- return undefined;
- }
-
- tsIsListTerminator(kind) {
- switch (kind) {
- case "EnumMembers":
- case "TypeMembers":
- return this.match(types.braceR);
-
- case "HeritageClauseElement":
- return this.match(types.braceL);
-
- case "TupleElementTypes":
- return this.match(types.bracketR);
-
- case "TypeParametersOrArguments":
- return this.isRelational(">");
- }
-
- throw new Error("Unreachable");
- }
-
- tsParseList(kind, parseElement) {
- const result = [];
-
- while (!this.tsIsListTerminator(kind)) {
- result.push(parseElement());
- }
-
- return result;
- }
-
- tsParseDelimitedList(kind, parseElement) {
- return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
- }
-
- tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
- const result = [];
-
- while (true) {
- if (this.tsIsListTerminator(kind)) {
- break;
- }
-
- const element = parseElement();
-
- if (element == null) {
- return undefined;
- }
-
- result.push(element);
-
- if (this.eat(types.comma)) {
- continue;
- }
-
- if (this.tsIsListTerminator(kind)) {
- break;
- }
-
- if (expectSuccess) {
- this.expect(types.comma);
- }
-
- return undefined;
- }
-
- return result;
- }
-
- tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
- if (!skipFirstToken) {
- if (bracket) {
- this.expect(types.bracketL);
- } else {
- this.expectRelational("<");
- }
- }
-
- const result = this.tsParseDelimitedList(kind, parseElement);
-
- if (bracket) {
- this.expect(types.bracketR);
- } else {
- this.expectRelational(">");
- }
-
- return result;
- }
-
- tsParseImportType() {
- const node = this.startNode();
- this.expect(types._import);
- this.expect(types.parenL);
-
- if (!this.match(types.string)) {
- throw this.unexpected(null, "Argument in a type import must be a string literal");
- }
-
- node.argument = this.parseExprAtom();
- this.expect(types.parenR);
-
- if (this.eat(types.dot)) {
- node.qualifier = this.tsParseEntityName(true);
- }
-
- if (this.isRelational("<")) {
- node.typeParameters = this.tsParseTypeArguments();
- }
-
- return this.finishNode(node, "TSImportType");
- }
-
- tsParseEntityName(allowReservedWords) {
- let entity = this.parseIdentifier();
-
- while (this.eat(types.dot)) {
- const node = this.startNodeAtNode(entity);
- node.left = entity;
- node.right = this.parseIdentifier(allowReservedWords);
- entity = this.finishNode(node, "TSQualifiedName");
- }
-
- return entity;
- }
-
- tsParseTypeReference() {
- const node = this.startNode();
- node.typeName = this.tsParseEntityName(false);
-
- if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
- node.typeParameters = this.tsParseTypeArguments();
- }
-
- return this.finishNode(node, "TSTypeReference");
- }
-
- tsParseThisTypePredicate(lhs) {
- this.next();
- const node = this.startNodeAtNode(lhs);
- node.parameterName = lhs;
- node.typeAnnotation = this.tsParseTypeAnnotation(false);
- return this.finishNode(node, "TSTypePredicate");
- }
-
- tsParseThisTypeNode() {
- const node = this.startNode();
- this.next();
- return this.finishNode(node, "TSThisType");
- }
-
- tsParseTypeQuery() {
- const node = this.startNode();
- this.expect(types._typeof);
-
- if (this.match(types._import)) {
- node.exprName = this.tsParseImportType();
- } else {
- node.exprName = this.tsParseEntityName(true);
- }
-
- return this.finishNode(node, "TSTypeQuery");
- }
-
- tsParseTypeParameter() {
- const node = this.startNode();
- node.name = this.parseIdentifierName(node.start);
- node.constraint = this.tsEatThenParseType(types._extends);
- node.default = this.tsEatThenParseType(types.eq);
- return this.finishNode(node, "TSTypeParameter");
- }
-
- tsTryParseTypeParameters() {
- if (this.isRelational("<")) {
- return this.tsParseTypeParameters();
- }
- }
-
- tsParseTypeParameters() {
- const node = this.startNode();
-
- if (this.isRelational("<") || this.match(types.jsxTagStart)) {
- this.next();
- } else {
- this.unexpected();
- }
-
- node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
- return this.finishNode(node, "TSTypeParameterDeclaration");
- }
-
- tsTryNextParseConstantContext() {
- if (this.lookahead().type === types._const) {
- this.next();
- return this.tsParseTypeReference();
- }
-
- return null;
- }
-
- tsFillSignature(returnToken, signature) {
- const returnTokenRequired = returnToken === types.arrow;
- signature.typeParameters = this.tsTryParseTypeParameters();
- this.expect(types.parenL);
- signature.parameters = this.tsParseBindingListForSignature();
-
- if (returnTokenRequired) {
- signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
- } else if (this.match(returnToken)) {
- signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
- }
- }
-
- tsParseBindingListForSignature() {
- return this.parseBindingList(types.parenR).map(pattern => {
- if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
- throw this.unexpected(pattern.start, `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${pattern.type}`);
- }
-
- return pattern;
- });
- }
-
- tsParseTypeMemberSemicolon() {
- if (!this.eat(types.comma)) {
- this.semicolon();
- }
- }
-
- tsParseSignatureMember(kind, node) {
- this.tsFillSignature(types.colon, node);
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(node, kind);
- }
-
- tsIsUnambiguouslyIndexSignature() {
- this.next();
- return this.eat(types.name) && this.match(types.colon);
- }
-
- tsTryParseIndexSignature(node) {
- if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
- return undefined;
- }
-
- this.expect(types.bracketL);
- const id = this.parseIdentifier();
- id.typeAnnotation = this.tsParseTypeAnnotation();
- this.resetEndLocation(id);
- this.expect(types.bracketR);
- node.parameters = [id];
- const type = this.tsTryParseTypeAnnotation();
- if (type) node.typeAnnotation = type;
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(node, "TSIndexSignature");
- }
-
- tsParsePropertyOrMethodSignature(node, readonly) {
- if (this.eat(types.question)) node.optional = true;
- const nodeAny = node;
-
- if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) {
- const method = nodeAny;
- this.tsFillSignature(types.colon, method);
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(method, "TSMethodSignature");
- } else {
- const property = nodeAny;
- if (readonly) property.readonly = true;
- const type = this.tsTryParseTypeAnnotation();
- if (type) property.typeAnnotation = type;
- this.tsParseTypeMemberSemicolon();
- return this.finishNode(property, "TSPropertySignature");
- }
- }
-
- tsParseTypeMember() {
- const node = this.startNode();
-
- if (this.match(types.parenL) || this.isRelational("<")) {
- return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
- }
-
- if (this.match(types._new)) {
- const id = this.startNode();
- this.next();
-
- if (this.match(types.parenL) || this.isRelational("<")) {
- return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
- } else {
- node.key = this.createIdentifier(id, "new");
- return this.tsParsePropertyOrMethodSignature(node, false);
- }
- }
-
- const readonly = !!this.tsParseModifier(["readonly"]);
- const idx = this.tsTryParseIndexSignature(node);
-
- if (idx) {
- if (readonly) node.readonly = true;
- return idx;
- }
-
- this.parsePropertyName(node);
- return this.tsParsePropertyOrMethodSignature(node, readonly);
- }
-
- tsParseTypeLiteral() {
- const node = this.startNode();
- node.members = this.tsParseObjectTypeMembers();
- return this.finishNode(node, "TSTypeLiteral");
- }
-
- tsParseObjectTypeMembers() {
- this.expect(types.braceL);
- const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
- this.expect(types.braceR);
- return members;
- }
-
- tsIsStartOfMappedType() {
- this.next();
-
- if (this.eat(types.plusMin)) {
- return this.isContextual("readonly");
- }
-
- if (this.isContextual("readonly")) {
- this.next();
- }
-
- if (!this.match(types.bracketL)) {
- return false;
- }
-
- this.next();
-
- if (!this.tsIsIdentifier()) {
- return false;
- }
-
- this.next();
- return this.match(types._in);
- }
-
- tsParseMappedTypeParameter() {
- const node = this.startNode();
- node.name = this.parseIdentifierName(node.start);
- node.constraint = this.tsExpectThenParseType(types._in);
- return this.finishNode(node, "TSTypeParameter");
- }
-
- tsParseMappedType() {
- const node = this.startNode();
- this.expect(types.braceL);
-
- if (this.match(types.plusMin)) {
- node.readonly = this.state.value;
- this.next();
- this.expectContextual("readonly");
- } else if (this.eatContextual("readonly")) {
- node.readonly = true;
- }
-
- this.expect(types.bracketL);
- node.typeParameter = this.tsParseMappedTypeParameter();
- this.expect(types.bracketR);
-
- if (this.match(types.plusMin)) {
- node.optional = this.state.value;
- this.next();
- this.expect(types.question);
- } else if (this.eat(types.question)) {
- node.optional = true;
- }
-
- node.typeAnnotation = this.tsTryParseType();
- this.semicolon();
- this.expect(types.braceR);
- return this.finishNode(node, "TSMappedType");
- }
-
- tsParseTupleType() {
- const node = this.startNode();
- node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
- let seenOptionalElement = false;
- node.elementTypes.forEach(elementNode => {
- if (elementNode.type === "TSOptionalType") {
- seenOptionalElement = true;
- } else if (seenOptionalElement && elementNode.type !== "TSRestType") {
- this.raise(elementNode.start, "A required element cannot follow an optional element.");
- }
- });
- return this.finishNode(node, "TSTupleType");
- }
-
- tsParseTupleElementType() {
- if (this.match(types.ellipsis)) {
- const restNode = this.startNode();
- this.next();
- restNode.typeAnnotation = this.tsParseType();
- this.checkCommaAfterRest();
- return this.finishNode(restNode, "TSRestType");
- }
-
- const type = this.tsParseType();
-
- if (this.eat(types.question)) {
- const optionalTypeNode = this.startNodeAtNode(type);
- optionalTypeNode.typeAnnotation = type;
- return this.finishNode(optionalTypeNode, "TSOptionalType");
- }
-
- return type;
- }
-
- tsParseParenthesizedType() {
- const node = this.startNode();
- this.expect(types.parenL);
- node.typeAnnotation = this.tsParseType();
- this.expect(types.parenR);
- return this.finishNode(node, "TSParenthesizedType");
- }
-
- tsParseFunctionOrConstructorType(type) {
- const node = this.startNode();
-
- if (type === "TSConstructorType") {
- this.expect(types._new);
- }
-
- this.tsFillSignature(types.arrow, node);
- return this.finishNode(node, type);
- }
-
- tsParseLiteralTypeNode() {
- const node = this.startNode();
-
- node.literal = (() => {
- switch (this.state.type) {
- case types.num:
- case types.string:
- case types._true:
- case types._false:
- return this.parseExprAtom();
-
- default:
- throw this.unexpected();
- }
- })();
-
- return this.finishNode(node, "TSLiteralType");
- }
-
- tsParseTemplateLiteralType() {
- const node = this.startNode();
- const templateNode = this.parseTemplate(false);
-
- if (templateNode.expressions.length > 0) {
- throw this.raise(templateNode.expressions[0].start, "Template literal types cannot have any substitution");
- }
-
- node.literal = templateNode;
- return this.finishNode(node, "TSLiteralType");
- }
-
- tsParseNonArrayType() {
- switch (this.state.type) {
- case types.name:
- case types._void:
- case types._null:
- {
- const type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
-
- if (type !== undefined && this.lookahead().type !== types.dot) {
- const node = this.startNode();
- this.next();
- return this.finishNode(node, type);
- }
-
- return this.tsParseTypeReference();
- }
-
- case types.string:
- case types.num:
- case types._true:
- case types._false:
- return this.tsParseLiteralTypeNode();
-
- case types.plusMin:
- if (this.state.value === "-") {
- const node = this.startNode();
-
- if (this.lookahead().type !== types.num) {
- throw this.unexpected();
- }
-
- node.literal = this.parseMaybeUnary();
- return this.finishNode(node, "TSLiteralType");
- }
-
- break;
-
- case types._this:
- {
- const thisKeyword = this.tsParseThisTypeNode();
-
- if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
- return this.tsParseThisTypePredicate(thisKeyword);
- } else {
- return thisKeyword;
- }
- }
-
- case types._typeof:
- return this.tsParseTypeQuery();
-
- case types._import:
- return this.tsParseImportType();
-
- case types.braceL:
- return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
-
- case types.bracketL:
- return this.tsParseTupleType();
-
- case types.parenL:
- return this.tsParseParenthesizedType();
-
- case types.backQuote:
- return this.tsParseTemplateLiteralType();
- }
-
- throw this.unexpected();
- }
-
- tsParseArrayTypeOrHigher() {
- let type = this.tsParseNonArrayType();
-
- while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) {
- if (this.match(types.bracketR)) {
- const node = this.startNodeAtNode(type);
- node.elementType = type;
- this.expect(types.bracketR);
- type = this.finishNode(node, "TSArrayType");
- } else {
- const node = this.startNodeAtNode(type);
- node.objectType = type;
- node.indexType = this.tsParseType();
- this.expect(types.bracketR);
- type = this.finishNode(node, "TSIndexedAccessType");
- }
- }
-
- return type;
- }
-
- tsParseTypeOperator(operator) {
- const node = this.startNode();
- this.expectContextual(operator);
- node.operator = operator;
- node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
-
- if (operator === "readonly") {
- this.tsCheckTypeAnnotationForReadOnly(node);
- }
-
- return this.finishNode(node, "TSTypeOperator");
- }
-
- tsCheckTypeAnnotationForReadOnly(node) {
- switch (node.typeAnnotation.type) {
- case "TSTupleType":
- case "TSArrayType":
- return;
-
- default:
- this.raise(node.start, "'readonly' type modifier is only permitted on array and tuple literal types.");
- }
- }
-
- tsParseInferType() {
- const node = this.startNode();
- this.expectContextual("infer");
- const typeParameter = this.startNode();
- typeParameter.name = this.parseIdentifierName(typeParameter.start);
- node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
- return this.finishNode(node, "TSInferType");
- }
-
- tsParseTypeOperatorOrHigher() {
- const operator = ["keyof", "unique", "readonly"].find(kw => this.isContextual(kw));
- return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
- }
-
- tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
- this.eat(operator);
- let type = parseConstituentType();
-
- if (this.match(operator)) {
- const types = [type];
-
- while (this.eat(operator)) {
- types.push(parseConstituentType());
- }
-
- const node = this.startNodeAtNode(type);
- node.types = types;
- type = this.finishNode(node, kind);
- }
-
- return type;
- }
-
- tsParseIntersectionTypeOrHigher() {
- return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND);
- }
-
- tsParseUnionTypeOrHigher() {
- return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR);
- }
-
- tsIsStartOfFunctionType() {
- if (this.isRelational("<")) {
- return true;
- }
-
- return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
- }
-
- tsSkipParameterStart() {
- if (this.match(types.name) || this.match(types._this)) {
- this.next();
- return true;
- }
-
- if (this.match(types.braceL)) {
- let braceStackCounter = 1;
- this.next();
-
- while (braceStackCounter > 0) {
- if (this.match(types.braceL)) {
- ++braceStackCounter;
- } else if (this.match(types.braceR)) {
- --braceStackCounter;
- }
-
- this.next();
- }
-
- return true;
- }
-
- if (this.match(types.bracketL)) {
- let braceStackCounter = 1;
- this.next();
-
- while (braceStackCounter > 0) {
- if (this.match(types.bracketL)) {
- ++braceStackCounter;
- } else if (this.match(types.bracketR)) {
- --braceStackCounter;
- }
-
- this.next();
- }
-
- return true;
- }
-
- return false;
- }
-
- tsIsUnambiguouslyStartOfFunctionType() {
- this.next();
-
- if (this.match(types.parenR) || this.match(types.ellipsis)) {
- return true;
- }
-
- if (this.tsSkipParameterStart()) {
- if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) {
- return true;
- }
-
- if (this.match(types.parenR)) {
- this.next();
-
- if (this.match(types.arrow)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
- tsParseTypeOrTypePredicateAnnotation(returnToken) {
- return this.tsInType(() => {
- const t = this.startNode();
- this.expect(returnToken);
- const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
-
- if (!typePredicateVariable) {
- return this.tsParseTypeAnnotation(false, t);
- }
-
- const type = this.tsParseTypeAnnotation(false);
- const node = this.startNodeAtNode(typePredicateVariable);
- node.parameterName = typePredicateVariable;
- node.typeAnnotation = type;
- t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
- return this.finishNode(t, "TSTypeAnnotation");
- });
- }
-
- tsTryParseTypeOrTypePredicateAnnotation() {
- return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined;
- }
-
- tsTryParseTypeAnnotation() {
- return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined;
- }
-
- tsTryParseType() {
- return this.tsEatThenParseType(types.colon);
- }
-
- tsParseTypePredicatePrefix() {
- const id = this.parseIdentifier();
-
- if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
- this.next();
- return id;
- }
- }
-
- tsParseTypeAnnotation(eatColon = true, t = this.startNode()) {
- this.tsInType(() => {
- if (eatColon) this.expect(types.colon);
- t.typeAnnotation = this.tsParseType();
- });
- return this.finishNode(t, "TSTypeAnnotation");
- }
-
- tsParseType() {
- assert(this.state.inType);
- const type = this.tsParseNonConditionalType();
-
- if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) {
- return type;
- }
-
- const node = this.startNodeAtNode(type);
- node.checkType = type;
- node.extendsType = this.tsParseNonConditionalType();
- this.expect(types.question);
- node.trueType = this.tsParseType();
- this.expect(types.colon);
- node.falseType = this.tsParseType();
- return this.finishNode(node, "TSConditionalType");
- }
-
- tsParseNonConditionalType() {
- if (this.tsIsStartOfFunctionType()) {
- return this.tsParseFunctionOrConstructorType("TSFunctionType");
- }
-
- if (this.match(types._new)) {
- return this.tsParseFunctionOrConstructorType("TSConstructorType");
- }
-
- return this.tsParseUnionTypeOrHigher();
- }
-
- tsParseTypeAssertion() {
- const node = this.startNode();
-
- const _const = this.tsTryNextParseConstantContext();
-
- node.typeAnnotation = _const || this.tsNextThenParseType();
- this.expectRelational(">");
- node.expression = this.parseMaybeUnary();
- return this.finishNode(node, "TSTypeAssertion");
- }
-
- tsParseHeritageClause(descriptor) {
- const originalStart = this.state.start;
- const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
-
- if (!delimitedList.length) {
- this.raise(originalStart, `'${descriptor}' list cannot be empty.`);
- }
-
- return delimitedList;
- }
-
- tsParseExpressionWithTypeArguments() {
- const node = this.startNode();
- node.expression = this.tsParseEntityName(false);
-
- if (this.isRelational("<")) {
- node.typeParameters = this.tsParseTypeArguments();
- }
-
- return this.finishNode(node, "TSExpressionWithTypeArguments");
- }
-
- tsParseInterfaceDeclaration(node) {
- node.id = this.parseIdentifier();
- this.checkLVal(node.id, BIND_TS_INTERFACE, undefined, "typescript interface declaration");
- node.typeParameters = this.tsTryParseTypeParameters();
-
- if (this.eat(types._extends)) {
- node.extends = this.tsParseHeritageClause("extends");
- }
-
- const body = this.startNode();
- body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
- node.body = this.finishNode(body, "TSInterfaceBody");
- return this.finishNode(node, "TSInterfaceDeclaration");
- }
-
- tsParseTypeAliasDeclaration(node) {
- node.id = this.parseIdentifier();
- this.checkLVal(node.id, BIND_TS_TYPE, undefined, "typescript type alias");
- node.typeParameters = this.tsTryParseTypeParameters();
- node.typeAnnotation = this.tsExpectThenParseType(types.eq);
- this.semicolon();
- return this.finishNode(node, "TSTypeAliasDeclaration");
- }
-
- tsInNoContext(cb) {
- const oldContext = this.state.context;
- this.state.context = [oldContext[0]];
-
- try {
- return cb();
- } finally {
- this.state.context = oldContext;
- }
- }
-
- tsInType(cb) {
- const oldInType = this.state.inType;
- this.state.inType = true;
-
- try {
- return cb();
- } finally {
- this.state.inType = oldInType;
- }
- }
-
- tsEatThenParseType(token) {
- return !this.match(token) ? undefined : this.tsNextThenParseType();
- }
-
- tsExpectThenParseType(token) {
- return this.tsDoThenParseType(() => this.expect(token));
- }
-
- tsNextThenParseType() {
- return this.tsDoThenParseType(() => this.next());
- }
-
- tsDoThenParseType(cb) {
- return this.tsInType(() => {
- cb();
- return this.tsParseType();
- });
- }
-
- tsParseEnumMember() {
- const node = this.startNode();
- node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);
-
- if (this.eat(types.eq)) {
- node.initializer = this.parseMaybeAssign();
- }
-
- return this.finishNode(node, "TSEnumMember");
- }
-
- tsParseEnumDeclaration(node, isConst) {
- if (isConst) node.const = true;
- node.id = this.parseIdentifier();
- this.checkLVal(node.id, isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM, undefined, "typescript enum declaration");
- this.expect(types.braceL);
- node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
- this.expect(types.braceR);
- return this.finishNode(node, "TSEnumDeclaration");
- }
-
- tsParseModuleBlock() {
- const node = this.startNode();
- this.scope.enter(SCOPE_OTHER);
- this.expect(types.braceL);
- this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR);
- this.scope.exit();
- return this.finishNode(node, "TSModuleBlock");
- }
-
- tsParseModuleOrNamespaceDeclaration(node, nested = false) {
- node.id = this.parseIdentifier();
-
- if (!nested) {
- this.checkLVal(node.id, BIND_TS_NAMESPACE, null, "module or namespace declaration");
- }
-
- if (this.eat(types.dot)) {
- const inner = this.startNode();
- this.tsParseModuleOrNamespaceDeclaration(inner, true);
- node.body = inner;
- } else {
- node.body = this.tsParseModuleBlock();
- }
-
- return this.finishNode(node, "TSModuleDeclaration");
- }
-
- tsParseAmbientExternalModuleDeclaration(node) {
- if (this.isContextual("global")) {
- node.global = true;
- node.id = this.parseIdentifier();
- } else if (this.match(types.string)) {
- node.id = this.parseExprAtom();
- } else {
- this.unexpected();
- }
-
- if (this.match(types.braceL)) {
- node.body = this.tsParseModuleBlock();
- } else {
- this.semicolon();
- }
-
- return this.finishNode(node, "TSModuleDeclaration");
- }
-
- tsParseImportEqualsDeclaration(node, isExport) {
- node.isExport = isExport || false;
- node.id = this.parseIdentifier();
- this.expect(types.eq);
- node.moduleReference = this.tsParseModuleReference();
- this.semicolon();
- return this.finishNode(node, "TSImportEqualsDeclaration");
- }
-
- tsIsExternalModuleReference() {
- return this.isContextual("require") && this.lookahead().type === types.parenL;
- }
-
- tsParseModuleReference() {
- return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
- }
-
- tsParseExternalModuleReference() {
- const node = this.startNode();
- this.expectContextual("require");
- this.expect(types.parenL);
-
- if (!this.match(types.string)) {
- throw this.unexpected();
- }
-
- node.expression = this.parseExprAtom();
- this.expect(types.parenR);
- return this.finishNode(node, "TSExternalModuleReference");
- }
-
- tsLookAhead(f) {
- const state = this.state.clone();
- const res = f();
- this.state = state;
- return res;
- }
-
- tsTryParseAndCatch(f) {
- const state = this.state.clone();
-
- try {
- return f();
- } catch (e) {
- if (e instanceof SyntaxError) {
- this.state = state;
- return undefined;
- }
-
- throw e;
- }
- }
-
- tsTryParse(f) {
- const state = this.state.clone();
- const result = f();
-
- if (result !== undefined && result !== false) {
- return result;
- } else {
- this.state = state;
- return undefined;
- }
- }
-
- tsTryParseDeclare(nany) {
- if (this.isLineTerminator()) {
- return;
- }
-
- let starttype = this.state.type;
- let kind;
-
- if (this.isContextual("let")) {
- starttype = types._var;
- kind = "let";
- }
-
- switch (starttype) {
- case types._function:
- return this.parseFunctionStatement(nany, false, true);
-
- case types._class:
- return this.parseClass(nany, true, false);
-
- case types._const:
- if (this.match(types._const) && this.isLookaheadContextual("enum")) {
- this.expect(types._const);
- this.expectContextual("enum");
- return this.tsParseEnumDeclaration(nany, true);
- }
-
- case types._var:
- kind = kind || this.state.value;
- return this.parseVarStatement(nany, kind);
-
- case types.name:
- {
- const value = this.state.value;
-
- if (value === "global") {
- return this.tsParseAmbientExternalModuleDeclaration(nany);
- } else {
- return this.tsParseDeclaration(nany, value, true);
- }
- }
- }
- }
-
- tsTryParseExportDeclaration() {
- return this.tsParseDeclaration(this.startNode(), this.state.value, true);
- }
-
- tsParseExpressionStatement(node, expr) {
- switch (expr.name) {
- case "declare":
- {
- const declaration = this.tsTryParseDeclare(node);
-
- if (declaration) {
- declaration.declare = true;
- return declaration;
- }
-
- break;
- }
-
- case "global":
- if (this.match(types.braceL)) {
- const mod = node;
- mod.global = true;
- mod.id = expr;
- mod.body = this.tsParseModuleBlock();
- return this.finishNode(mod, "TSModuleDeclaration");
- }
-
- break;
-
- default:
- return this.tsParseDeclaration(node, expr.name, false);
- }
- }
-
- tsParseDeclaration(node, value, next) {
- switch (value) {
- case "abstract":
- if (this.tsCheckLineTerminatorAndMatch(types._class, next)) {
- const cls = node;
- cls.abstract = true;
-
- if (next) {
- this.next();
-
- if (!this.match(types._class)) {
- this.unexpected(null, types._class);
- }
- }
-
- return this.parseClass(cls, true, false);
- }
-
- break;
-
- case "enum":
- if (next || this.match(types.name)) {
- if (next) this.next();
- return this.tsParseEnumDeclaration(node, false);
- }
-
- break;
-
- case "interface":
- if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
- if (next) this.next();
- return this.tsParseInterfaceDeclaration(node);
- }
-
- break;
-
- case "module":
- if (next) this.next();
-
- if (this.match(types.string)) {
- return this.tsParseAmbientExternalModuleDeclaration(node);
- } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
- return this.tsParseModuleOrNamespaceDeclaration(node);
- }
-
- break;
-
- case "namespace":
- if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
- if (next) this.next();
- return this.tsParseModuleOrNamespaceDeclaration(node);
- }
-
- break;
-
- case "type":
- if (this.tsCheckLineTerminatorAndMatch(types.name, next)) {
- if (next) this.next();
- return this.tsParseTypeAliasDeclaration(node);
- }
-
- break;
- }
- }
-
- tsCheckLineTerminatorAndMatch(tokenType, next) {
- return (next || this.match(tokenType)) && !this.isLineTerminator();
- }
-
- tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
- if (!this.isRelational("<")) {
- return undefined;
- }
-
- const res = this.tsTryParseAndCatch(() => {
- const node = this.startNodeAt(startPos, startLoc);
- node.typeParameters = this.tsParseTypeParameters();
- super.parseFunctionParams(node);
- node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
- this.expect(types.arrow);
- return node;
- });
-
- if (!res) {
- return undefined;
- }
-
- return this.parseArrowExpression(res, null, true);
- }
-
- tsParseTypeArguments() {
- const node = this.startNode();
- node.params = this.tsInType(() => this.tsInNoContext(() => {
- this.expectRelational("<");
- return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
- }));
- this.state.exprAllowed = false;
- this.expectRelational(">");
- return this.finishNode(node, "TSTypeParameterInstantiation");
- }
-
- tsIsDeclarationStart() {
- if (this.match(types.name)) {
- switch (this.state.value) {
- case "abstract":
- case "declare":
- case "enum":
- case "interface":
- case "module":
- case "namespace":
- case "type":
- return true;
- }
- }
-
- return false;
- }
-
- isExportDefaultSpecifier() {
- if (this.tsIsDeclarationStart()) return false;
- return super.isExportDefaultSpecifier();
- }
-
- parseAssignableListItem(allowModifiers, decorators) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- let accessibility;
- let readonly = false;
-
- if (allowModifiers) {
- accessibility = this.parseAccessModifier();
- readonly = !!this.tsParseModifier(["readonly"]);
- }
-
- const left = this.parseMaybeDefault();
- this.parseAssignableListItemTypes(left);
- const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
-
- if (accessibility || readonly) {
- const pp = this.startNodeAt(startPos, startLoc);
-
- if (decorators.length) {
- pp.decorators = decorators;
- }
-
- if (accessibility) pp.accessibility = accessibility;
- if (readonly) pp.readonly = readonly;
-
- if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
- throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern.");
- }
-
- pp.parameter = elt;
- return this.finishNode(pp, "TSParameterProperty");
- }
-
- if (decorators.length) {
- left.decorators = decorators;
- }
-
- return elt;
- }
-
- parseFunctionBodyAndFinish(node, type, isMethod = false) {
- if (this.match(types.colon)) {
- node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
- }
-
- const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined;
-
- if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) {
- this.finishNode(node, bodilessType);
- return;
- }
-
- super.parseFunctionBodyAndFinish(node, type, isMethod);
- }
-
- checkFunctionStatementId(node) {
- if (!node.body && node.id) {
- this.checkLVal(node.id, BIND_TS_FN_TYPE, null, "function name");
- } else {
- super.checkFunctionStatementId(...arguments);
- }
- }
-
- parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) {
- if (!this.hasPrecedingLineBreak() && this.match(types.bang)) {
- this.state.exprAllowed = false;
- this.next();
- const nonNullExpression = this.startNodeAt(startPos, startLoc);
- nonNullExpression.expression = base;
- return this.finishNode(nonNullExpression, "TSNonNullExpression");
- }
-
- if (this.isRelational("<")) {
- const result = this.tsTryParseAndCatch(() => {
- if (!noCalls && this.atPossibleAsync(base)) {
- const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
-
- if (asyncArrowFn) {
- return asyncArrowFn;
- }
- }
-
- const node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- const typeArguments = this.tsParseTypeArguments();
-
- if (typeArguments) {
- if (!noCalls && this.eat(types.parenL)) {
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
- node.typeParameters = typeArguments;
- return this.finishCallExpression(node);
- } else if (this.match(types.backQuote)) {
- return this.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments);
- }
- }
-
- this.unexpected();
- });
- if (result) return result;
- }
-
- return super.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow);
- }
-
- parseNewArguments(node) {
- if (this.isRelational("<")) {
- const typeParameters = this.tsTryParseAndCatch(() => {
- const args = this.tsParseTypeArguments();
- if (!this.match(types.parenL)) this.unexpected();
- return args;
- });
-
- if (typeParameters) {
- node.typeParameters = typeParameters;
- }
- }
-
- super.parseNewArguments(node);
- }
-
- parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
- if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
- const node = this.startNodeAt(leftStartPos, leftStartLoc);
- node.expression = left;
-
- const _const = this.tsTryNextParseConstantContext();
-
- if (_const) {
- node.typeAnnotation = _const;
- } else {
- node.typeAnnotation = this.tsNextThenParseType();
- }
-
- this.finishNode(node, "TSAsExpression");
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
-
- return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn);
- }
-
- checkReservedWord(word, startLoc, checkKeywords, isBinding) {}
-
- checkDuplicateExports() {}
-
- parseImport(node) {
- if (this.match(types.name) && this.lookahead().type === types.eq) {
- return this.tsParseImportEqualsDeclaration(node);
- }
-
- return super.parseImport(node);
- }
-
- parseExport(node) {
- if (this.match(types._import)) {
- this.expect(types._import);
- return this.tsParseImportEqualsDeclaration(node, true);
- } else if (this.eat(types.eq)) {
- const assign = node;
- assign.expression = this.parseExpression();
- this.semicolon();
- return this.finishNode(assign, "TSExportAssignment");
- } else if (this.eatContextual("as")) {
- const decl = node;
- this.expectContextual("namespace");
- decl.id = this.parseIdentifier();
- this.semicolon();
- return this.finishNode(decl, "TSNamespaceExportDeclaration");
- } else {
- return super.parseExport(node);
- }
- }
-
- isAbstractClass() {
- return this.isContextual("abstract") && this.lookahead().type === types._class;
- }
-
- parseExportDefaultExpression() {
- if (this.isAbstractClass()) {
- const cls = this.startNode();
- this.next();
- this.parseClass(cls, true, true);
- cls.abstract = true;
- return cls;
- }
-
- if (this.state.value === "interface") {
- const result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
- if (result) return result;
- }
-
- return super.parseExportDefaultExpression();
- }
-
- parseStatementContent(context, topLevel) {
- if (this.state.type === types._const) {
- const ahead = this.lookahead();
-
- if (ahead.type === types.name && ahead.value === "enum") {
- const node = this.startNode();
- this.expect(types._const);
- this.expectContextual("enum");
- return this.tsParseEnumDeclaration(node, true);
- }
- }
-
- return super.parseStatementContent(context, topLevel);
- }
-
- parseAccessModifier() {
- return this.tsParseModifier(["public", "protected", "private"]);
- }
-
- parseClassMember(classBody, member, state, constructorAllowsSuper) {
- const accessibility = this.parseAccessModifier();
- if (accessibility) member.accessibility = accessibility;
- super.parseClassMember(classBody, member, state, constructorAllowsSuper);
- }
-
- parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) {
- const methodOrProp = member;
- const prop = member;
- const propOrIdx = member;
- let abstract = false,
- readonly = false;
- const mod = this.tsParseModifier(["abstract", "readonly"]);
-
- switch (mod) {
- case "readonly":
- readonly = true;
- abstract = !!this.tsParseModifier(["abstract"]);
- break;
-
- case "abstract":
- abstract = true;
- readonly = !!this.tsParseModifier(["readonly"]);
- break;
- }
-
- if (abstract) methodOrProp.abstract = true;
- if (readonly) propOrIdx.readonly = true;
-
- if (!abstract && !isStatic && !methodOrProp.accessibility) {
- const idx = this.tsTryParseIndexSignature(member);
-
- if (idx) {
- classBody.body.push(idx);
- return;
- }
- }
-
- if (readonly) {
- methodOrProp.static = isStatic;
- this.parseClassPropertyName(prop);
- this.parsePostMemberNameModifiers(methodOrProp);
- this.pushClassProperty(classBody, prop);
- return;
- }
-
- super.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper);
- }
-
- parsePostMemberNameModifiers(methodOrProp) {
- const optional = this.eat(types.question);
- if (optional) methodOrProp.optional = true;
- }
-
- parseExpressionStatement(node, expr) {
- const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
- return decl || super.parseExpressionStatement(node, expr);
- }
-
- shouldParseExportDeclaration() {
- if (this.tsIsDeclarationStart()) return true;
- return super.shouldParseExportDeclaration();
- }
-
- parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
- if (!refNeedsArrowPos || !this.match(types.question)) {
- return super.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
- }
-
- const state = this.state.clone();
-
- try {
- return super.parseConditional(expr, noIn, startPos, startLoc);
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- throw err;
- }
-
- this.state = state;
- refNeedsArrowPos.start = err.pos || this.state.start;
- return expr;
- }
- }
-
- parseParenItem(node, startPos, startLoc) {
- node = super.parseParenItem(node, startPos, startLoc);
-
- if (this.eat(types.question)) {
- node.optional = true;
- this.resetEndLocation(node);
- }
-
- if (this.match(types.colon)) {
- const typeCastNode = this.startNodeAt(startPos, startLoc);
- typeCastNode.expression = node;
- typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
- return this.finishNode(typeCastNode, "TSTypeCastExpression");
- }
-
- return node;
- }
-
- parseExportDeclaration(node) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const isDeclare = this.eatContextual("declare");
- let declaration;
-
- if (this.match(types.name)) {
- declaration = this.tsTryParseExportDeclaration();
- }
-
- if (!declaration) {
- declaration = super.parseExportDeclaration(node);
- }
-
- if (declaration && isDeclare) {
- this.resetStartLocation(declaration, startPos, startLoc);
- declaration.declare = true;
- }
-
- return declaration;
- }
-
- parseClassId(node, isStatement, optionalId) {
- if ((!isStatement || optionalId) && this.isContextual("implements")) {
- return;
- }
-
- super.parseClassId(...arguments);
- const typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) node.typeParameters = typeParameters;
- }
-
- parseClassProperty(node) {
- if (!node.optional && this.eat(types.bang)) {
- node.definite = true;
- }
-
- const type = this.tsTryParseTypeAnnotation();
- if (type) node.typeAnnotation = type;
- return super.parseClassProperty(node);
- }
-
- pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
- const typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) method.typeParameters = typeParameters;
- super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
- }
-
- pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- const typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) method.typeParameters = typeParameters;
- super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
- }
-
- parseClassSuper(node) {
- super.parseClassSuper(node);
-
- if (node.superClass && this.isRelational("<")) {
- node.superTypeParameters = this.tsParseTypeArguments();
- }
-
- if (this.eatContextual("implements")) {
- node.implements = this.tsParseHeritageClause("implements");
- }
- }
-
- parseObjPropValue(prop, ...args) {
- const typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) prop.typeParameters = typeParameters;
- super.parseObjPropValue(prop, ...args);
- }
-
- parseFunctionParams(node, allowModifiers) {
- const typeParameters = this.tsTryParseTypeParameters();
- if (typeParameters) node.typeParameters = typeParameters;
- super.parseFunctionParams(node, allowModifiers);
- }
-
- parseVarId(decl, kind) {
- super.parseVarId(decl, kind);
-
- if (decl.id.type === "Identifier" && this.eat(types.bang)) {
- decl.definite = true;
- }
-
- const type = this.tsTryParseTypeAnnotation();
-
- if (type) {
- decl.id.typeAnnotation = type;
- this.resetEndLocation(decl.id);
- }
- }
-
- parseAsyncArrowFromCallExpression(node, call) {
- if (this.match(types.colon)) {
- node.returnType = this.tsParseTypeAnnotation();
- }
-
- return super.parseAsyncArrowFromCallExpression(node, call);
- }
-
- parseMaybeAssign(...args) {
- let jsxError;
-
- if (this.match(types.jsxTagStart)) {
- const context = this.curContext();
- assert(context === types$1.j_oTag);
- assert(this.state.context[this.state.context.length - 2] === types$1.j_expr);
- const state = this.state.clone();
-
- try {
- return super.parseMaybeAssign(...args);
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- throw err;
- }
-
- this.state = state;
- assert(this.curContext() === types$1.j_oTag);
- this.state.context.pop();
- assert(this.curContext() === types$1.j_expr);
- this.state.context.pop();
- jsxError = err;
- }
- }
-
- if (jsxError === undefined && !this.isRelational("<")) {
- return super.parseMaybeAssign(...args);
- }
-
- let arrowExpression;
- let typeParameters;
- const state = this.state.clone();
-
- try {
- typeParameters = this.tsParseTypeParameters();
- arrowExpression = super.parseMaybeAssign(...args);
-
- if (arrowExpression.type !== "ArrowFunctionExpression" || arrowExpression.extra && arrowExpression.extra.parenthesized) {
- this.unexpected();
- }
- } catch (err) {
- if (!(err instanceof SyntaxError)) {
- throw err;
- }
-
- if (jsxError) {
- throw jsxError;
- }
-
- assert(!this.hasPlugin("jsx"));
- this.state = state;
- return super.parseMaybeAssign(...args);
- }
-
- if (typeParameters && typeParameters.params.length !== 0) {
- this.resetStartLocationFromNode(arrowExpression, typeParameters);
- }
-
- arrowExpression.typeParameters = typeParameters;
- return arrowExpression;
- }
-
- parseMaybeUnary(refShorthandDefaultPos) {
- if (!this.hasPlugin("jsx") && this.isRelational("<")) {
- return this.tsParseTypeAssertion();
- } else {
- return super.parseMaybeUnary(refShorthandDefaultPos);
- }
- }
-
- parseArrow(node) {
- if (this.match(types.colon)) {
- const state = this.state.clone();
-
- try {
- const returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);
-
- if (this.canInsertSemicolon() || !this.match(types.arrow)) {
- this.state = state;
- return undefined;
- }
-
- node.returnType = returnType;
- } catch (err) {
- if (err instanceof SyntaxError) {
- this.state = state;
- } else {
- throw err;
- }
- }
- }
-
- return super.parseArrow(node);
- }
-
- parseAssignableListItemTypes(param) {
- if (this.eat(types.question)) {
- if (param.type !== "Identifier") {
- throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature.");
- }
-
- param.optional = true;
- }
-
- const type = this.tsTryParseTypeAnnotation();
- if (type) param.typeAnnotation = type;
- this.resetEndLocation(param);
- return param;
- }
-
- toAssignable(node, isBinding, contextDescription) {
- switch (node.type) {
- case "TSTypeCastExpression":
- return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription);
-
- case "TSParameterProperty":
- return super.toAssignable(node, isBinding, contextDescription);
-
- case "TSAsExpression":
- case "TSNonNullExpression":
- case "TSTypeAssertion":
- node.expression = this.toAssignable(node.expression, isBinding, contextDescription);
- return node;
-
- default:
- return super.toAssignable(node, isBinding, contextDescription);
- }
- }
-
- checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) {
- switch (expr.type) {
- case "TSTypeCastExpression":
- return;
-
- case "TSParameterProperty":
- this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property");
- return;
-
- case "TSAsExpression":
- case "TSNonNullExpression":
- case "TSTypeAssertion":
- this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription);
- return;
-
- default:
- super.checkLVal(expr, bindingType, checkClashes, contextDescription);
- return;
- }
- }
-
- parseBindingAtom() {
- switch (this.state.type) {
- case types._this:
- return this.parseIdentifier(true);
-
- default:
- return super.parseBindingAtom();
- }
- }
-
- parseMaybeDecoratorArguments(expr) {
- if (this.isRelational("<")) {
- const typeArguments = this.tsParseTypeArguments();
-
- if (this.match(types.parenL)) {
- const call = super.parseMaybeDecoratorArguments(expr);
- call.typeParameters = typeArguments;
- return call;
- }
-
- this.unexpected(this.state.start, types.parenL);
- }
-
- return super.parseMaybeDecoratorArguments(expr);
- }
-
- isClassMethod() {
- return this.isRelational("<") || super.isClassMethod();
- }
-
- isClassProperty() {
- return this.match(types.bang) || this.match(types.colon) || super.isClassProperty();
- }
-
- parseMaybeDefault(...args) {
- const node = super.parseMaybeDefault(...args);
-
- if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
- this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`");
- }
-
- return node;
- }
-
- getTokenFromCode(code) {
- if (this.state.inType && (code === 62 || code === 60)) {
- return this.finishOp(types.relational, 1);
- } else {
- return super.getTokenFromCode(code);
- }
- }
-
- toAssignableList(exprList, isBinding, contextDescription) {
- for (let i = 0; i < exprList.length; i++) {
- const expr = exprList[i];
- if (!expr) continue;
-
- switch (expr.type) {
- case "TSTypeCastExpression":
- exprList[i] = this.typeCastToParameter(expr);
- break;
-
- case "TSAsExpression":
- case "TSTypeAssertion":
- this.raise(expr.start, "Unexpected type cast in parameter position.");
- break;
- }
- }
-
- return super.toAssignableList(exprList, isBinding, contextDescription);
- }
-
- typeCastToParameter(node) {
- node.expression.typeAnnotation = node.typeAnnotation;
- this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
- return node.expression;
- }
-
- toReferencedList(exprList, isInParens) {
- for (let i = 0; i < exprList.length; i++) {
- const expr = exprList[i];
-
- if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") {
- this.raise(expr.start, "Did not expect a type annotation here.");
- }
- }
-
- return exprList;
- }
-
- shouldParseArrow() {
- return this.match(types.colon) || super.shouldParseArrow();
- }
-
- shouldParseAsyncArrow() {
- return this.match(types.colon) || super.shouldParseAsyncArrow();
- }
-
- canHaveLeadingDecorator() {
- return super.canHaveLeadingDecorator() || this.isAbstractClass();
- }
-
- jsxParseOpeningElementAfterName(node) {
- if (this.isRelational("<")) {
- const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments());
- if (typeArguments) node.typeParameters = typeArguments;
- }
-
- return super.jsxParseOpeningElementAfterName(node);
- }
-
- getGetterSetterExpectedParamCount(method) {
- const baseCount = super.getGetterSetterExpectedParamCount(method);
- const firstParam = method.params[0];
- const hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this";
- return hasContextParam ? baseCount + 1 : baseCount;
- }
-
-});
-
-types.placeholder = new TokenType("%%", {
- startsExpr: true
-});
-var placeholders = (superClass => class extends superClass {
- parsePlaceholder(expectedNode) {
- if (this.match(types.placeholder)) {
- const node = this.startNode();
- this.next();
- this.assertNoSpace("Unexpected space in placeholder.");
- node.name = super.parseIdentifier(true);
- this.assertNoSpace("Unexpected space in placeholder.");
- this.expect(types.placeholder);
- return this.finishPlaceholder(node, expectedNode);
- }
- }
-
- finishPlaceholder(node, expectedNode) {
- const isFinished = !!(node.expectedNode && node.type === "Placeholder");
- node.expectedNode = expectedNode;
- return isFinished ? node : this.finishNode(node, "Placeholder");
- }
-
- getTokenFromCode(code) {
- if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
- return this.finishOp(types.placeholder, 2);
- }
-
- return super.getTokenFromCode(...arguments);
- }
-
- parseExprAtom() {
- return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
- }
-
- parseIdentifier() {
- return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
- }
-
- checkReservedWord(word) {
- if (word !== undefined) super.checkReservedWord(...arguments);
- }
-
- parseBindingAtom() {
- return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
- }
-
- checkLVal(expr) {
- if (expr.type !== "Placeholder") super.checkLVal(...arguments);
- }
-
- toAssignable(node) {
- if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
- node.expectedNode = "Pattern";
- return node;
- }
-
- return super.toAssignable(...arguments);
- }
-
- verifyBreakContinue(node) {
- if (node.label && node.label.type === "Placeholder") return;
- super.verifyBreakContinue(...arguments);
- }
-
- parseExpressionStatement(node, expr) {
- if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
- return super.parseExpressionStatement(...arguments);
- }
-
- if (this.match(types.colon)) {
- const stmt = node;
- stmt.label = this.finishPlaceholder(expr, "Identifier");
- this.next();
- stmt.body = this.parseStatement("label");
- return this.finishNode(stmt, "LabeledStatement");
- }
-
- this.semicolon();
- node.name = expr.name;
- return this.finishPlaceholder(node, "Statement");
- }
-
- parseBlock() {
- return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
- }
-
- parseFunctionId() {
- return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
- }
-
- parseClass(node, isStatement, optionalId) {
- const type = isStatement ? "ClassDeclaration" : "ClassExpression";
- this.next();
- this.takeDecorators(node);
- const placeholder = this.parsePlaceholder("Identifier");
-
- if (placeholder) {
- if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) {
- node.id = placeholder;
- } else if (optionalId || !isStatement) {
- node.id = null;
- node.body = this.finishPlaceholder(placeholder, "ClassBody");
- return this.finishNode(node, type);
- } else {
- this.unexpected(null, "A class name is required");
- }
- } else {
- this.parseClassId(node, isStatement, optionalId);
- }
-
- this.parseClassSuper(node);
- node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass);
- return this.finishNode(node, type);
- }
-
- parseExport(node) {
- const placeholder = this.parsePlaceholder("Identifier");
- if (!placeholder) return super.parseExport(...arguments);
-
- if (!this.isContextual("from") && !this.match(types.comma)) {
- node.specifiers = [];
- node.source = null;
- node.declaration = this.finishPlaceholder(placeholder, "Declaration");
- return this.finishNode(node, "ExportNamedDeclaration");
- }
-
- this.expectPlugin("exportDefaultFrom");
- const specifier = this.startNode();
- specifier.exported = placeholder;
- node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
- return super.parseExport(node);
- }
-
- maybeParseExportDefaultSpecifier(node) {
- if (node.specifiers && node.specifiers.length > 0) {
- return true;
- }
-
- return super.maybeParseExportDefaultSpecifier(...arguments);
- }
-
- checkExport(node) {
- const {
- specifiers
- } = node;
-
- if (specifiers && specifiers.length) {
- node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder");
- }
-
- super.checkExport(node);
- node.specifiers = specifiers;
- }
-
- parseImport(node) {
- const placeholder = this.parsePlaceholder("Identifier");
- if (!placeholder) return super.parseImport(...arguments);
- node.specifiers = [];
-
- if (!this.isContextual("from") && !this.match(types.comma)) {
- node.source = this.finishPlaceholder(placeholder, "StringLiteral");
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
- }
-
- const specifier = this.startNodeAtNode(placeholder);
- specifier.local = placeholder;
- this.finishNode(specifier, "ImportDefaultSpecifier");
- node.specifiers.push(specifier);
-
- if (this.eat(types.comma)) {
- const hasStarImport = this.maybeParseStarImportSpecifier(node);
- if (!hasStarImport) this.parseNamedImportSpecifiers(node);
- }
-
- this.expectContextual("from");
- node.source = this.parseImportSource();
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
- }
-
- parseImportSource() {
- return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
- }
-
-});
-
-function hasPlugin(plugins, name) {
- return plugins.some(plugin => {
- if (Array.isArray(plugin)) {
- return plugin[0] === name;
- } else {
- return plugin === name;
- }
- });
-}
-function getPluginOption(plugins, name, option) {
- const plugin = plugins.find(plugin => {
- if (Array.isArray(plugin)) {
- return plugin[0] === name;
- } else {
- return plugin === name;
- }
- });
-
- if (plugin && Array.isArray(plugin)) {
- return plugin[1][option];
- }
-
- return null;
-}
-const PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
-function validatePlugins(plugins) {
- if (hasPlugin(plugins, "decorators")) {
- if (hasPlugin(plugins, "decorators-legacy")) {
- throw new Error("Cannot use the decorators and decorators-legacy plugin together");
- }
-
- const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
-
- if (decoratorsBeforeExport == null) {
- throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'.");
- } else if (typeof decoratorsBeforeExport !== "boolean") {
- throw new Error("'decoratorsBeforeExport' must be a boolean.");
- }
- }
-
- if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
- throw new Error("Cannot combine flow and typescript plugins.");
- }
-
- if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
- throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", "));
- }
-}
-const mixinPlugins = {
- estree,
- jsx,
- flow,
- typescript,
- placeholders
-};
-const mixinPluginNames = Object.keys(mixinPlugins);
-
-const defaultOptions = {
- sourceType: "script",
- sourceFilename: undefined,
- startLine: 1,
- allowAwaitOutsideFunction: false,
- allowReturnOutsideFunction: false,
- allowImportExportEverywhere: false,
- allowSuperOutsideMethod: false,
- allowUndeclaredExports: false,
- plugins: [],
- strictMode: null,
- ranges: false,
- tokens: false,
- createParenthesizedExpressions: false
-};
-function getOptions(opts) {
- const options = {};
-
- for (let _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) {
- const key = _Object$keys[_i];
- options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
- }
-
- return options;
-}
-
-class Position {
- constructor(line, col) {
- this.line = line;
- this.column = col;
- }
-
-}
-class SourceLocation {
- constructor(start, end) {
- this.start = start;
- this.end = end;
- }
-
-}
-function getLineInfo(input, offset) {
- let line = 1;
- let lineStart = 0;
- let match;
- lineBreakG.lastIndex = 0;
-
- while ((match = lineBreakG.exec(input)) && match.index < offset) {
- line++;
- lineStart = lineBreakG.lastIndex;
- }
-
- return new Position(line, offset - lineStart);
-}
-
-class BaseParser {
- constructor() {
- this.sawUnambiguousESM = false;
- }
-
- hasPlugin(name) {
- return this.plugins.has(name);
- }
-
- getPluginOption(plugin, name) {
- if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];
- }
-
-}
-
-function last(stack) {
- return stack[stack.length - 1];
-}
-
-class CommentsParser extends BaseParser {
- addComment(comment) {
- if (this.filename) comment.loc.filename = this.filename;
- this.state.trailingComments.push(comment);
- this.state.leadingComments.push(comment);
- }
-
- processComment(node) {
- if (node.type === "Program" && node.body.length > 0) return;
- const stack = this.state.commentStack;
- let firstChild, lastChild, trailingComments, i, j;
-
- if (this.state.trailingComments.length > 0) {
- if (this.state.trailingComments[0].start >= node.end) {
- trailingComments = this.state.trailingComments;
- this.state.trailingComments = [];
- } else {
- this.state.trailingComments.length = 0;
- }
- } else if (stack.length > 0) {
- const lastInStack = last(stack);
-
- if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
- trailingComments = lastInStack.trailingComments;
- delete lastInStack.trailingComments;
- }
- }
-
- if (stack.length > 0 && last(stack).start >= node.start) {
- firstChild = stack.pop();
- }
-
- while (stack.length > 0 && last(stack).start >= node.start) {
- lastChild = stack.pop();
- }
-
- if (!lastChild && firstChild) lastChild = firstChild;
-
- if (firstChild && this.state.leadingComments.length > 0) {
- const lastComment = last(this.state.leadingComments);
-
- if (firstChild.type === "ObjectProperty") {
- if (lastComment.start >= node.start) {
- if (this.state.commentPreviousNode) {
- for (j = 0; j < this.state.leadingComments.length; j++) {
- if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
- this.state.leadingComments.splice(j, 1);
- j--;
- }
- }
-
- if (this.state.leadingComments.length > 0) {
- firstChild.trailingComments = this.state.leadingComments;
- this.state.leadingComments = [];
- }
- }
- }
- } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) {
- const lastArg = last(node.arguments);
-
- if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) {
- if (this.state.commentPreviousNode) {
- for (j = 0; j < this.state.leadingComments.length; j++) {
- if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
- this.state.leadingComments.splice(j, 1);
- j--;
- }
- }
-
- if (this.state.leadingComments.length > 0) {
- lastArg.trailingComments = this.state.leadingComments;
- this.state.leadingComments = [];
- }
- }
- }
- }
- }
-
- if (lastChild) {
- if (lastChild.leadingComments) {
- if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
- node.leadingComments = lastChild.leadingComments;
- delete lastChild.leadingComments;
- } else {
- for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
- if (lastChild.leadingComments[i].end <= node.start) {
- node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
- break;
- }
- }
- }
- }
- } else if (this.state.leadingComments.length > 0) {
- if (last(this.state.leadingComments).end <= node.start) {
- if (this.state.commentPreviousNode) {
- for (j = 0; j < this.state.leadingComments.length; j++) {
- if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
- this.state.leadingComments.splice(j, 1);
- j--;
- }
- }
- }
-
- if (this.state.leadingComments.length > 0) {
- node.leadingComments = this.state.leadingComments;
- this.state.leadingComments = [];
- }
- } else {
- for (i = 0; i < this.state.leadingComments.length; i++) {
- if (this.state.leadingComments[i].end > node.start) {
- break;
- }
- }
-
- const leadingComments = this.state.leadingComments.slice(0, i);
-
- if (leadingComments.length) {
- node.leadingComments = leadingComments;
- }
-
- trailingComments = this.state.leadingComments.slice(i);
-
- if (trailingComments.length === 0) {
- trailingComments = null;
- }
- }
- }
-
- this.state.commentPreviousNode = node;
-
- if (trailingComments) {
- if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
- node.innerComments = trailingComments;
- } else {
- node.trailingComments = trailingComments;
- }
- }
-
- stack.push(node);
- }
-
-}
-
-class LocationParser extends CommentsParser {
- getLocationForPosition(pos) {
- let loc;
- if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos);
- return loc;
- }
-
- raise(pos, message, {
- missingPluginNames,
- code
- } = {}) {
- const loc = this.getLocationForPosition(pos);
- message += ` (${loc.line}:${loc.column})`;
- const err = new SyntaxError(message);
- err.pos = pos;
- err.loc = loc;
-
- if (missingPluginNames) {
- err.missingPlugin = missingPluginNames;
- }
-
- if (code !== undefined) {
- err.code = code;
- }
-
- throw err;
- }
-
-}
-
-class State {
- constructor() {
- this.potentialArrowAt = -1;
- this.noArrowAt = [];
- this.noArrowParamsConversionAt = [];
- this.commaAfterSpreadAt = -1;
- this.inParameters = false;
- this.maybeInArrowParameters = false;
- this.inPipeline = false;
- this.inType = false;
- this.noAnonFunctionType = false;
- this.inPropertyName = false;
- this.inClassProperty = false;
- this.hasFlowComment = false;
- this.isIterator = false;
- this.topicContext = {
- maxNumOfResolvableTopics: 0,
- maxTopicIndex: null
- };
- this.soloAwait = false;
- this.inFSharpPipelineDirectBody = false;
- this.classLevel = 0;
- this.labels = [];
- this.decoratorStack = [[]];
- this.yieldPos = 0;
- this.awaitPos = 0;
- this.tokens = [];
- this.comments = [];
- this.trailingComments = [];
- this.leadingComments = [];
- this.commentStack = [];
- this.commentPreviousNode = null;
- this.pos = 0;
- this.lineStart = 0;
- this.type = types.eof;
- this.value = null;
- this.start = 0;
- this.end = 0;
- this.lastTokEndLoc = null;
- this.lastTokStartLoc = null;
- this.lastTokStart = 0;
- this.lastTokEnd = 0;
- this.context = [types$1.braceStatement];
- this.exprAllowed = true;
- this.containsEsc = false;
- this.containsOctal = false;
- this.octalPosition = null;
- this.exportedIdentifiers = [];
- this.invalidTemplateEscapePosition = null;
- }
-
- init(options) {
- this.strict = options.strictMode === false ? false : options.sourceType === "module";
- this.curLine = options.startLine;
- this.startLoc = this.endLoc = this.curPosition();
- }
-
- curPosition() {
- return new Position(this.curLine, this.pos - this.lineStart);
- }
-
- clone(skipArrays) {
- const state = new State();
- const keys = Object.keys(this);
-
- for (let i = 0, length = keys.length; i < length; i++) {
- const key = keys[i];
- let val = this[key];
-
- if (!skipArrays && Array.isArray(val)) {
- val = val.slice();
- }
-
- state[key] = val;
- }
-
- return state;
- }
-
-}
-
-var _isDigit = function isDigit(code) {
- return code >= 48 && code <= 57;
-};
-const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]);
-const forbiddenNumericSeparatorSiblings = {
- decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
- hex: [46, 88, 95, 120]
-};
-const allowedNumericSeparatorSiblings = {};
-allowedNumericSeparatorSiblings.bin = [48, 49];
-allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
-allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
-allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
-class Token {
- constructor(state) {
- this.type = state.type;
- this.value = state.value;
- this.start = state.start;
- this.end = state.end;
- this.loc = new SourceLocation(state.startLoc, state.endLoc);
- }
-
-}
-class Tokenizer extends LocationParser {
- constructor(options, input) {
- super();
- this.state = new State();
- this.state.init(options);
- this.input = input;
- this.length = input.length;
- this.isLookahead = false;
- }
-
- next() {
- if (this.options.tokens && !this.isLookahead) {
- this.state.tokens.push(new Token(this.state));
- }
-
- this.state.lastTokEnd = this.state.end;
- this.state.lastTokStart = this.state.start;
- this.state.lastTokEndLoc = this.state.endLoc;
- this.state.lastTokStartLoc = this.state.startLoc;
- this.nextToken();
- }
-
- eat(type) {
- if (this.match(type)) {
- this.next();
- return true;
- } else {
- return false;
- }
- }
-
- match(type) {
- return this.state.type === type;
- }
-
- lookahead() {
- const old = this.state;
- this.state = old.clone(true);
- this.isLookahead = true;
- this.next();
- this.isLookahead = false;
- const curr = this.state;
- this.state = old;
- return curr;
- }
-
- setStrict(strict) {
- this.state.strict = strict;
- if (!this.match(types.num) && !this.match(types.string)) return;
- this.state.pos = this.state.start;
-
- while (this.state.pos < this.state.lineStart) {
- this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1;
- --this.state.curLine;
- }
-
- this.nextToken();
- }
-
- curContext() {
- return this.state.context[this.state.context.length - 1];
- }
-
- nextToken() {
- const curContext = this.curContext();
- if (!curContext || !curContext.preserveSpace) this.skipSpace();
- this.state.containsOctal = false;
- this.state.octalPosition = null;
- this.state.start = this.state.pos;
- this.state.startLoc = this.state.curPosition();
-
- if (this.state.pos >= this.length) {
- this.finishToken(types.eof);
- return;
- }
-
- if (curContext.override) {
- curContext.override(this);
- } else {
- this.getTokenFromCode(this.input.codePointAt(this.state.pos));
- }
- }
-
- pushComment(block, text, start, end, startLoc, endLoc) {
- const comment = {
- type: block ? "CommentBlock" : "CommentLine",
- value: text,
- start: start,
- end: end,
- loc: new SourceLocation(startLoc, endLoc)
- };
- if (this.options.tokens) this.state.tokens.push(comment);
- this.state.comments.push(comment);
- this.addComment(comment);
- }
-
- skipBlockComment() {
- const startLoc = this.state.curPosition();
- const start = this.state.pos;
- const end = this.input.indexOf("*/", this.state.pos += 2);
- if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
- this.state.pos = end + 2;
- lineBreakG.lastIndex = start;
- let match;
-
- while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
- ++this.state.curLine;
- this.state.lineStart = match.index + match[0].length;
- }
-
- if (this.isLookahead) return;
- this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
- }
-
- skipLineComment(startSkip) {
- const start = this.state.pos;
- const startLoc = this.state.curPosition();
- let ch = this.input.charCodeAt(this.state.pos += startSkip);
-
- if (this.state.pos < this.length) {
- while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) {
- ch = this.input.charCodeAt(this.state.pos);
- }
- }
-
- if (this.isLookahead) return;
- this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
- }
-
- skipSpace() {
- loop: while (this.state.pos < this.length) {
- const ch = this.input.charCodeAt(this.state.pos);
-
- switch (ch) {
- case 32:
- case 160:
- case 9:
- ++this.state.pos;
- break;
-
- case 13:
- if (this.input.charCodeAt(this.state.pos + 1) === 10) {
- ++this.state.pos;
- }
-
- case 10:
- case 8232:
- case 8233:
- ++this.state.pos;
- ++this.state.curLine;
- this.state.lineStart = this.state.pos;
- break;
-
- case 47:
- switch (this.input.charCodeAt(this.state.pos + 1)) {
- case 42:
- this.skipBlockComment();
- break;
-
- case 47:
- this.skipLineComment(2);
- break;
-
- default:
- break loop;
- }
-
- break;
-
- default:
- if (isWhitespace(ch)) {
- ++this.state.pos;
- } else {
- break loop;
- }
-
- }
- }
- }
-
- finishToken(type, val) {
- this.state.end = this.state.pos;
- this.state.endLoc = this.state.curPosition();
- const prevType = this.state.type;
- this.state.type = type;
- this.state.value = val;
- if (!this.isLookahead) this.updateContext(prevType);
- }
-
- readToken_numberSign() {
- if (this.state.pos === 0 && this.readToken_interpreter()) {
- return;
- }
-
- const nextPos = this.state.pos + 1;
- const next = this.input.charCodeAt(nextPos);
-
- if (next >= 48 && next <= 57) {
- this.raise(this.state.pos, "Unexpected digit after hash token");
- }
-
- if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) {
- ++this.state.pos;
- this.finishToken(types.hash);
- return;
- } else if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
- this.finishOp(types.hash, 1);
- } else {
- this.raise(this.state.pos, "Unexpected character '#'");
- }
- }
-
- readToken_dot() {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next >= 48 && next <= 57) {
- this.readNumber(true);
- return;
- }
-
- const next2 = this.input.charCodeAt(this.state.pos + 2);
-
- if (next === 46 && next2 === 46) {
- this.state.pos += 3;
- this.finishToken(types.ellipsis);
- } else {
- ++this.state.pos;
- this.finishToken(types.dot);
- }
- }
-
- readToken_slash() {
- if (this.state.exprAllowed && !this.state.inType) {
- ++this.state.pos;
- this.readRegexp();
- return;
- }
-
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- } else {
- this.finishOp(types.slash, 1);
- }
- }
-
- readToken_interpreter() {
- if (this.state.pos !== 0 || this.length < 2) return false;
- const start = this.state.pos;
- this.state.pos += 1;
- let ch = this.input.charCodeAt(this.state.pos);
- if (ch !== 33) return false;
-
- while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) {
- ch = this.input.charCodeAt(this.state.pos);
- }
-
- const value = this.input.slice(start + 2, this.state.pos);
- this.finishToken(types.interpreterDirective, value);
- return true;
- }
-
- readToken_mult_modulo(code) {
- let type = code === 42 ? types.star : types.modulo;
- let width = 1;
- let next = this.input.charCodeAt(this.state.pos + 1);
- const exprAllowed = this.state.exprAllowed;
-
- if (code === 42 && next === 42) {
- width++;
- next = this.input.charCodeAt(this.state.pos + 2);
- type = types.exponent;
- }
-
- if (next === 61 && !exprAllowed) {
- width++;
- type = types.assign;
- }
-
- this.finishOp(type, width);
- }
-
- readToken_pipe_amp(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === code) {
- if (this.input.charCodeAt(this.state.pos + 2) === 61) {
- this.finishOp(types.assign, 3);
- } else {
- this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
- }
-
- return;
- }
-
- if (code === 124) {
- if (next === 62) {
- this.finishOp(types.pipeline, 2);
- return;
- }
- }
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- return;
- }
-
- this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
- }
-
- readToken_caret() {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- } else {
- this.finishOp(types.bitwiseXOR, 1);
- }
- }
-
- readToken_plus_min(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === code) {
- if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)))) {
- this.skipLineComment(3);
- this.skipSpace();
- this.nextToken();
- return;
- }
-
- this.finishOp(types.incDec, 2);
- return;
- }
-
- if (next === 61) {
- this.finishOp(types.assign, 2);
- } else {
- this.finishOp(types.plusMin, 1);
- }
- }
-
- readToken_lt_gt(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
- let size = 1;
-
- if (next === code) {
- size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
-
- if (this.input.charCodeAt(this.state.pos + size) === 61) {
- this.finishOp(types.assign, size + 1);
- return;
- }
-
- this.finishOp(types.bitShift, size);
- return;
- }
-
- if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
- this.skipLineComment(4);
- this.skipSpace();
- this.nextToken();
- return;
- }
-
- if (next === 61) {
- size = 2;
- }
-
- this.finishOp(types.relational, size);
- }
-
- readToken_eq_excl(code) {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 61) {
- this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
- return;
- }
-
- if (code === 61 && next === 62) {
- this.state.pos += 2;
- this.finishToken(types.arrow);
- return;
- }
-
- this.finishOp(code === 61 ? types.eq : types.bang, 1);
- }
-
- readToken_question() {
- const next = this.input.charCodeAt(this.state.pos + 1);
- const next2 = this.input.charCodeAt(this.state.pos + 2);
-
- if (next === 63 && !this.state.inType) {
- if (next2 === 61) {
- this.finishOp(types.assign, 3);
- } else {
- this.finishOp(types.nullishCoalescing, 2);
- }
- } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
- this.state.pos += 2;
- this.finishToken(types.questionDot);
- } else {
- ++this.state.pos;
- this.finishToken(types.question);
- }
- }
-
- getTokenFromCode(code) {
- switch (code) {
- case 46:
- this.readToken_dot();
- return;
-
- case 40:
- ++this.state.pos;
- this.finishToken(types.parenL);
- return;
-
- case 41:
- ++this.state.pos;
- this.finishToken(types.parenR);
- return;
-
- case 59:
- ++this.state.pos;
- this.finishToken(types.semi);
- return;
-
- case 44:
- ++this.state.pos;
- this.finishToken(types.comma);
- return;
-
- case 91:
- ++this.state.pos;
- this.finishToken(types.bracketL);
- return;
-
- case 93:
- ++this.state.pos;
- this.finishToken(types.bracketR);
- return;
-
- case 123:
- ++this.state.pos;
- this.finishToken(types.braceL);
- return;
-
- case 125:
- ++this.state.pos;
- this.finishToken(types.braceR);
- return;
-
- case 58:
- if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
- this.finishOp(types.doubleColon, 2);
- } else {
- ++this.state.pos;
- this.finishToken(types.colon);
- }
-
- return;
-
- case 63:
- this.readToken_question();
- return;
-
- case 96:
- ++this.state.pos;
- this.finishToken(types.backQuote);
- return;
-
- case 48:
- {
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (next === 120 || next === 88) {
- this.readRadixNumber(16);
- return;
- }
-
- if (next === 111 || next === 79) {
- this.readRadixNumber(8);
- return;
- }
-
- if (next === 98 || next === 66) {
- this.readRadixNumber(2);
- return;
- }
- }
-
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- this.readNumber(false);
- return;
-
- case 34:
- case 39:
- this.readString(code);
- return;
-
- case 47:
- this.readToken_slash();
- return;
-
- case 37:
- case 42:
- this.readToken_mult_modulo(code);
- return;
-
- case 124:
- case 38:
- this.readToken_pipe_amp(code);
- return;
-
- case 94:
- this.readToken_caret();
- return;
-
- case 43:
- case 45:
- this.readToken_plus_min(code);
- return;
-
- case 60:
- case 62:
- this.readToken_lt_gt(code);
- return;
-
- case 61:
- case 33:
- this.readToken_eq_excl(code);
- return;
-
- case 126:
- this.finishOp(types.tilde, 1);
- return;
-
- case 64:
- ++this.state.pos;
- this.finishToken(types.at);
- return;
-
- case 35:
- this.readToken_numberSign();
- return;
-
- case 92:
- this.readWord();
- return;
-
- default:
- if (isIdentifierStart(code)) {
- this.readWord();
- return;
- }
-
- }
-
- this.raise(this.state.pos, `Unexpected character '${String.fromCodePoint(code)}'`);
- }
-
- finishOp(type, size) {
- const str = this.input.slice(this.state.pos, this.state.pos + size);
- this.state.pos += size;
- this.finishToken(type, str);
- }
-
- readRegexp() {
- const start = this.state.pos;
- let escaped, inClass;
-
- for (;;) {
- if (this.state.pos >= this.length) {
- this.raise(start, "Unterminated regular expression");
- }
-
- const ch = this.input.charAt(this.state.pos);
-
- if (lineBreak.test(ch)) {
- this.raise(start, "Unterminated regular expression");
- }
-
- if (escaped) {
- escaped = false;
- } else {
- if (ch === "[") {
- inClass = true;
- } else if (ch === "]" && inClass) {
- inClass = false;
- } else if (ch === "/" && !inClass) {
- break;
- }
-
- escaped = ch === "\\";
- }
-
- ++this.state.pos;
- }
-
- const content = this.input.slice(start, this.state.pos);
- ++this.state.pos;
- let mods = "";
-
- while (this.state.pos < this.length) {
- const char = this.input[this.state.pos];
- const charCode = this.input.codePointAt(this.state.pos);
-
- if (VALID_REGEX_FLAGS.has(char)) {
- if (mods.indexOf(char) > -1) {
- this.raise(this.state.pos + 1, "Duplicate regular expression flag");
- }
-
- ++this.state.pos;
- mods += char;
- } else if (isIdentifierChar(charCode) || charCode === 92) {
- this.raise(this.state.pos + 1, "Invalid regular expression flag");
- } else {
- break;
- }
- }
-
- this.finishToken(types.regexp, {
- pattern: content,
- flags: mods
- });
- }
-
- readInt(radix, len) {
- const start = this.state.pos;
- const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
- const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
- let total = 0;
-
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- const code = this.input.charCodeAt(this.state.pos);
- let val;
-
- if (this.hasPlugin("numericSeparator")) {
- const prev = this.input.charCodeAt(this.state.pos - 1);
- const next = this.input.charCodeAt(this.state.pos + 1);
-
- if (code === 95) {
- if (allowedSiblings.indexOf(next) === -1) {
- this.raise(this.state.pos, "Invalid or unexpected token");
- }
-
- if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
- this.raise(this.state.pos, "Invalid or unexpected token");
- }
-
- ++this.state.pos;
- continue;
- }
- }
-
- if (code >= 97) {
- val = code - 97 + 10;
- } else if (code >= 65) {
- val = code - 65 + 10;
- } else if (_isDigit(code)) {
- val = code - 48;
- } else {
- val = Infinity;
- }
-
- if (val >= radix) break;
- ++this.state.pos;
- total = total * radix + val;
- }
-
- if (this.state.pos === start || len != null && this.state.pos - start !== len) {
- return null;
- }
-
- return total;
- }
-
- readRadixNumber(radix) {
- const start = this.state.pos;
- let isBigInt = false;
- this.state.pos += 2;
- const val = this.readInt(radix);
-
- if (val == null) {
- this.raise(this.state.start + 2, "Expected number in radix " + radix);
- }
-
- if (this.hasPlugin("bigInt")) {
- if (this.input.charCodeAt(this.state.pos) === 110) {
- ++this.state.pos;
- isBigInt = true;
- }
- }
-
- if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
- this.raise(this.state.pos, "Identifier directly after number");
- }
-
- if (isBigInt) {
- const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
- this.finishToken(types.bigint, str);
- return;
- }
-
- this.finishToken(types.num, val);
- }
-
- readNumber(startsWithDot) {
- const start = this.state.pos;
- let isFloat = false;
- let isBigInt = false;
-
- if (!startsWithDot && this.readInt(10) === null) {
- this.raise(start, "Invalid number");
- }
-
- let octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48;
-
- if (octal) {
- if (this.state.strict) {
- this.raise(start, "Legacy octal literals are not allowed in strict mode");
- }
-
- if (/[89]/.test(this.input.slice(start, this.state.pos))) {
- octal = false;
- }
- }
-
- let next = this.input.charCodeAt(this.state.pos);
-
- if (next === 46 && !octal) {
- ++this.state.pos;
- this.readInt(10);
- isFloat = true;
- next = this.input.charCodeAt(this.state.pos);
- }
-
- if ((next === 69 || next === 101) && !octal) {
- next = this.input.charCodeAt(++this.state.pos);
-
- if (next === 43 || next === 45) {
- ++this.state.pos;
- }
-
- if (this.readInt(10) === null) this.raise(start, "Invalid number");
- isFloat = true;
- next = this.input.charCodeAt(this.state.pos);
- }
-
- if (this.hasPlugin("bigInt")) {
- if (next === 110) {
- if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral");
- ++this.state.pos;
- isBigInt = true;
- }
- }
-
- if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {
- this.raise(this.state.pos, "Identifier directly after number");
- }
-
- const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
-
- if (isBigInt) {
- this.finishToken(types.bigint, str);
- return;
- }
-
- const val = octal ? parseInt(str, 8) : parseFloat(str);
- this.finishToken(types.num, val);
- }
-
- readCodePoint(throwOnInvalid) {
- const ch = this.input.charCodeAt(this.state.pos);
- let code;
-
- if (ch === 123) {
- const codePos = ++this.state.pos;
- code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid);
- ++this.state.pos;
-
- if (code === null) {
- --this.state.invalidTemplateEscapePosition;
- } else if (code > 0x10ffff) {
- if (throwOnInvalid) {
- this.raise(codePos, "Code point out of bounds");
- } else {
- this.state.invalidTemplateEscapePosition = codePos - 2;
- return null;
- }
- }
- } else {
- code = this.readHexChar(4, throwOnInvalid);
- }
-
- return code;
- }
-
- readString(quote) {
- let out = "",
- chunkStart = ++this.state.pos;
-
- for (;;) {
- if (this.state.pos >= this.length) {
- this.raise(this.state.start, "Unterminated string constant");
- }
-
- const ch = this.input.charCodeAt(this.state.pos);
- if (ch === quote) break;
-
- if (ch === 92) {
- out += this.input.slice(chunkStart, this.state.pos);
- out += this.readEscapedChar(false);
- chunkStart = this.state.pos;
- } else if (ch === 8232 || ch === 8233) {
- ++this.state.pos;
- ++this.state.curLine;
- } else if (isNewLine(ch)) {
- this.raise(this.state.start, "Unterminated string constant");
- } else {
- ++this.state.pos;
- }
- }
-
- out += this.input.slice(chunkStart, this.state.pos++);
- this.finishToken(types.string, out);
- }
-
- readTmplToken() {
- let out = "",
- chunkStart = this.state.pos,
- containsInvalid = false;
-
- for (;;) {
- if (this.state.pos >= this.length) {
- this.raise(this.state.start, "Unterminated template");
- }
-
- const ch = this.input.charCodeAt(this.state.pos);
-
- if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
- if (this.state.pos === this.state.start && this.match(types.template)) {
- if (ch === 36) {
- this.state.pos += 2;
- this.finishToken(types.dollarBraceL);
- return;
- } else {
- ++this.state.pos;
- this.finishToken(types.backQuote);
- return;
- }
- }
-
- out += this.input.slice(chunkStart, this.state.pos);
- this.finishToken(types.template, containsInvalid ? null : out);
- return;
- }
-
- if (ch === 92) {
- out += this.input.slice(chunkStart, this.state.pos);
- const escaped = this.readEscapedChar(true);
-
- if (escaped === null) {
- containsInvalid = true;
- } else {
- out += escaped;
- }
-
- chunkStart = this.state.pos;
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.state.pos);
- ++this.state.pos;
-
- switch (ch) {
- case 13:
- if (this.input.charCodeAt(this.state.pos) === 10) {
- ++this.state.pos;
- }
-
- case 10:
- out += "\n";
- break;
-
- default:
- out += String.fromCharCode(ch);
- break;
- }
-
- ++this.state.curLine;
- this.state.lineStart = this.state.pos;
- chunkStart = this.state.pos;
- } else {
- ++this.state.pos;
- }
- }
- }
-
- readEscapedChar(inTemplate) {
- const throwOnInvalid = !inTemplate;
- const ch = this.input.charCodeAt(++this.state.pos);
- ++this.state.pos;
-
- switch (ch) {
- case 110:
- return "\n";
-
- case 114:
- return "\r";
-
- case 120:
- {
- const code = this.readHexChar(2, throwOnInvalid);
- return code === null ? null : String.fromCharCode(code);
- }
-
- case 117:
- {
- const code = this.readCodePoint(throwOnInvalid);
- return code === null ? null : String.fromCodePoint(code);
- }
-
- case 116:
- return "\t";
-
- case 98:
- return "\b";
-
- case 118:
- return "\u000b";
-
- case 102:
- return "\f";
-
- case 13:
- if (this.input.charCodeAt(this.state.pos) === 10) {
- ++this.state.pos;
- }
-
- case 10:
- this.state.lineStart = this.state.pos;
- ++this.state.curLine;
-
- case 8232:
- case 8233:
- return "";
-
- default:
- if (ch >= 48 && ch <= 55) {
- const codePos = this.state.pos - 1;
- let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];
- let octal = parseInt(octalStr, 8);
-
- if (octal > 255) {
- octalStr = octalStr.slice(0, -1);
- octal = parseInt(octalStr, 8);
- }
-
- this.state.pos += octalStr.length - 1;
- const next = this.input.charCodeAt(this.state.pos);
-
- if (octalStr !== "0" || next === 56 || next === 57) {
- if (inTemplate) {
- this.state.invalidTemplateEscapePosition = codePos;
- return null;
- } else if (this.state.strict) {
- this.raise(codePos, "Octal literal in strict mode");
- } else if (!this.state.containsOctal) {
- this.state.containsOctal = true;
- this.state.octalPosition = codePos;
- }
- }
-
- return String.fromCharCode(octal);
- }
-
- return String.fromCharCode(ch);
- }
- }
-
- readHexChar(len, throwOnInvalid) {
- const codePos = this.state.pos;
- const n = this.readInt(16, len);
-
- if (n === null) {
- if (throwOnInvalid) {
- this.raise(codePos, "Bad character escape sequence");
- } else {
- this.state.pos = codePos - 1;
- this.state.invalidTemplateEscapePosition = codePos - 1;
- }
- }
-
- return n;
- }
-
- readWord1() {
- let word = "";
- this.state.containsEsc = false;
- const start = this.state.pos;
- let chunkStart = this.state.pos;
-
- while (this.state.pos < this.length) {
- const ch = this.input.codePointAt(this.state.pos);
-
- if (isIdentifierChar(ch)) {
- this.state.pos += ch <= 0xffff ? 1 : 2;
- } else if (this.state.isIterator && ch === 64) {
- ++this.state.pos;
- } else if (ch === 92) {
- this.state.containsEsc = true;
- word += this.input.slice(chunkStart, this.state.pos);
- const escStart = this.state.pos;
- const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
-
- if (this.input.charCodeAt(++this.state.pos) !== 117) {
- this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
- }
-
- ++this.state.pos;
- const esc = this.readCodePoint(true);
-
- if (!identifierCheck(esc, true)) {
- this.raise(escStart, "Invalid Unicode escape");
- }
-
- word += String.fromCodePoint(esc);
- chunkStart = this.state.pos;
- } else {
- break;
- }
- }
-
- return word + this.input.slice(chunkStart, this.state.pos);
- }
-
- isIterator(word) {
- return word === "@@iterator" || word === "@@asyncIterator";
- }
-
- readWord() {
- const word = this.readWord1();
- const type = keywords.get(word) || types.name;
-
- if (type.keyword && this.state.containsEsc) {
- this.raise(this.state.pos, `Escape sequence in keyword ${word}`);
- }
-
- if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) {
- this.raise(this.state.pos, `Invalid identifier ${word}`);
- }
-
- this.finishToken(type, word);
- }
-
- braceIsBlock(prevType) {
- const parent = this.curContext();
-
- if (parent === types$1.functionExpression || parent === types$1.functionStatement) {
- return true;
- }
-
- if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) {
- return !parent.isExpr;
- }
-
- if (prevType === types._return || prevType === types.name && this.state.exprAllowed) {
- return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
- }
-
- if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) {
- return true;
- }
-
- if (prevType === types.braceL) {
- return parent === types$1.braceStatement;
- }
-
- if (prevType === types._var || prevType === types._const || prevType === types.name) {
- return false;
- }
-
- if (prevType === types.relational) {
- return true;
- }
-
- return !this.state.exprAllowed;
- }
-
- updateContext(prevType) {
- const type = this.state.type;
- let update;
-
- if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) {
- this.state.exprAllowed = false;
- } else if (update = type.updateContext) {
- update.call(this, prevType);
- } else {
- this.state.exprAllowed = type.beforeExpr;
- }
- }
-
-}
-
-const literal = /^('|")((?:\\?.)*?)\1/;
-class UtilParser extends Tokenizer {
- addExtra(node, key, val) {
- if (!node) return;
- const extra = node.extra = node.extra || {};
- extra[key] = val;
- }
-
- isRelational(op) {
- return this.match(types.relational) && this.state.value === op;
- }
-
- isLookaheadRelational(op) {
- const l = this.lookahead();
- return l.type === types.relational && l.value === op;
- }
-
- expectRelational(op) {
- if (this.isRelational(op)) {
- this.next();
- } else {
- this.unexpected(null, types.relational);
- }
- }
-
- eatRelational(op) {
- if (this.isRelational(op)) {
- this.next();
- return true;
- }
-
- return false;
- }
-
- isContextual(name) {
- return this.match(types.name) && this.state.value === name && !this.state.containsEsc;
- }
-
- isLookaheadContextual(name) {
- const l = this.lookahead();
- return l.type === types.name && l.value === name;
- }
-
- eatContextual(name) {
- return this.isContextual(name) && this.eat(types.name);
- }
-
- expectContextual(name, message) {
- if (!this.eatContextual(name)) this.unexpected(null, message);
- }
-
- canInsertSemicolon() {
- return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak();
- }
-
- hasPrecedingLineBreak() {
- return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
- }
-
- isLineTerminator() {
- return this.eat(types.semi) || this.canInsertSemicolon();
- }
-
- semicolon() {
- if (!this.isLineTerminator()) this.unexpected(null, types.semi);
- }
-
- expect(type, pos) {
- this.eat(type) || this.unexpected(pos, type);
- }
-
- assertNoSpace(message = "Unexpected space.") {
- if (this.state.start > this.state.lastTokEnd) {
- this.raise(this.state.lastTokEnd, message);
- }
- }
-
- unexpected(pos, messageOrType = "Unexpected token") {
- if (typeof messageOrType !== "string") {
- messageOrType = `Unexpected token, expected "${messageOrType.label}"`;
- }
-
- throw this.raise(pos != null ? pos : this.state.start, messageOrType);
- }
-
- expectPlugin(name, pos) {
- if (!this.hasPlugin(name)) {
- throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling the parser plugin: '${name}'`, {
- missingPluginNames: [name]
- });
- }
-
- return true;
- }
-
- expectOnePlugin(names, pos) {
- if (!names.some(n => this.hasPlugin(n))) {
- throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`, {
- missingPluginNames: names
- });
- }
- }
-
- checkYieldAwaitInDefaultParams() {
- if (this.state.yieldPos && (!this.state.awaitPos || this.state.yieldPos < this.state.awaitPos)) {
- this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function");
- }
-
- if (this.state.awaitPos) {
- this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function");
- }
- }
-
- strictDirective(start) {
- for (;;) {
- skipWhiteSpace.lastIndex = start;
- start += skipWhiteSpace.exec(this.input)[0].length;
- const match = literal.exec(this.input.slice(start));
- if (!match) break;
- if (match[2] === "use strict") return true;
- start += match[0].length;
- skipWhiteSpace.lastIndex = start;
- start += skipWhiteSpace.exec(this.input)[0].length;
-
- if (this.input[start] === ";") {
- start++;
- }
- }
-
- return false;
- }
-
-}
-
-class Node {
- constructor(parser, pos, loc) {
- this.type = "";
- this.start = pos;
- this.end = 0;
- this.loc = new SourceLocation(loc);
- if (parser && parser.options.ranges) this.range = [pos, 0];
- if (parser && parser.filename) this.loc.filename = parser.filename;
- }
-
- __clone() {
- const newNode = new Node();
- const keys = Object.keys(this);
-
- for (let i = 0, length = keys.length; i < length; i++) {
- const key = keys[i];
-
- if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
- newNode[key] = this[key];
- }
- }
-
- return newNode;
- }
-
-}
-
-class NodeUtils extends UtilParser {
- startNode() {
- return new Node(this, this.state.start, this.state.startLoc);
- }
-
- startNodeAt(pos, loc) {
- return new Node(this, pos, loc);
- }
-
- startNodeAtNode(type) {
- return this.startNodeAt(type.start, type.loc.start);
- }
-
- finishNode(node, type) {
- return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
- }
-
- finishNodeAt(node, type, pos, loc) {
-
- node.type = type;
- node.end = pos;
- node.loc.end = loc;
- if (this.options.ranges) node.range[1] = pos;
- this.processComment(node);
- return node;
- }
-
- resetStartLocation(node, start, startLoc) {
- node.start = start;
- node.loc.start = startLoc;
- if (this.options.ranges) node.range[0] = start;
- }
-
- resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) {
- node.end = end;
- node.loc.end = endLoc;
- if (this.options.ranges) node.range[1] = end;
- }
-
- resetStartLocationFromNode(node, locationNode) {
- this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
- }
-
-}
-
-class LValParser extends NodeUtils {
- toAssignable(node, isBinding, contextDescription) {
- if (node) {
- switch (node.type) {
- case "Identifier":
- case "ObjectPattern":
- case "ArrayPattern":
- case "AssignmentPattern":
- break;
-
- case "ObjectExpression":
- node.type = "ObjectPattern";
-
- for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
- const prop = node.properties[i];
- const isLast = i === last;
- this.toAssignableObjectExpressionProp(prop, isBinding, isLast);
- }
-
- break;
-
- case "ObjectProperty":
- this.toAssignable(node.value, isBinding, contextDescription);
- break;
-
- case "SpreadElement":
- {
- this.checkToRestConversion(node);
- node.type = "RestElement";
- const arg = node.argument;
- this.toAssignable(arg, isBinding, contextDescription);
- break;
- }
-
- case "ArrayExpression":
- node.type = "ArrayPattern";
- this.toAssignableList(node.elements, isBinding, contextDescription);
- break;
-
- case "AssignmentExpression":
- if (node.operator === "=") {
- node.type = "AssignmentPattern";
- delete node.operator;
- } else {
- this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
- }
-
- break;
-
- case "ParenthesizedExpression":
- node.expression = this.toAssignable(node.expression, isBinding, contextDescription);
- break;
-
- case "MemberExpression":
- if (!isBinding) break;
-
- default:
- {
- const message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression");
- this.raise(node.start, message);
- }
- }
- }
-
- return node;
- }
-
- toAssignableObjectExpressionProp(prop, isBinding, isLast) {
- if (prop.type === "ObjectMethod") {
- const error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods";
- this.raise(prop.key.start, error);
- } else if (prop.type === "SpreadElement" && !isLast) {
- this.raiseRestNotLast(prop.start);
- } else {
- this.toAssignable(prop, isBinding, "object destructuring pattern");
- }
- }
-
- toAssignableList(exprList, isBinding, contextDescription) {
- let end = exprList.length;
-
- if (end) {
- const last = exprList[end - 1];
-
- if (last && last.type === "RestElement") {
- --end;
- } else if (last && last.type === "SpreadElement") {
- last.type = "RestElement";
- const arg = last.argument;
- this.toAssignable(arg, isBinding, contextDescription);
-
- if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
- this.unexpected(arg.start);
- }
-
- --end;
- }
- }
-
- for (let i = 0; i < end; i++) {
- const elt = exprList[i];
-
- if (elt) {
- this.toAssignable(elt, isBinding, contextDescription);
-
- if (elt.type === "RestElement") {
- this.raiseRestNotLast(elt.start);
- }
- }
- }
-
- return exprList;
- }
-
- toReferencedList(exprList, isParenthesizedExpr) {
- return exprList;
- }
-
- toReferencedListDeep(exprList, isParenthesizedExpr) {
- this.toReferencedList(exprList, isParenthesizedExpr);
-
- for (let _i = 0; _i < exprList.length; _i++) {
- const expr = exprList[_i];
-
- if (expr && expr.type === "ArrayExpression") {
- this.toReferencedListDeep(expr.elements);
- }
- }
-
- return exprList;
- }
-
- parseSpread(refShorthandDefaultPos, refNeedsArrowPos) {
- const node = this.startNode();
- this.next();
- node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos);
-
- if (this.state.commaAfterSpreadAt === -1 && this.match(types.comma)) {
- this.state.commaAfterSpreadAt = this.state.start;
- }
-
- return this.finishNode(node, "SpreadElement");
- }
-
- parseRestBinding() {
- const node = this.startNode();
- this.next();
- node.argument = this.parseBindingAtom();
- return this.finishNode(node, "RestElement");
- }
-
- parseBindingAtom() {
- switch (this.state.type) {
- case types.bracketL:
- {
- const node = this.startNode();
- this.next();
- node.elements = this.parseBindingList(types.bracketR, true);
- return this.finishNode(node, "ArrayPattern");
- }
-
- case types.braceL:
- return this.parseObj(true);
- }
-
- return this.parseIdentifier();
- }
-
- parseBindingList(close, allowEmpty, allowModifiers) {
- const elts = [];
- let first = true;
-
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- }
-
- if (allowEmpty && this.match(types.comma)) {
- elts.push(null);
- } else if (this.eat(close)) {
- break;
- } else if (this.match(types.ellipsis)) {
- elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
- this.checkCommaAfterRest();
- this.expect(close);
- break;
- } else {
- const decorators = [];
-
- if (this.match(types.at) && this.hasPlugin("decorators")) {
- this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters");
- }
-
- while (this.match(types.at)) {
- decorators.push(this.parseDecorator());
- }
-
- elts.push(this.parseAssignableListItem(allowModifiers, decorators));
- }
- }
-
- return elts;
- }
-
- parseAssignableListItem(allowModifiers, decorators) {
- const left = this.parseMaybeDefault();
- this.parseAssignableListItemTypes(left);
- const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
-
- if (decorators.length) {
- left.decorators = decorators;
- }
-
- return elt;
- }
-
- parseAssignableListItemTypes(param) {
- return param;
- }
-
- parseMaybeDefault(startPos, startLoc, left) {
- startLoc = startLoc || this.state.startLoc;
- startPos = startPos || this.state.start;
- left = left || this.parseBindingAtom();
- if (!this.eat(types.eq)) return left;
- const node = this.startNodeAt(startPos, startLoc);
- node.left = left;
- node.right = this.parseMaybeAssign();
- return this.finishNode(node, "AssignmentPattern");
- }
-
- checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) {
- switch (expr.type) {
- case "Identifier":
- if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) {
- this.raise(expr.start, `${bindingType === BIND_NONE ? "Assigning to" : "Binding"} '${expr.name}' in strict mode`);
- }
-
- if (checkClashes) {
- const key = `_${expr.name}`;
-
- if (checkClashes[key]) {
- this.raise(expr.start, "Argument name clash");
- } else {
- checkClashes[key] = true;
- }
- }
-
- if (bindingType === BIND_LEXICAL && expr.name === "let") {
- this.raise(expr.start, "'let' is not allowed to be used as a name in 'let' or 'const' declarations.");
- }
-
- if (!(bindingType & BIND_NONE)) {
- this.scope.declareName(expr.name, bindingType, expr.start);
- }
-
- break;
-
- case "MemberExpression":
- if (bindingType !== BIND_NONE) {
- this.raise(expr.start, "Binding member expression");
- }
-
- break;
-
- case "ObjectPattern":
- for (let _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) {
- let prop = _expr$properties[_i2];
- if (prop.type === "ObjectProperty") prop = prop.value;
- this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern");
- }
-
- break;
-
- case "ArrayPattern":
- for (let _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) {
- const elem = _expr$elements[_i3];
-
- if (elem) {
- this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern");
- }
- }
-
- break;
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern");
- break;
-
- case "RestElement":
- this.checkLVal(expr.argument, bindingType, checkClashes, "rest element");
- break;
-
- case "ParenthesizedExpression":
- this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression");
- break;
-
- default:
- {
- const message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression");
- this.raise(expr.start, message);
- }
- }
- }
-
- checkToRestConversion(node) {
- if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
- this.raise(node.argument.start, "Invalid rest operator's argument");
- }
- }
-
- checkCommaAfterRest() {
- if (this.match(types.comma)) {
- this.raiseRestNotLast(this.state.start);
- }
- }
-
- checkCommaAfterRestFromSpread() {
- if (this.state.commaAfterSpreadAt > -1) {
- this.raiseRestNotLast(this.state.commaAfterSpreadAt);
- }
- }
-
- raiseRestNotLast(pos) {
- this.raise(pos, `Rest element must be last element`);
- }
-
-}
-
-const unwrapParenthesizedExpression = node => {
- return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
-};
-
-class ExpressionParser extends LValParser {
- checkPropClash(prop, propHash) {
- if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) {
- return;
- }
-
- const key = prop.key;
- const name = key.type === "Identifier" ? key.name : String(key.value);
-
- if (name === "__proto__") {
- if (propHash.proto) {
- this.raise(key.start, "Redefinition of __proto__ property");
- }
-
- propHash.proto = true;
- }
- }
-
- getExpression() {
- this.scope.enter(SCOPE_PROGRAM);
- this.nextToken();
- const expr = this.parseExpression();
-
- if (!this.match(types.eof)) {
- this.unexpected();
- }
-
- expr.comments = this.state.comments;
- return expr;
- }
-
- parseExpression(noIn, refShorthandDefaultPos) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
-
- if (this.match(types.comma)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.expressions = [expr];
-
- while (this.eat(types.comma)) {
- node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
- }
-
- this.toReferencedList(node.expressions);
- return this.finishNode(node, "SequenceExpression");
- }
-
- return expr;
- }
-
- parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
-
- if (this.isContextual("yield")) {
- if (this.scope.inGenerator) {
- let left = this.parseYield(noIn);
-
- if (afterLeftParse) {
- left = afterLeftParse.call(this, left, startPos, startLoc);
- }
-
- return left;
- } else {
- this.state.exprAllowed = false;
- }
- }
-
- const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt;
- this.state.commaAfterSpreadAt = -1;
- let failOnShorthandAssign;
-
- if (refShorthandDefaultPos) {
- failOnShorthandAssign = false;
- } else {
- refShorthandDefaultPos = {
- start: 0
- };
- failOnShorthandAssign = true;
- }
-
- if (this.match(types.parenL) || this.match(types.name)) {
- this.state.potentialArrowAt = this.state.start;
- }
-
- let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
-
- if (afterLeftParse) {
- left = afterLeftParse.call(this, left, startPos, startLoc);
- }
-
- if (this.state.type.isAssign) {
- const node = this.startNodeAt(startPos, startLoc);
- const operator = this.state.value;
- node.operator = operator;
-
- if (operator === "??=") {
- this.expectPlugin("nullishCoalescingOperator");
- this.expectPlugin("logicalAssignment");
- }
-
- if (operator === "||=" || operator === "&&=") {
- this.expectPlugin("logicalAssignment");
- }
-
- node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
- refShorthandDefaultPos.start = 0;
- this.checkLVal(left, undefined, undefined, "assignment expression");
- const maybePattern = unwrapParenthesizedExpression(left);
- let patternErrorMsg;
-
- if (maybePattern.type === "ObjectPattern") {
- patternErrorMsg = "`({a}) = 0` use `({a} = 0)`";
- } else if (maybePattern.type === "ArrayPattern") {
- patternErrorMsg = "`([a]) = 0` use `([a] = 0)`";
- }
-
- if (patternErrorMsg && (left.extra && left.extra.parenthesized || left.type === "ParenthesizedExpression")) {
- this.raise(maybePattern.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`);
- }
-
- if (patternErrorMsg) this.checkCommaAfterRestFromSpread();
- this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt;
- this.next();
- node.right = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "AssignmentExpression");
- } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt;
- return left;
- }
-
- parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const potentialArrowAt = this.state.potentialArrowAt;
- const expr = this.parseExprOps(noIn, refShorthandDefaultPos);
-
- if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
- return expr;
- }
-
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
- }
-
- parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {
- if (this.eat(types.question)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.test = expr;
- node.consequent = this.parseMaybeAssign();
- this.expect(types.colon);
- node.alternate = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "ConditionalExpression");
- }
-
- return expr;
- }
-
- parseExprOps(noIn, refShorthandDefaultPos) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const potentialArrowAt = this.state.potentialArrowAt;
- const expr = this.parseMaybeUnary(refShorthandDefaultPos);
-
- if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
- return expr;
- }
-
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
- return expr;
- }
-
- return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
- }
-
- parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {
- const prec = this.state.type.binop;
-
- if (prec != null && (!noIn || !this.match(types._in))) {
- if (prec > minPrec) {
- const operator = this.state.value;
-
- if (operator === "|>" && this.state.inFSharpPipelineDirectBody) {
- return left;
- }
-
- const node = this.startNodeAt(leftStartPos, leftStartLoc);
- node.left = left;
- node.operator = operator;
-
- if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) {
- this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
- }
-
- const op = this.state.type;
-
- if (op === types.pipeline) {
- this.expectPlugin("pipelineOperator");
- this.state.inPipeline = true;
- this.checkPipelineAtInfixOperator(left, leftStartPos);
- } else if (op === types.nullishCoalescing) {
- this.expectPlugin("nullishCoalescingOperator");
- }
-
- this.next();
-
- if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
- if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) {
- throw this.raise(this.state.start, `Unexpected "await" after pipeline body; await must have parentheses in minimal proposal`);
- }
- }
-
- node.right = this.parseExprOpRightExpr(op, prec, noIn);
- this.finishNode(node, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression");
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
- }
-
- return left;
- }
-
- parseExprOpRightExpr(op, prec, noIn) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
-
- switch (op) {
- case types.pipeline:
- switch (this.getPluginOption("pipelineOperator", "proposal")) {
- case "smart":
- return this.withTopicPermittingContext(() => {
- return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc);
- });
-
- case "fsharp":
- return this.withSoloAwaitPermittingContext(() => {
- return this.parseFSharpPipelineBody(prec, noIn);
- });
- }
-
- default:
- return this.parseExprOpBaseRightExpr(op, prec, noIn);
- }
- }
-
- parseExprOpBaseRightExpr(op, prec, noIn) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
- }
-
- parseMaybeUnary(refShorthandDefaultPos) {
- if (this.isContextual("await") && (this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction)) {
- return this.parseAwait();
- } else if (this.state.type.prefix) {
- const node = this.startNode();
- const update = this.match(types.incDec);
- node.operator = this.state.value;
- node.prefix = true;
-
- if (node.operator === "throw") {
- this.expectPlugin("throwExpressions");
- }
-
- this.next();
- node.argument = this.parseMaybeUnary();
-
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- if (update) {
- this.checkLVal(node.argument, undefined, undefined, "prefix operation");
- } else if (this.state.strict && node.operator === "delete") {
- const arg = node.argument;
-
- if (arg.type === "Identifier") {
- this.raise(node.start, "Deleting local variable in strict mode");
- } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") {
- this.raise(node.start, "Deleting a private field is not allowed");
- }
- }
-
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
- }
-
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- let expr = this.parseExprSubscripts(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
-
- while (this.state.type.postfix && !this.canInsertSemicolon()) {
- const node = this.startNodeAt(startPos, startLoc);
- node.operator = this.state.value;
- node.prefix = false;
- node.argument = expr;
- this.checkLVal(expr, undefined, undefined, "postfix operation");
- this.next();
- expr = this.finishNode(node, "UpdateExpression");
- }
-
- return expr;
- }
-
- parseExprSubscripts(refShorthandDefaultPos) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- const potentialArrowAt = this.state.potentialArrowAt;
- const expr = this.parseExprAtom(refShorthandDefaultPos);
-
- if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
- return expr;
- }
-
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
- return expr;
- }
-
- return this.parseSubscripts(expr, startPos, startLoc);
- }
-
- parseSubscripts(base, startPos, startLoc, noCalls) {
- const maybeAsyncArrow = this.atPossibleAsync(base);
- const state = {
- optionalChainMember: false,
- stop: false
- };
-
- do {
- base = this.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow);
- } while (!state.stop);
-
- return base;
- }
-
- parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) {
- if (!noCalls && this.eat(types.doubleColon)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.callee = this.parseNoCallExpr();
- state.stop = true;
- return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
- } else if (this.match(types.questionDot)) {
- this.expectPlugin("optionalChaining");
- state.optionalChainMember = true;
-
- if (noCalls && this.lookahead().type === types.parenL) {
- state.stop = true;
- return base;
- }
-
- this.next();
- const node = this.startNodeAt(startPos, startLoc);
-
- if (this.eat(types.bracketL)) {
- node.object = base;
- node.property = this.parseExpression();
- node.computed = true;
- node.optional = true;
- this.expect(types.bracketR);
- return this.finishNode(node, "OptionalMemberExpression");
- } else if (this.eat(types.parenL)) {
- node.callee = base;
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
- node.optional = true;
- return this.finishNode(node, "OptionalCallExpression");
- } else {
- node.object = base;
- node.property = this.parseIdentifier(true);
- node.computed = false;
- node.optional = true;
- return this.finishNode(node, "OptionalMemberExpression");
- }
- } else if (this.eat(types.dot)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseMaybePrivateName();
- node.computed = false;
-
- if (state.optionalChainMember) {
- node.optional = false;
- return this.finishNode(node, "OptionalMemberExpression");
- }
-
- return this.finishNode(node, "MemberExpression");
- } else if (this.eat(types.bracketL)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseExpression();
- node.computed = true;
- this.expect(types.bracketR);
-
- if (state.optionalChainMember) {
- node.optional = false;
- return this.finishNode(node, "OptionalMemberExpression");
- }
-
- return this.finishNode(node, "MemberExpression");
- } else if (!noCalls && this.match(types.parenL)) {
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
- const oldYieldPos = this.state.yieldPos;
- const oldAwaitPos = this.state.awaitPos;
- this.state.maybeInArrowParameters = true;
- this.state.yieldPos = 0;
- this.state.awaitPos = 0;
- this.next();
- let node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt;
- this.state.commaAfterSpreadAt = -1;
- node.arguments = this.parseCallExpressionArguments(types.parenR, maybeAsyncArrow, base.type === "Import", base.type !== "Super");
-
- if (!state.optionalChainMember) {
- this.finishCallExpression(node);
- } else {
- this.finishOptionalCallExpression(node);
- }
-
- if (maybeAsyncArrow && this.shouldParseAsyncArrow()) {
- state.stop = true;
- this.checkCommaAfterRestFromSpread();
- node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
- this.checkYieldAwaitInDefaultParams();
- this.state.yieldPos = oldYieldPos;
- this.state.awaitPos = oldAwaitPos;
- } else {
- this.toReferencedListDeep(node.arguments);
- this.state.yieldPos = oldYieldPos || this.state.yieldPos;
- this.state.awaitPos = oldAwaitPos || this.state.awaitPos;
- }
-
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
- this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt;
- return node;
- } else if (this.match(types.backQuote)) {
- return this.parseTaggedTemplateExpression(startPos, startLoc, base, state);
- } else {
- state.stop = true;
- return base;
- }
- }
-
- parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) {
- const node = this.startNodeAt(startPos, startLoc);
- node.tag = base;
- node.quasi = this.parseTemplate(true);
- if (typeArguments) node.typeParameters = typeArguments;
-
- if (state.optionalChainMember) {
- this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain");
- }
-
- return this.finishNode(node, "TaggedTemplateExpression");
- }
-
- atPossibleAsync(base) {
- return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async";
- }
-
- finishCallExpression(node) {
- if (node.callee.type === "Import") {
- if (node.arguments.length !== 1) {
- this.raise(node.start, "import() requires exactly one argument");
- }
-
- const importArg = node.arguments[0];
-
- if (importArg && importArg.type === "SpreadElement") {
- this.raise(importArg.start, "... is not allowed in import()");
- }
- }
-
- return this.finishNode(node, "CallExpression");
- }
-
- finishOptionalCallExpression(node) {
- if (node.callee.type === "Import") {
- if (node.arguments.length !== 1) {
- this.raise(node.start, "import() requires exactly one argument");
- }
-
- const importArg = node.arguments[0];
-
- if (importArg && importArg.type === "SpreadElement") {
- this.raise(importArg.start, "... is not allowed in import()");
- }
- }
-
- return this.finishNode(node, "OptionalCallExpression");
- }
-
- parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder) {
- const elts = [];
- let innerParenStart;
- let first = true;
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
- this.state.inFSharpPipelineDirectBody = false;
-
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
-
- if (this.eat(close)) {
- if (dynamicImport) {
- this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments");
- }
-
- break;
- }
- }
-
- if (this.match(types.parenL) && !innerParenStart) {
- innerParenStart = this.state.start;
- }
-
- elts.push(this.parseExprListItem(false, possibleAsyncArrow ? {
- start: 0
- } : undefined, possibleAsyncArrow ? {
- start: 0
- } : undefined, allowPlaceholder));
- }
-
- if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {
- this.unexpected();
- }
-
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
- return elts;
- }
-
- shouldParseAsyncArrow() {
- return this.match(types.arrow) && !this.canInsertSemicolon();
- }
-
- parseAsyncArrowFromCallExpression(node, call) {
- this.expect(types.arrow);
- this.parseArrowExpression(node, call.arguments, true);
- return node;
- }
-
- parseNoCallExpr() {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
- }
-
- parseExprAtom(refShorthandDefaultPos) {
- if (this.state.type === types.slash) this.readRegexp();
- const canBeArrow = this.state.potentialArrowAt === this.state.start;
- let node;
-
- switch (this.state.type) {
- case types._super:
- if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
- this.raise(this.state.start, "super is only allowed in object methods and classes");
- }
-
- node = this.startNode();
- this.next();
-
- if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
- this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?");
- }
-
- if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {
- this.unexpected();
- }
-
- return this.finishNode(node, "Super");
-
- case types._import:
- node = this.startNode();
- this.next();
-
- if (this.match(types.dot)) {
- return this.parseImportMetaProperty(node);
- }
-
- this.expectPlugin("dynamicImport", node.start);
-
- if (!this.match(types.parenL)) {
- this.unexpected(null, types.parenL);
- }
-
- return this.finishNode(node, "Import");
-
- case types._this:
- node = this.startNode();
- this.next();
- return this.finishNode(node, "ThisExpression");
-
- case types.name:
- {
- node = this.startNode();
- const containsEsc = this.state.containsEsc;
- const id = this.parseIdentifier();
-
- if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) {
- this.next();
- return this.parseFunction(node, undefined, true);
- } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) {
- const params = [this.parseIdentifier()];
- this.expect(types.arrow);
- this.parseArrowExpression(node, params, true);
- return node;
- }
-
- if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) {
- this.next();
- this.parseArrowExpression(node, [id], false);
- return node;
- }
-
- return id;
- }
-
- case types._do:
- {
- this.expectPlugin("doExpressions");
- const node = this.startNode();
- this.next();
- const oldLabels = this.state.labels;
- this.state.labels = [];
- node.body = this.parseBlock();
- this.state.labels = oldLabels;
- return this.finishNode(node, "DoExpression");
- }
-
- case types.regexp:
- {
- const value = this.state.value;
- node = this.parseLiteral(value.value, "RegExpLiteral");
- node.pattern = value.pattern;
- node.flags = value.flags;
- return node;
- }
-
- case types.num:
- return this.parseLiteral(this.state.value, "NumericLiteral");
-
- case types.bigint:
- return this.parseLiteral(this.state.value, "BigIntLiteral");
-
- case types.string:
- return this.parseLiteral(this.state.value, "StringLiteral");
-
- case types._null:
- node = this.startNode();
- this.next();
- return this.finishNode(node, "NullLiteral");
-
- case types._true:
- case types._false:
- return this.parseBooleanLiteral();
-
- case types.parenL:
- return this.parseParenAndDistinguishExpression(canBeArrow);
-
- case types.bracketL:
- {
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
- this.state.inFSharpPipelineDirectBody = false;
- node = this.startNode();
- this.next();
- node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);
-
- if (!this.state.maybeInArrowParameters) {
- this.toReferencedList(node.elements);
- }
-
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
- return this.finishNode(node, "ArrayExpression");
- }
-
- case types.braceL:
- {
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
- this.state.inFSharpPipelineDirectBody = false;
- const ret = this.parseObj(false, refShorthandDefaultPos);
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
- return ret;
- }
-
- case types._function:
- return this.parseFunctionExpression();
-
- case types.at:
- this.parseDecorators();
-
- case types._class:
- node = this.startNode();
- this.takeDecorators(node);
- return this.parseClass(node, false);
-
- case types._new:
- return this.parseNew();
-
- case types.backQuote:
- return this.parseTemplate(false);
-
- case types.doubleColon:
- {
- node = this.startNode();
- this.next();
- node.object = null;
- const callee = node.callee = this.parseNoCallExpr();
-
- if (callee.type === "MemberExpression") {
- return this.finishNode(node, "BindExpression");
- } else {
- throw this.raise(callee.start, "Binding should be performed on object property.");
- }
- }
-
- case types.hash:
- {
- if (this.state.inPipeline) {
- node = this.startNode();
-
- if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
- this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.");
- }
-
- this.next();
-
- if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
- this.registerTopicReference();
- return this.finishNode(node, "PipelinePrimaryTopicReference");
- } else {
- throw this.raise(node.start, `Topic reference was used in a lexical context without topic binding`);
- }
- }
- }
-
- default:
- throw this.unexpected();
- }
- }
-
- parseBooleanLiteral() {
- const node = this.startNode();
- node.value = this.match(types._true);
- this.next();
- return this.finishNode(node, "BooleanLiteral");
- }
-
- parseMaybePrivateName() {
- const isPrivate = this.match(types.hash);
-
- if (isPrivate) {
- this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]);
- const node = this.startNode();
- this.next();
- this.assertNoSpace("Unexpected space between # and identifier");
- node.id = this.parseIdentifier(true);
- return this.finishNode(node, "PrivateName");
- } else {
- return this.parseIdentifier(true);
- }
- }
-
- parseFunctionExpression() {
- const node = this.startNode();
- let meta = this.startNode();
- this.next();
- meta = this.createIdentifier(meta, "function");
-
- if (this.scope.inGenerator && this.eat(types.dot)) {
- return this.parseMetaProperty(node, meta, "sent");
- }
-
- return this.parseFunction(node);
- }
-
- parseMetaProperty(node, meta, propertyName) {
- node.meta = meta;
-
- if (meta.name === "function" && propertyName === "sent") {
- if (this.isContextual(propertyName)) {
- this.expectPlugin("functionSent");
- } else if (!this.hasPlugin("functionSent")) {
- this.unexpected();
- }
- }
-
- const containsEsc = this.state.containsEsc;
- node.property = this.parseIdentifier(true);
-
- if (node.property.name !== propertyName || containsEsc) {
- this.raise(node.property.start, `The only valid meta property for ${meta.name} is ${meta.name}.${propertyName}`);
- }
-
- return this.finishNode(node, "MetaProperty");
- }
-
- parseImportMetaProperty(node) {
- const id = this.createIdentifier(this.startNodeAtNode(node), "import");
- this.expect(types.dot);
-
- if (this.isContextual("meta")) {
- this.expectPlugin("importMeta");
- } else if (!this.hasPlugin("importMeta")) {
- this.raise(id.start, `Dynamic imports require a parameter: import('a.js')`);
- }
-
- if (!this.inModule) {
- this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`, {
- code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
- });
- }
-
- this.sawUnambiguousESM = true;
- return this.parseMetaProperty(node, id, "meta");
- }
-
- parseLiteral(value, type, startPos, startLoc) {
- startPos = startPos || this.state.start;
- startLoc = startLoc || this.state.startLoc;
- const node = this.startNodeAt(startPos, startLoc);
- this.addExtra(node, "rawValue", value);
- this.addExtra(node, "raw", this.input.slice(startPos, this.state.end));
- node.value = value;
- this.next();
- return this.finishNode(node, type);
- }
-
- parseParenAndDistinguishExpression(canBeArrow) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- let val;
- this.expect(types.parenL);
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
- const oldYieldPos = this.state.yieldPos;
- const oldAwaitPos = this.state.awaitPos;
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
- this.state.maybeInArrowParameters = true;
- this.state.yieldPos = 0;
- this.state.awaitPos = 0;
- this.state.inFSharpPipelineDirectBody = false;
- const innerStartPos = this.state.start;
- const innerStartLoc = this.state.startLoc;
- const exprList = [];
- const refShorthandDefaultPos = {
- start: 0
- };
- const refNeedsArrowPos = {
- start: 0
- };
- let first = true;
- let spreadStart;
- let optionalCommaStart;
-
- while (!this.match(types.parenR)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma, refNeedsArrowPos.start || null);
-
- if (this.match(types.parenR)) {
- optionalCommaStart = this.state.start;
- break;
- }
- }
-
- if (this.match(types.ellipsis)) {
- const spreadNodeStartPos = this.state.start;
- const spreadNodeStartLoc = this.state.startLoc;
- spreadStart = this.state.start;
- exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
- this.checkCommaAfterRest();
- break;
- } else {
- exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));
- }
- }
-
- const innerEndPos = this.state.start;
- const innerEndLoc = this.state.startLoc;
- this.expect(types.parenR);
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
- let arrowNode = this.startNodeAt(startPos, startLoc);
-
- if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
- this.checkYieldAwaitInDefaultParams();
- this.state.yieldPos = oldYieldPos;
- this.state.awaitPos = oldAwaitPos;
-
- for (let _i = 0; _i < exprList.length; _i++) {
- const param = exprList[_i];
-
- if (param.extra && param.extra.parenthesized) {
- this.unexpected(param.extra.parenStart);
- }
- }
-
- this.parseArrowExpression(arrowNode, exprList, false);
- return arrowNode;
- }
-
- this.state.yieldPos = oldYieldPos || this.state.yieldPos;
- this.state.awaitPos = oldAwaitPos || this.state.awaitPos;
-
- if (!exprList.length) {
- this.unexpected(this.state.lastTokStart);
- }
-
- if (optionalCommaStart) this.unexpected(optionalCommaStart);
- if (spreadStart) this.unexpected(spreadStart);
-
- if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);
- this.toReferencedListDeep(exprList, true);
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc);
- val.expressions = exprList;
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
- } else {
- val = exprList[0];
- }
-
- if (!this.options.createParenthesizedExpressions) {
- this.addExtra(val, "parenthesized", true);
- this.addExtra(val, "parenStart", startPos);
- return val;
- }
-
- const parenExpression = this.startNodeAt(startPos, startLoc);
- parenExpression.expression = val;
- this.finishNode(parenExpression, "ParenthesizedExpression");
- return parenExpression;
- }
-
- shouldParseArrow() {
- return !this.canInsertSemicolon();
- }
-
- parseArrow(node) {
- if (this.eat(types.arrow)) {
- return node;
- }
- }
-
- parseParenItem(node, startPos, startLoc) {
- return node;
- }
-
- parseNew() {
- const node = this.startNode();
- const meta = this.parseIdentifier(true);
-
- if (this.eat(types.dot)) {
- const metaProp = this.parseMetaProperty(node, meta, "target");
-
- if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) {
- let error = "new.target can only be used in functions";
-
- if (this.hasPlugin("classProperties")) {
- error += " or class properties";
- }
-
- this.raise(metaProp.start, error);
- }
-
- return metaProp;
- }
-
- node.callee = this.parseNoCallExpr();
-
- if (node.callee.type === "Import") {
- this.raise(node.callee.start, "Cannot use new with import(...)");
- } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") {
- this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed");
- } else if (this.eat(types.questionDot)) {
- this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed");
- }
-
- this.parseNewArguments(node);
- return this.finishNode(node, "NewExpression");
- }
-
- parseNewArguments(node) {
- if (this.eat(types.parenL)) {
- const args = this.parseExprList(types.parenR);
- this.toReferencedList(args);
- node.arguments = args;
- } else {
- node.arguments = [];
- }
- }
-
- parseTemplateElement(isTagged) {
- const elem = this.startNode();
-
- if (this.state.value === null) {
- if (!isTagged) {
- this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template");
- } else {
- this.state.invalidTemplateEscapePosition = null;
- }
- }
-
- elem.value = {
- raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
- cooked: this.state.value
- };
- this.next();
- elem.tail = this.match(types.backQuote);
- return this.finishNode(elem, "TemplateElement");
- }
-
- parseTemplate(isTagged) {
- const node = this.startNode();
- this.next();
- node.expressions = [];
- let curElt = this.parseTemplateElement(isTagged);
- node.quasis = [curElt];
-
- while (!curElt.tail) {
- this.expect(types.dollarBraceL);
- node.expressions.push(this.parseExpression());
- this.expect(types.braceR);
- node.quasis.push(curElt = this.parseTemplateElement(isTagged));
- }
-
- this.next();
- return this.finishNode(node, "TemplateLiteral");
- }
-
- parseObj(isPattern, refShorthandDefaultPos) {
- const propHash = Object.create(null);
- let first = true;
- const node = this.startNode();
- node.properties = [];
- this.next();
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(types.braceR)) break;
- }
-
- const prop = this.parseObjectMember(isPattern, refShorthandDefaultPos);
- if (!isPattern) this.checkPropClash(prop, propHash);
-
- if (prop.shorthand) {
- this.addExtra(prop, "shorthand", true);
- }
-
- node.properties.push(prop);
- }
-
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
- }
-
- isAsyncProp(prop) {
- return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak();
- }
-
- parseObjectMember(isPattern, refShorthandDefaultPos) {
- let decorators = [];
-
- if (this.match(types.at)) {
- if (this.hasPlugin("decorators")) {
- this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators");
- } else {
- while (this.match(types.at)) {
- decorators.push(this.parseDecorator());
- }
- }
- }
-
- const prop = this.startNode();
- let isGenerator = false;
- let isAsync = false;
- let startPos;
- let startLoc;
-
- if (this.match(types.ellipsis)) {
- if (decorators.length) this.unexpected();
-
- if (isPattern) {
- this.next();
- prop.argument = this.parseIdentifier();
- this.checkCommaAfterRest();
- return this.finishNode(prop, "RestElement");
- }
-
- return this.parseSpread();
- }
-
- if (decorators.length) {
- prop.decorators = decorators;
- decorators = [];
- }
-
- prop.method = false;
-
- if (isPattern || refShorthandDefaultPos) {
- startPos = this.state.start;
- startLoc = this.state.startLoc;
- }
-
- if (!isPattern) {
- isGenerator = this.eat(types.star);
- }
-
- const containsEsc = this.state.containsEsc;
- this.parsePropertyName(prop);
-
- if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) {
- isAsync = true;
- isGenerator = this.eat(types.star);
- this.parsePropertyName(prop);
- } else {
- isAsync = false;
- }
-
- this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);
- return prop;
- }
-
- isGetterOrSetterMethod(prop, isPattern) {
- return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword);
- }
-
- getGetterSetterExpectedParamCount(method) {
- return method.kind === "get" ? 0 : 1;
- }
-
- checkGetterSetterParams(method) {
- const paramCount = this.getGetterSetterExpectedParamCount(method);
- const start = method.start;
-
- if (method.params.length !== paramCount) {
- if (method.kind === "get") {
- this.raise(start, "getter must not have any formal parameters");
- } else {
- this.raise(start, "setter must have exactly one formal parameter");
- }
- }
-
- if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") {
- this.raise(start, "setter function argument must not be a rest parameter");
- }
- }
-
- parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {
- if (isAsync || isGenerator || this.match(types.parenL)) {
- if (isPattern) this.unexpected();
- prop.kind = "method";
- prop.method = true;
- return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
- }
-
- if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) {
- if (isGenerator || isAsync) this.unexpected();
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- this.parseMethod(prop, false, false, false, false, "ObjectMethod");
- this.checkGetterSetterParams(prop);
- return prop;
- }
- }
-
- parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {
- prop.shorthand = false;
-
- if (this.eat(types.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
- return this.finishNode(prop, "ObjectProperty");
- }
-
- if (!prop.computed && prop.key.type === "Identifier") {
- this.checkReservedWord(prop.key.name, prop.key.start, true, true);
-
- if (isPattern) {
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
- } else if (this.match(types.eq) && refShorthandDefaultPos) {
- if (!refShorthandDefaultPos.start) {
- refShorthandDefaultPos.start = this.state.start;
- }
-
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
- } else {
- prop.value = prop.key.__clone();
- }
-
- prop.shorthand = true;
- return this.finishNode(prop, "ObjectProperty");
- }
- }
-
- parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {
- const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);
- if (!node) this.unexpected();
- return node;
- }
-
- parsePropertyName(prop) {
- if (this.eat(types.bracketL)) {
- prop.computed = true;
- prop.key = this.parseMaybeAssign();
- this.expect(types.bracketR);
- } else {
- const oldInPropertyName = this.state.inPropertyName;
- this.state.inPropertyName = true;
- prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName();
-
- if (prop.key.type !== "PrivateName") {
- prop.computed = false;
- }
-
- this.state.inPropertyName = oldInPropertyName;
- }
-
- return prop.key;
- }
-
- initFunction(node, isAsync) {
- node.id = null;
- node.generator = false;
- node.async = !!isAsync;
- }
-
- parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
- const oldYieldPos = this.state.yieldPos;
- const oldAwaitPos = this.state.awaitPos;
- this.state.yieldPos = 0;
- this.state.awaitPos = 0;
- this.initFunction(node, isAsync);
- node.generator = !!isGenerator;
- const allowModifiers = isConstructor;
- this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
- this.parseFunctionParams(node, allowModifiers);
- this.checkYieldAwaitInDefaultParams();
- this.parseFunctionBodyAndFinish(node, type, true);
- this.scope.exit();
- this.state.yieldPos = oldYieldPos;
- this.state.awaitPos = oldAwaitPos;
- return node;
- }
-
- parseArrowExpression(node, params, isAsync) {
- this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW);
- this.initFunction(node, isAsync);
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
- const oldYieldPos = this.state.yieldPos;
- const oldAwaitPos = this.state.awaitPos;
- this.state.maybeInArrowParameters = false;
- this.state.yieldPos = 0;
- this.state.awaitPos = 0;
- if (params) this.setArrowFunctionParameters(node, params);
- this.parseFunctionBody(node, true);
- this.scope.exit();
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
- this.state.yieldPos = oldYieldPos;
- this.state.awaitPos = oldAwaitPos;
- return this.finishNode(node, "ArrowFunctionExpression");
- }
-
- setArrowFunctionParameters(node, params) {
- node.params = this.toAssignableList(params, true, "arrow function parameters");
- }
-
- isStrictBody(node) {
- const isBlockStatement = node.body.type === "BlockStatement";
-
- if (isBlockStatement && node.body.directives.length) {
- for (let _i2 = 0, _node$body$directives = node.body.directives; _i2 < _node$body$directives.length; _i2++) {
- const directive = _node$body$directives[_i2];
-
- if (directive.value.value === "use strict") {
- return true;
- }
- }
- }
-
- return false;
- }
-
- parseFunctionBodyAndFinish(node, type, isMethod = false) {
- this.parseFunctionBody(node, false, isMethod);
- this.finishNode(node, type);
- }
-
- parseFunctionBody(node, allowExpression, isMethod = false) {
- const isExpression = allowExpression && !this.match(types.braceL);
- const oldStrict = this.state.strict;
- let useStrict = false;
- const oldInParameters = this.state.inParameters;
- this.state.inParameters = false;
-
- if (isExpression) {
- node.body = this.parseMaybeAssign();
- this.checkParams(node, false, allowExpression);
- } else {
- const nonSimple = !this.isSimpleParamList(node.params);
-
- if (!oldStrict || nonSimple) {
- useStrict = this.strictDirective(this.state.end);
-
- if (useStrict && nonSimple) {
- const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
- this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list");
- }
- }
-
- const oldLabels = this.state.labels;
- this.state.labels = [];
- if (useStrict) this.state.strict = true;
- this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression);
- node.body = this.parseBlock(true, false);
- this.state.labels = oldLabels;
- }
-
- this.state.inParameters = oldInParameters;
-
- if (this.state.strict && node.id) {
- this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name");
- }
-
- this.state.strict = oldStrict;
- }
-
- isSimpleParamList(params) {
- for (let i = 0, len = params.length; i < len; i++) {
- if (params[i].type !== "Identifier") return false;
- }
-
- return true;
- }
-
- checkParams(node, allowDuplicates, isArrowFunction) {
- const nameHash = Object.create(null);
-
- for (let i = 0; i < node.params.length; i++) {
- this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function paramter list");
- }
- }
-
- parseExprList(close, allowEmpty, refShorthandDefaultPos) {
- const elts = [];
- let first = true;
-
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(close)) break;
- }
-
- elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));
- }
-
- return elts;
- }
-
- parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) {
- let elt;
-
- if (allowEmpty && this.match(types.comma)) {
- elt = null;
- } else if (this.match(types.ellipsis)) {
- const spreadNodeStartPos = this.state.start;
- const spreadNodeStartLoc = this.state.startLoc;
- elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);
- } else if (this.match(types.question)) {
- this.expectPlugin("partialApplication");
-
- if (!allowPlaceholder) {
- this.raise(this.state.start, "Unexpected argument placeholder");
- }
-
- const node = this.startNode();
- this.next();
- elt = this.finishNode(node, "ArgumentPlaceholder");
- } else {
- elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);
- }
-
- return elt;
- }
-
- parseIdentifier(liberal) {
- const node = this.startNode();
- const name = this.parseIdentifierName(node.start, liberal);
- return this.createIdentifier(node, name);
- }
-
- createIdentifier(node, name) {
- node.name = name;
- node.loc.identifierName = name;
- return this.finishNode(node, "Identifier");
- }
-
- parseIdentifierName(pos, liberal) {
- let name;
-
- if (this.match(types.name)) {
- name = this.state.value;
- } else if (this.state.type.keyword) {
- name = this.state.type.keyword;
-
- if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) {
- this.state.context.pop();
- }
- } else {
- throw this.unexpected();
- }
-
- if (!liberal) {
- this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false);
- }
-
- this.next();
- return name;
- }
-
- checkReservedWord(word, startLoc, checkKeywords, isBinding) {
- if (this.scope.inGenerator && word === "yield") {
- this.raise(startLoc, "Can not use 'yield' as identifier inside a generator");
- }
-
- if (this.scope.inAsync && word === "await") {
- this.raise(startLoc, "Can not use 'await' as identifier inside an async function");
- }
-
- if (this.state.inClassProperty && word === "arguments") {
- this.raise(startLoc, "'arguments' is not allowed in class field initializer");
- }
-
- if (checkKeywords && isKeyword(word)) {
- this.raise(startLoc, `Unexpected keyword '${word}'`);
- }
-
- const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
-
- if (reservedTest(word, this.inModule)) {
- if (!this.scope.inAsync && word === "await") {
- this.raise(startLoc, "Can not use keyword 'await' outside an async function");
- }
-
- this.raise(startLoc, `Unexpected reserved word '${word}'`);
- }
- }
-
- parseAwait() {
- if (!this.state.awaitPos) {
- this.state.awaitPos = this.state.start;
- }
-
- const node = this.startNode();
- this.next();
-
- if (this.state.inParameters) {
- this.raise(node.start, "await is not allowed in async function parameters");
- }
-
- if (this.match(types.star)) {
- this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
- }
-
- if (!this.state.soloAwait) {
- node.argument = this.parseMaybeUnary();
- }
-
- return this.finishNode(node, "AwaitExpression");
- }
-
- parseYield(noIn) {
- if (!this.state.yieldPos) {
- this.state.yieldPos = this.state.start;
- }
-
- const node = this.startNode();
-
- if (this.state.inParameters) {
- this.raise(node.start, "yield is not allowed in generator parameters");
- }
-
- this.next();
-
- if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.canInsertSemicolon()) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(types.star);
- node.argument = this.parseMaybeAssign(noIn);
- }
-
- return this.finishNode(node, "YieldExpression");
- }
-
- checkPipelineAtInfixOperator(left, leftStartPos) {
- if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
- if (left.type === "SequenceExpression") {
- throw this.raise(leftStartPos, `Pipeline head should not be a comma-separated sequence expression`);
- }
- }
- }
-
- parseSmartPipelineBody(childExpression, startPos, startLoc) {
- const pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression);
- this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos);
- return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc);
- }
-
- checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) {
- if (this.match(types.arrow)) {
- throw this.raise(this.state.start, `Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized`);
- } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") {
- throw this.raise(startPos, `Pipeline body may not be a comma-separated sequence expression`);
- }
- }
-
- parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) {
- const bodyNode = this.startNodeAt(startPos, startLoc);
-
- switch (pipelineStyle) {
- case "PipelineBareFunction":
- bodyNode.callee = childExpression;
- break;
-
- case "PipelineBareConstructor":
- bodyNode.callee = childExpression.callee;
- break;
-
- case "PipelineBareAwaitedFunction":
- bodyNode.callee = childExpression.argument;
- break;
-
- case "PipelineTopicExpression":
- if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
- throw this.raise(startPos, `Pipeline is in topic style but does not use topic reference`);
- }
-
- bodyNode.expression = childExpression;
- break;
-
- default:
- throw this.raise(startPos, `Unknown pipeline style ${pipelineStyle}`);
- }
-
- return this.finishNode(bodyNode, pipelineStyle);
- }
-
- checkSmartPipelineBodyStyle(expression) {
- switch (expression.type) {
- default:
- return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression";
- }
- }
-
- isSimpleReference(expression) {
- switch (expression.type) {
- case "MemberExpression":
- return !expression.computed && this.isSimpleReference(expression.object);
-
- case "Identifier":
- return true;
-
- default:
- return false;
- }
- }
-
- withTopicPermittingContext(callback) {
- const outerContextTopicState = this.state.topicContext;
- this.state.topicContext = {
- maxNumOfResolvableTopics: 1,
- maxTopicIndex: null
- };
-
- try {
- return callback();
- } finally {
- this.state.topicContext = outerContextTopicState;
- }
- }
-
- withTopicForbiddingContext(callback) {
- const outerContextTopicState = this.state.topicContext;
- this.state.topicContext = {
- maxNumOfResolvableTopics: 0,
- maxTopicIndex: null
- };
-
- try {
- return callback();
- } finally {
- this.state.topicContext = outerContextTopicState;
- }
- }
-
- withSoloAwaitPermittingContext(callback) {
- const outerContextSoloAwaitState = this.state.soloAwait;
- this.state.soloAwait = true;
-
- try {
- return callback();
- } finally {
- this.state.soloAwait = outerContextSoloAwaitState;
- }
- }
-
- registerTopicReference() {
- this.state.topicContext.maxTopicIndex = 0;
- }
-
- primaryTopicReferenceIsAllowedInCurrentTopicContext() {
- return this.state.topicContext.maxNumOfResolvableTopics >= 1;
- }
-
- topicReferenceWasUsedInCurrentTopicContext() {
- return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
- }
-
- parseFSharpPipelineBody(prec, noIn) {
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- this.state.potentialArrowAt = this.state.start;
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
- this.state.inFSharpPipelineDirectBody = true;
- const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn);
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
- return ret;
- }
-
-}
-
-const loopLabel = {
- kind: "loop"
-},
- switchLabel = {
- kind: "switch"
-};
-const FUNC_NO_FLAGS = 0b000,
- FUNC_STATEMENT = 0b001,
- FUNC_HANGING_STATEMENT = 0b010,
- FUNC_NULLABLE_ID = 0b100;
-class StatementParser extends ExpressionParser {
- parseTopLevel(file, program) {
- program.sourceType = this.options.sourceType;
- program.interpreter = this.parseInterpreterDirective();
- this.parseBlockBody(program, true, true, types.eof);
-
- if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
- for (let _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) {
- const [name] = _Array$from[_i];
- const pos = this.scope.undefinedExports.get(name);
- this.raise(pos, `Export '${name}' is not defined`);
- }
- }
-
- file.program = this.finishNode(program, "Program");
- file.comments = this.state.comments;
- if (this.options.tokens) file.tokens = this.state.tokens;
- return this.finishNode(file, "File");
- }
-
- stmtToDirective(stmt) {
- const expr = stmt.expression;
- const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
- const directive = this.startNodeAt(stmt.start, stmt.loc.start);
- const raw = this.input.slice(expr.start, expr.end);
- const val = directiveLiteral.value = raw.slice(1, -1);
- this.addExtra(directiveLiteral, "raw", raw);
- this.addExtra(directiveLiteral, "rawValue", val);
- directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
- return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
- }
-
- parseInterpreterDirective() {
- if (!this.match(types.interpreterDirective)) {
- return null;
- }
-
- const node = this.startNode();
- node.value = this.state.value;
- this.next();
- return this.finishNode(node, "InterpreterDirective");
- }
-
- isLet(context) {
- if (!this.isContextual("let")) {
- return false;
- }
-
- skipWhiteSpace.lastIndex = this.state.pos;
- const skip = skipWhiteSpace.exec(this.input);
- const next = this.state.pos + skip[0].length;
- const nextCh = this.input.charCodeAt(next);
- if (nextCh === 91) return true;
- if (context) return false;
- if (nextCh === 123) return true;
-
- if (isIdentifierStart(nextCh)) {
- let pos = next + 1;
-
- while (isIdentifierChar(this.input.charCodeAt(pos))) {
- ++pos;
- }
-
- const ident = this.input.slice(next, pos);
- if (!keywordRelationalOperator.test(ident)) return true;
- }
-
- return false;
- }
-
- parseStatement(context, topLevel) {
- if (this.match(types.at)) {
- this.parseDecorators(true);
- }
-
- return this.parseStatementContent(context, topLevel);
- }
-
- parseStatementContent(context, topLevel) {
- let starttype = this.state.type;
- const node = this.startNode();
- let kind;
-
- if (this.isLet(context)) {
- starttype = types._var;
- kind = "let";
- }
-
- switch (starttype) {
- case types._break:
- case types._continue:
- return this.parseBreakContinueStatement(node, starttype.keyword);
-
- case types._debugger:
- return this.parseDebuggerStatement(node);
-
- case types._do:
- return this.parseDoStatement(node);
-
- case types._for:
- return this.parseForStatement(node);
-
- case types._function:
- if (this.lookahead().type === types.dot) break;
-
- if (context) {
- if (this.state.strict) {
- this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block");
- } else if (context !== "if" && context !== "label") {
- this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement");
- }
- }
-
- return this.parseFunctionStatement(node, false, !context);
-
- case types._class:
- if (context) this.unexpected();
- return this.parseClass(node, true);
-
- case types._if:
- return this.parseIfStatement(node);
-
- case types._return:
- return this.parseReturnStatement(node);
-
- case types._switch:
- return this.parseSwitchStatement(node);
-
- case types._throw:
- return this.parseThrowStatement(node);
-
- case types._try:
- return this.parseTryStatement(node);
-
- case types._const:
- case types._var:
- kind = kind || this.state.value;
-
- if (context && kind !== "var") {
- this.unexpected(this.state.start, "Lexical declaration cannot appear in a single-statement context");
- }
-
- return this.parseVarStatement(node, kind);
-
- case types._while:
- return this.parseWhileStatement(node);
-
- case types._with:
- return this.parseWithStatement(node);
-
- case types.braceL:
- return this.parseBlock();
-
- case types.semi:
- return this.parseEmptyStatement(node);
-
- case types._export:
- case types._import:
- {
- const nextToken = this.lookahead();
-
- if (nextToken.type === types.parenL || nextToken.type === types.dot) {
- break;
- }
-
- if (!this.options.allowImportExportEverywhere && !topLevel) {
- this.raise(this.state.start, "'import' and 'export' may only appear at the top level");
- }
-
- this.next();
- let result;
-
- if (starttype === types._import) {
- result = this.parseImport(node);
-
- if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
- this.sawUnambiguousESM = true;
- }
- } else {
- result = this.parseExport(node);
-
- if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
- this.sawUnambiguousESM = true;
- }
- }
-
- this.assertModuleNodeAllowed(node);
- return result;
- }
-
- default:
- {
- if (this.isAsyncFunction()) {
- if (context) {
- this.unexpected(null, "Async functions can only be declared at the top level or inside a block");
- }
-
- this.next();
- return this.parseFunctionStatement(node, true, !context);
- }
- }
- }
-
- const maybeName = this.state.value;
- const expr = this.parseExpression();
-
- if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
- return this.parseLabeledStatement(node, maybeName, expr, context);
- } else {
- return this.parseExpressionStatement(node, expr);
- }
- }
-
- assertModuleNodeAllowed(node) {
- if (!this.options.allowImportExportEverywhere && !this.inModule) {
- this.raise(node.start, `'import' and 'export' may appear only with 'sourceType: "module"'`, {
- code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
- });
- }
- }
-
- takeDecorators(node) {
- const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
-
- if (decorators.length) {
- node.decorators = decorators;
- this.resetStartLocationFromNode(node, decorators[0]);
- this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
- }
- }
-
- canHaveLeadingDecorator() {
- return this.match(types._class);
- }
-
- parseDecorators(allowExport) {
- const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
-
- while (this.match(types.at)) {
- const decorator = this.parseDecorator();
- currentContextDecorators.push(decorator);
- }
-
- if (this.match(types._export)) {
- if (!allowExport) {
- this.unexpected();
- }
-
- if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
- this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead.");
- }
- } else if (!this.canHaveLeadingDecorator()) {
- this.raise(this.state.start, "Leading decorators must be attached to a class declaration");
- }
- }
-
- parseDecorator() {
- this.expectOnePlugin(["decorators-legacy", "decorators"]);
- const node = this.startNode();
- this.next();
-
- if (this.hasPlugin("decorators")) {
- this.state.decoratorStack.push([]);
- const startPos = this.state.start;
- const startLoc = this.state.startLoc;
- let expr;
-
- if (this.eat(types.parenL)) {
- expr = this.parseExpression();
- this.expect(types.parenR);
- } else {
- expr = this.parseIdentifier(false);
-
- while (this.eat(types.dot)) {
- const node = this.startNodeAt(startPos, startLoc);
- node.object = expr;
- node.property = this.parseIdentifier(true);
- node.computed = false;
- expr = this.finishNode(node, "MemberExpression");
- }
- }
-
- node.expression = this.parseMaybeDecoratorArguments(expr);
- this.state.decoratorStack.pop();
- } else {
- node.expression = this.parseExprSubscripts();
- }
-
- return this.finishNode(node, "Decorator");
- }
-
- parseMaybeDecoratorArguments(expr) {
- if (this.eat(types.parenL)) {
- const node = this.startNodeAtNode(expr);
- node.callee = expr;
- node.arguments = this.parseCallExpressionArguments(types.parenR, false);
- this.toReferencedList(node.arguments);
- return this.finishNode(node, "CallExpression");
- }
-
- return expr;
- }
-
- parseBreakContinueStatement(node, keyword) {
- const isBreak = keyword === "break";
- this.next();
-
- if (this.isLineTerminator()) {
- node.label = null;
- } else {
- node.label = this.parseIdentifier();
- this.semicolon();
- }
-
- this.verifyBreakContinue(node, keyword);
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
- }
-
- verifyBreakContinue(node, keyword) {
- const isBreak = keyword === "break";
- let i;
-
- for (i = 0; i < this.state.labels.length; ++i) {
- const lab = this.state.labels[i];
-
- if (node.label == null || lab.name === node.label.name) {
- if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
- if (node.label && isBreak) break;
- }
- }
-
- if (i === this.state.labels.length) {
- this.raise(node.start, "Unsyntactic " + keyword);
- }
- }
-
- parseDebuggerStatement(node) {
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
- }
-
- parseHeaderExpression() {
- this.expect(types.parenL);
- const val = this.parseExpression();
- this.expect(types.parenR);
- return val;
- }
-
- parseDoStatement(node) {
- this.next();
- this.state.labels.push(loopLabel);
- node.body = this.withTopicForbiddingContext(() => this.parseStatement("do"));
- this.state.labels.pop();
- this.expect(types._while);
- node.test = this.parseHeaderExpression();
- this.eat(types.semi);
- return this.finishNode(node, "DoWhileStatement");
- }
-
- parseForStatement(node) {
- this.next();
- this.state.labels.push(loopLabel);
- let awaitAt = -1;
-
- if ((this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) {
- awaitAt = this.state.lastTokStart;
- }
-
- this.scope.enter(SCOPE_OTHER);
- this.expect(types.parenL);
-
- if (this.match(types.semi)) {
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
-
- return this.parseFor(node, null);
- }
-
- const isLet = this.isLet();
-
- if (this.match(types._var) || this.match(types._const) || isLet) {
- const init = this.startNode();
- const kind = isLet ? "let" : this.state.value;
- this.next();
- this.parseVar(init, true, kind);
- this.finishNode(init, "VariableDeclaration");
-
- if ((this.match(types._in) || this.isContextual("of")) && init.declarations.length === 1) {
- return this.parseForIn(node, init, awaitAt);
- }
-
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
-
- return this.parseFor(node, init);
- }
-
- const refShorthandDefaultPos = {
- start: 0
- };
- const init = this.parseExpression(true, refShorthandDefaultPos);
-
- if (this.match(types._in) || this.isContextual("of")) {
- const description = this.isContextual("of") ? "for-of statement" : "for-in statement";
- this.toAssignable(init, undefined, description);
- this.checkLVal(init, undefined, undefined, description);
- return this.parseForIn(node, init, awaitAt);
- } else if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
-
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
-
- return this.parseFor(node, init);
- }
-
- parseFunctionStatement(node, isAsync, declarationPosition) {
- this.next();
- return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync);
- }
-
- parseIfStatement(node) {
- this.next();
- node.test = this.parseHeaderExpression();
- node.consequent = this.parseStatement("if");
- node.alternate = this.eat(types._else) ? this.parseStatement("if") : null;
- return this.finishNode(node, "IfStatement");
- }
-
- parseReturnStatement(node) {
- if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) {
- this.raise(this.state.start, "'return' outside of function");
- }
-
- this.next();
-
- if (this.isLineTerminator()) {
- node.argument = null;
- } else {
- node.argument = this.parseExpression();
- this.semicolon();
- }
-
- return this.finishNode(node, "ReturnStatement");
- }
-
- parseSwitchStatement(node) {
- this.next();
- node.discriminant = this.parseHeaderExpression();
- const cases = node.cases = [];
- this.expect(types.braceL);
- this.state.labels.push(switchLabel);
- this.scope.enter(SCOPE_OTHER);
- let cur;
-
- for (let sawDefault; !this.match(types.braceR);) {
- if (this.match(types._case) || this.match(types._default)) {
- const isCase = this.match(types._case);
- if (cur) this.finishNode(cur, "SwitchCase");
- cases.push(cur = this.startNode());
- cur.consequent = [];
- this.next();
-
- if (isCase) {
- cur.test = this.parseExpression();
- } else {
- if (sawDefault) {
- this.raise(this.state.lastTokStart, "Multiple default clauses");
- }
-
- sawDefault = true;
- cur.test = null;
- }
-
- this.expect(types.colon);
- } else {
- if (cur) {
- cur.consequent.push(this.parseStatement(null));
- } else {
- this.unexpected();
- }
- }
- }
-
- this.scope.exit();
- if (cur) this.finishNode(cur, "SwitchCase");
- this.next();
- this.state.labels.pop();
- return this.finishNode(node, "SwitchStatement");
- }
-
- parseThrowStatement(node) {
- this.next();
-
- if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) {
- this.raise(this.state.lastTokEnd, "Illegal newline after throw");
- }
-
- node.argument = this.parseExpression();
- this.semicolon();
- return this.finishNode(node, "ThrowStatement");
- }
-
- parseTryStatement(node) {
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
-
- if (this.match(types._catch)) {
- const clause = this.startNode();
- this.next();
-
- if (this.match(types.parenL)) {
- this.expect(types.parenL);
- clause.param = this.parseBindingAtom();
- const simple = clause.param.type === "Identifier";
- this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);
- this.checkLVal(clause.param, BIND_LEXICAL, null, "catch clause");
- this.expect(types.parenR);
- } else {
- clause.param = null;
- this.scope.enter(SCOPE_OTHER);
- }
-
- clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false));
- this.scope.exit();
- node.handler = this.finishNode(clause, "CatchClause");
- }
-
- node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
-
- if (!node.handler && !node.finalizer) {
- this.raise(node.start, "Missing catch or finally clause");
- }
-
- return this.finishNode(node, "TryStatement");
- }
-
- parseVarStatement(node, kind) {
- this.next();
- this.parseVar(node, false, kind);
- this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
- }
-
- parseWhileStatement(node) {
- this.next();
- node.test = this.parseHeaderExpression();
- this.state.labels.push(loopLabel);
- node.body = this.withTopicForbiddingContext(() => this.parseStatement("while"));
- this.state.labels.pop();
- return this.finishNode(node, "WhileStatement");
- }
-
- parseWithStatement(node) {
- if (this.state.strict) {
- this.raise(this.state.start, "'with' in strict mode");
- }
-
- this.next();
- node.object = this.parseHeaderExpression();
- node.body = this.withTopicForbiddingContext(() => this.parseStatement("with"));
- return this.finishNode(node, "WithStatement");
- }
-
- parseEmptyStatement(node) {
- this.next();
- return this.finishNode(node, "EmptyStatement");
- }
-
- parseLabeledStatement(node, maybeName, expr, context) {
- for (let _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) {
- const label = _this$state$labels[_i2];
-
- if (label.name === maybeName) {
- this.raise(expr.start, `Label '${maybeName}' is already declared`);
- }
- }
-
- const kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null;
-
- for (let i = this.state.labels.length - 1; i >= 0; i--) {
- const label = this.state.labels[i];
-
- if (label.statementStart === node.start) {
- label.statementStart = this.state.start;
- label.kind = kind;
- } else {
- break;
- }
- }
-
- this.state.labels.push({
- name: maybeName,
- kind: kind,
- statementStart: this.state.start
- });
- node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
- this.state.labels.pop();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
- }
-
- parseExpressionStatement(node, expr) {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
- }
-
- parseBlock(allowDirectives = false, createNewLexicalScope = true) {
- const node = this.startNode();
- this.expect(types.braceL);
-
- if (createNewLexicalScope) {
- this.scope.enter(SCOPE_OTHER);
- }
-
- this.parseBlockBody(node, allowDirectives, false, types.braceR);
-
- if (createNewLexicalScope) {
- this.scope.exit();
- }
-
- return this.finishNode(node, "BlockStatement");
- }
-
- isValidDirective(stmt) {
- return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
- }
-
- parseBlockBody(node, allowDirectives, topLevel, end) {
- const body = node.body = [];
- const directives = node.directives = [];
- this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end);
- }
-
- parseBlockOrModuleBlockBody(body, directives, topLevel, end) {
- let parsedNonDirective = false;
- let oldStrict;
- let octalPosition;
-
- while (!this.eat(end)) {
- if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {
- octalPosition = this.state.octalPosition;
- }
-
- const stmt = this.parseStatement(null, topLevel);
-
- if (directives && !parsedNonDirective && this.isValidDirective(stmt)) {
- const directive = this.stmtToDirective(stmt);
- directives.push(directive);
-
- if (oldStrict === undefined && directive.value.value === "use strict") {
- oldStrict = this.state.strict;
- this.setStrict(true);
-
- if (octalPosition) {
- this.raise(octalPosition, "Octal literal in strict mode");
- }
- }
-
- continue;
- }
-
- parsedNonDirective = true;
- body.push(stmt);
- }
-
- if (oldStrict === false) {
- this.setStrict(false);
- }
- }
-
- parseFor(node, init) {
- node.init = init;
- this.expect(types.semi);
- node.test = this.match(types.semi) ? null : this.parseExpression();
- this.expect(types.semi);
- node.update = this.match(types.parenR) ? null : this.parseExpression();
- this.expect(types.parenR);
- node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
- this.scope.exit();
- this.state.labels.pop();
- return this.finishNode(node, "ForStatement");
- }
-
- parseForIn(node, init, awaitAt) {
- const isForIn = this.match(types._in);
- this.next();
-
- if (isForIn) {
- if (awaitAt > -1) this.unexpected(awaitAt);
- } else {
- node.await = awaitAt > -1;
- }
-
- if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
- this.raise(init.start, `${isForIn ? "for-in" : "for-of"} loop variable declaration may not have an initializer`);
- } else if (init.type === "AssignmentPattern") {
- this.raise(init.start, "Invalid left-hand side in for-loop");
- }
-
- node.left = init;
- node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
- this.expect(types.parenR);
- node.body = this.withTopicForbiddingContext(() => this.parseStatement("for"));
- this.scope.exit();
- this.state.labels.pop();
- return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
- }
-
- parseVar(node, isFor, kind) {
- const declarations = node.declarations = [];
- const isTypescript = this.hasPlugin("typescript");
- node.kind = kind;
-
- for (;;) {
- const decl = this.startNode();
- this.parseVarId(decl, kind);
-
- if (this.eat(types.eq)) {
- decl.init = this.parseMaybeAssign(isFor);
- } else {
- if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) {
- if (!isTypescript) {
- this.unexpected();
- }
- } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) {
- this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value");
- }
-
- decl.init = null;
- }
-
- declarations.push(this.finishNode(decl, "VariableDeclarator"));
- if (!this.eat(types.comma)) break;
- }
-
- return node;
- }
-
- parseVarId(decl, kind) {
- decl.id = this.parseBindingAtom();
- this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration");
- }
-
- parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
- const isStatement = statement & FUNC_STATEMENT;
- const isHangingStatement = statement & FUNC_HANGING_STATEMENT;
- const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);
- this.initFunction(node, isAsync);
-
- if (this.match(types.star) && isHangingStatement) {
- this.unexpected(this.state.start, "Generators can only be declared at the top level or inside a block");
- }
-
- node.generator = this.eat(types.star);
-
- if (isStatement) {
- node.id = this.parseFunctionId(requireId);
- }
-
- const oldInClassProperty = this.state.inClassProperty;
- const oldYieldPos = this.state.yieldPos;
- const oldAwaitPos = this.state.awaitPos;
- this.state.inClassProperty = false;
- this.state.yieldPos = 0;
- this.state.awaitPos = 0;
- this.scope.enter(functionFlags(node.async, node.generator));
-
- if (!isStatement) {
- node.id = this.parseFunctionId();
- }
-
- this.parseFunctionParams(node);
- this.withTopicForbiddingContext(() => {
- this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
- });
- this.scope.exit();
-
- if (isStatement && !isHangingStatement) {
- this.checkFunctionStatementId(node);
- }
-
- this.state.inClassProperty = oldInClassProperty;
- this.state.yieldPos = oldYieldPos;
- this.state.awaitPos = oldAwaitPos;
- return node;
- }
-
- parseFunctionId(requireId) {
- return requireId || this.match(types.name) ? this.parseIdentifier() : null;
- }
-
- parseFunctionParams(node, allowModifiers) {
- const oldInParameters = this.state.inParameters;
- this.state.inParameters = true;
- this.expect(types.parenL);
- node.params = this.parseBindingList(types.parenR, false, allowModifiers);
- this.state.inParameters = oldInParameters;
- this.checkYieldAwaitInDefaultParams();
- }
-
- checkFunctionStatementId(node) {
- if (!node.id) return;
- this.checkLVal(node.id, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, null, "function name");
- }
-
- parseClass(node, isStatement, optionalId) {
- this.next();
- this.takeDecorators(node);
- const oldStrict = this.state.strict;
- this.state.strict = true;
- this.parseClassId(node, isStatement, optionalId);
- this.parseClassSuper(node);
- node.body = this.parseClassBody(!!node.superClass);
- this.state.strict = oldStrict;
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
- }
-
- isClassProperty() {
- return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);
- }
-
- isClassMethod() {
- return this.match(types.parenL);
- }
-
- isNonstaticConstructor(method) {
- return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
- }
-
- parseClassBody(constructorAllowsSuper) {
- this.state.classLevel++;
- const state = {
- hadConstructor: false
- };
- let decorators = [];
- const classBody = this.startNode();
- classBody.body = [];
- this.expect(types.braceL);
- this.withTopicForbiddingContext(() => {
- while (!this.eat(types.braceR)) {
- if (this.eat(types.semi)) {
- if (decorators.length > 0) {
- this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon");
- }
-
- continue;
- }
-
- if (this.match(types.at)) {
- decorators.push(this.parseDecorator());
- continue;
- }
-
- const member = this.startNode();
-
- if (decorators.length) {
- member.decorators = decorators;
- this.resetStartLocationFromNode(member, decorators[0]);
- decorators = [];
- }
-
- this.parseClassMember(classBody, member, state, constructorAllowsSuper);
-
- if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
- this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?");
- }
- }
- });
-
- if (decorators.length) {
- this.raise(this.state.start, "You have trailing decorators with no method");
- }
-
- this.state.classLevel--;
- return this.finishNode(classBody, "ClassBody");
- }
-
- parseClassMember(classBody, member, state, constructorAllowsSuper) {
- let isStatic = false;
- const containsEsc = this.state.containsEsc;
-
- if (this.match(types.name) && this.state.value === "static") {
- const key = this.parseIdentifier(true);
-
- if (this.isClassMethod()) {
- const method = member;
- method.kind = "method";
- method.computed = false;
- method.key = key;
- method.static = false;
- this.pushClassMethod(classBody, method, false, false, false, false);
- return;
- } else if (this.isClassProperty()) {
- const prop = member;
- prop.computed = false;
- prop.key = key;
- prop.static = false;
- classBody.body.push(this.parseClassProperty(prop));
- return;
- } else if (containsEsc) {
- throw this.unexpected();
- }
-
- isStatic = true;
- }
-
- this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper);
- }
-
- parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) {
- const publicMethod = member;
- const privateMethod = member;
- const publicProp = member;
- const privateProp = member;
- const method = publicMethod;
- const publicMember = publicMethod;
- member.static = isStatic;
-
- if (this.eat(types.star)) {
- method.kind = "method";
- this.parseClassPropertyName(method);
-
- if (method.key.type === "PrivateName") {
- this.pushClassPrivateMethod(classBody, privateMethod, true, false);
- return;
- }
-
- if (this.isNonstaticConstructor(publicMethod)) {
- this.raise(publicMethod.key.start, "Constructor can't be a generator");
- }
-
- this.pushClassMethod(classBody, publicMethod, true, false, false, false);
- return;
- }
-
- const containsEsc = this.state.containsEsc;
- const key = this.parseClassPropertyName(member);
- const isPrivate = key.type === "PrivateName";
- const isSimple = key.type === "Identifier";
- this.parsePostMemberNameModifiers(publicMember);
-
- if (this.isClassMethod()) {
- method.kind = "method";
-
- if (isPrivate) {
- this.pushClassPrivateMethod(classBody, privateMethod, false, false);
- return;
- }
-
- const isConstructor = this.isNonstaticConstructor(publicMethod);
- let allowsDirectSuper = false;
-
- if (isConstructor) {
- publicMethod.kind = "constructor";
-
- if (publicMethod.decorators) {
- this.raise(publicMethod.start, "You can't attach decorators to a class constructor");
- }
-
- if (state.hadConstructor && !this.hasPlugin("typescript")) {
- this.raise(key.start, "Duplicate constructor in the same class");
- }
-
- state.hadConstructor = true;
- allowsDirectSuper = constructorAllowsSuper;
- }
-
- this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
- } else if (this.isClassProperty()) {
- if (isPrivate) {
- this.pushClassPrivateProperty(classBody, privateProp);
- } else {
- this.pushClassProperty(classBody, publicProp);
- }
- } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
- const isGenerator = this.eat(types.star);
- method.kind = "method";
- this.parseClassPropertyName(method);
-
- if (method.key.type === "PrivateName") {
- this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
- } else {
- if (this.isNonstaticConstructor(publicMethod)) {
- this.raise(publicMethod.key.start, "Constructor can't be an async function");
- }
-
- this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
- }
- } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) {
- method.kind = key.name;
- this.parseClassPropertyName(publicMethod);
-
- if (method.key.type === "PrivateName") {
- this.pushClassPrivateMethod(classBody, privateMethod, false, false);
- } else {
- if (this.isNonstaticConstructor(publicMethod)) {
- this.raise(publicMethod.key.start, "Constructor can't have get/set modifier");
- }
-
- this.pushClassMethod(classBody, publicMethod, false, false, false, false);
- }
-
- this.checkGetterSetterParams(publicMethod);
- } else if (this.isLineTerminator()) {
- if (isPrivate) {
- this.pushClassPrivateProperty(classBody, privateProp);
- } else {
- this.pushClassProperty(classBody, publicProp);
- }
- } else {
- this.unexpected();
- }
- }
-
- parseClassPropertyName(member) {
- const key = this.parsePropertyName(member);
-
- if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) {
- this.raise(key.start, "Classes may not have static property named prototype");
- }
-
- if (key.type === "PrivateName" && key.id.name === "constructor") {
- this.raise(key.start, "Classes may not have a private field named '#constructor'");
- }
-
- return key;
- }
-
- pushClassProperty(classBody, prop) {
- if (this.isNonstaticConstructor(prop)) {
- this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'");
- }
-
- classBody.body.push(this.parseClassProperty(prop));
- }
-
- pushClassPrivateProperty(classBody, prop) {
- this.expectPlugin("classPrivateProperties", prop.key.start);
- classBody.body.push(this.parseClassPrivateProperty(prop));
- }
-
- pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
- classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
- }
-
- pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
- this.expectPlugin("classPrivateMethods", method.key.start);
- classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true));
- }
-
- parsePostMemberNameModifiers(methodOrProp) {}
-
- parseAccessModifier() {
- return undefined;
- }
-
- parseClassPrivateProperty(node) {
- this.state.inClassProperty = true;
- this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
- node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null;
- this.semicolon();
- this.state.inClassProperty = false;
- this.scope.exit();
- return this.finishNode(node, "ClassPrivateProperty");
- }
-
- parseClassProperty(node) {
- if (!node.typeAnnotation) {
- this.expectPlugin("classProperties");
- }
-
- this.state.inClassProperty = true;
- this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
-
- if (this.match(types.eq)) {
- this.expectPlugin("classProperties");
- this.next();
- node.value = this.parseMaybeAssign();
- } else {
- node.value = null;
- }
-
- this.semicolon();
- this.state.inClassProperty = false;
- this.scope.exit();
- return this.finishNode(node, "ClassProperty");
- }
-
- parseClassId(node, isStatement, optionalId) {
- if (this.match(types.name)) {
- node.id = this.parseIdentifier();
-
- if (isStatement) {
- this.checkLVal(node.id, BIND_CLASS, undefined, "class name");
- }
- } else {
- if (optionalId || !isStatement) {
- node.id = null;
- } else {
- this.unexpected(null, "A class name is required");
- }
- }
- }
-
- parseClassSuper(node) {
- node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
- }
-
- parseExport(node) {
- const hasDefault = this.maybeParseExportDefaultSpecifier(node);
- const parseAfterDefault = !hasDefault || this.eat(types.comma);
- const hasStar = parseAfterDefault && this.eatExportStar(node);
- const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
- const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma));
- const isFromRequired = hasDefault || hasStar;
-
- if (hasStar && !hasNamespace) {
- if (hasDefault) this.unexpected();
- this.parseExportFrom(node, true);
- return this.finishNode(node, "ExportAllDeclaration");
- }
-
- const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
-
- if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
- throw this.unexpected(null, types.braceL);
- }
-
- let hasDeclaration;
-
- if (isFromRequired || hasSpecifiers) {
- hasDeclaration = false;
- this.parseExportFrom(node, isFromRequired);
- } else {
- hasDeclaration = this.maybeParseExportDeclaration(node);
- }
-
- if (isFromRequired || hasSpecifiers || hasDeclaration) {
- this.checkExport(node, true, false, !!node.source);
- return this.finishNode(node, "ExportNamedDeclaration");
- }
-
- if (this.eat(types._default)) {
- node.declaration = this.parseExportDefaultExpression();
- this.checkExport(node, true, true);
- return this.finishNode(node, "ExportDefaultDeclaration");
- }
-
- throw this.unexpected(null, types.braceL);
- }
-
- eatExportStar(node) {
- return this.eat(types.star);
- }
-
- maybeParseExportDefaultSpecifier(node) {
- if (this.isExportDefaultSpecifier()) {
- this.expectPlugin("exportDefaultFrom");
- const specifier = this.startNode();
- specifier.exported = this.parseIdentifier(true);
- node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
- return true;
- }
-
- return false;
- }
-
- maybeParseExportNamespaceSpecifier(node) {
- if (this.isContextual("as")) {
- if (!node.specifiers) node.specifiers = [];
- this.expectPlugin("exportNamespaceFrom");
- const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
- this.next();
- specifier.exported = this.parseIdentifier(true);
- node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
- return true;
- }
-
- return false;
- }
-
- maybeParseExportNamedSpecifiers(node) {
- if (this.match(types.braceL)) {
- if (!node.specifiers) node.specifiers = [];
- node.specifiers.push(...this.parseExportSpecifiers());
- node.source = null;
- node.declaration = null;
- return true;
- }
-
- return false;
- }
-
- maybeParseExportDeclaration(node) {
- if (this.shouldParseExportDeclaration()) {
- if (this.isContextual("async")) {
- const next = this.lookahead();
-
- if (next.type !== types._function) {
- this.unexpected(next.start, `Unexpected token, expected "function"`);
- }
- }
-
- node.specifiers = [];
- node.source = null;
- node.declaration = this.parseExportDeclaration(node);
- return true;
- }
-
- return false;
- }
-
- isAsyncFunction() {
- if (!this.isContextual("async")) return false;
- const {
- pos
- } = this.state;
- skipWhiteSpace.lastIndex = pos;
- const skip = skipWhiteSpace.exec(this.input);
- if (!skip || !skip.length) return false;
- const next = pos + skip[0].length;
- return !lineBreak.test(this.input.slice(pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.length || !isIdentifierChar(this.input.charCodeAt(next + 8)));
- }
-
- parseExportDefaultExpression() {
- const expr = this.startNode();
- const isAsync = this.isAsyncFunction();
-
- if (this.match(types._function) || isAsync) {
- this.next();
-
- if (isAsync) {
- this.next();
- }
-
- return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync);
- } else if (this.match(types._class)) {
- return this.parseClass(expr, true, true);
- } else if (this.match(types.at)) {
- if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
- this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax");
- }
-
- this.parseDecorators(false);
- return this.parseClass(expr, true, true);
- } else if (this.match(types._const) || this.match(types._var) || this.isLet()) {
- return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export.");
- } else {
- const res = this.parseMaybeAssign();
- this.semicolon();
- return res;
- }
- }
-
- parseExportDeclaration(node) {
- return this.parseStatement(null);
- }
-
- isExportDefaultSpecifier() {
- if (this.match(types.name)) {
- return this.state.value !== "async" && this.state.value !== "let";
- }
-
- if (!this.match(types._default)) {
- return false;
- }
-
- const lookahead = this.lookahead();
- return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from";
- }
-
- parseExportFrom(node, expect) {
- if (this.eatContextual("from")) {
- node.source = this.parseImportSource();
- this.checkExport(node);
- } else {
- if (expect) {
- this.unexpected();
- } else {
- node.source = null;
- }
- }
-
- this.semicolon();
- }
-
- shouldParseExportDeclaration() {
- if (this.match(types.at)) {
- this.expectOnePlugin(["decorators", "decorators-legacy"]);
-
- if (this.hasPlugin("decorators")) {
- if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
- this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax");
- } else {
- return true;
- }
- }
- }
-
- return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
- }
-
- checkExport(node, checkNames, isDefault, isFrom) {
- if (checkNames) {
- if (isDefault) {
- this.checkDuplicateExports(node, "default");
- } else if (node.specifiers && node.specifiers.length) {
- for (let _i3 = 0, _node$specifiers = node.specifiers; _i3 < _node$specifiers.length; _i3++) {
- const specifier = _node$specifiers[_i3];
- this.checkDuplicateExports(specifier, specifier.exported.name);
-
- if (!isFrom && specifier.local) {
- this.checkReservedWord(specifier.local.name, specifier.local.start, true, false);
- this.scope.checkLocalExport(specifier.local);
- }
- }
- } else if (node.declaration) {
- if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
- const id = node.declaration.id;
- if (!id) throw new Error("Assertion failure");
- this.checkDuplicateExports(node, id.name);
- } else if (node.declaration.type === "VariableDeclaration") {
- for (let _i4 = 0, _node$declaration$dec = node.declaration.declarations; _i4 < _node$declaration$dec.length; _i4++) {
- const declaration = _node$declaration$dec[_i4];
- this.checkDeclaration(declaration.id);
- }
- }
- }
- }
-
- const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
-
- if (currentContextDecorators.length) {
- const isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
-
- if (!node.declaration || !isClass) {
- throw this.raise(node.start, "You can only use decorators on an export when exporting a class");
- }
-
- this.takeDecorators(node.declaration);
- }
- }
-
- checkDeclaration(node) {
- if (node.type === "Identifier") {
- this.checkDuplicateExports(node, node.name);
- } else if (node.type === "ObjectPattern") {
- for (let _i5 = 0, _node$properties = node.properties; _i5 < _node$properties.length; _i5++) {
- const prop = _node$properties[_i5];
- this.checkDeclaration(prop);
- }
- } else if (node.type === "ArrayPattern") {
- for (let _i6 = 0, _node$elements = node.elements; _i6 < _node$elements.length; _i6++) {
- const elem = _node$elements[_i6];
-
- if (elem) {
- this.checkDeclaration(elem);
- }
- }
- } else if (node.type === "ObjectProperty") {
- this.checkDeclaration(node.value);
- } else if (node.type === "RestElement") {
- this.checkDeclaration(node.argument);
- } else if (node.type === "AssignmentPattern") {
- this.checkDeclaration(node.left);
- }
- }
-
- checkDuplicateExports(node, name) {
- if (this.state.exportedIdentifiers.indexOf(name) > -1) {
- throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : `\`${name}\` has already been exported. Exported identifiers must be unique.`);
- }
-
- this.state.exportedIdentifiers.push(name);
- }
-
- parseExportSpecifiers() {
- const nodes = [];
- let first = true;
- this.expect(types.braceL);
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- this.expect(types.comma);
- if (this.eat(types.braceR)) break;
- }
-
- const node = this.startNode();
- node.local = this.parseIdentifier(true);
- node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
- nodes.push(this.finishNode(node, "ExportSpecifier"));
- }
-
- return nodes;
- }
-
- parseImport(node) {
- node.specifiers = [];
-
- if (!this.match(types.string)) {
- const hasDefault = this.maybeParseDefaultImportSpecifier(node);
- const parseNext = !hasDefault || this.eat(types.comma);
- const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
- if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
- this.expectContextual("from");
- }
-
- node.source = this.parseImportSource();
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
- }
-
- parseImportSource() {
- if (!this.match(types.string)) this.unexpected();
- return this.parseExprAtom();
- }
-
- shouldParseDefaultImport(node) {
- return this.match(types.name);
- }
-
- parseImportSpecifierLocal(node, specifier, type, contextDescription) {
- specifier.local = this.parseIdentifier();
- this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription);
- node.specifiers.push(this.finishNode(specifier, type));
- }
-
- maybeParseDefaultImportSpecifier(node) {
- if (this.shouldParseDefaultImport(node)) {
- this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
- return true;
- }
-
- return false;
- }
-
- maybeParseStarImportSpecifier(node) {
- if (this.match(types.star)) {
- const specifier = this.startNode();
- this.next();
- this.expectContextual("as");
- this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
- return true;
- }
-
- return false;
- }
-
- parseNamedImportSpecifiers(node) {
- let first = true;
- this.expect(types.braceL);
-
- while (!this.eat(types.braceR)) {
- if (first) {
- first = false;
- } else {
- if (this.eat(types.colon)) {
- this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import.");
- }
-
- this.expect(types.comma);
- if (this.eat(types.braceR)) break;
- }
-
- this.parseImportSpecifier(node);
- }
- }
-
- parseImportSpecifier(node) {
- const specifier = this.startNode();
- specifier.imported = this.parseIdentifier(true);
-
- if (this.eatContextual("as")) {
- specifier.local = this.parseIdentifier();
- } else {
- this.checkReservedWord(specifier.imported.name, specifier.start, true, true);
- specifier.local = specifier.imported.__clone();
- }
-
- this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier");
- node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
- }
-
-}
-
-class Parser extends StatementParser {
- constructor(options, input) {
- options = getOptions(options);
- super(options, input);
- const ScopeHandler = this.getScopeHandler();
- this.options = options;
- this.inModule = this.options.sourceType === "module";
- this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);
- this.plugins = pluginsMap(this.options.plugins);
- this.filename = options.sourceFilename;
- }
-
- getScopeHandler() {
- return ScopeHandler;
- }
-
- parse() {
- this.scope.enter(SCOPE_PROGRAM);
- const file = this.startNode();
- const program = this.startNode();
- this.nextToken();
- return this.parseTopLevel(file, program);
- }
-
-}
-
-function pluginsMap(plugins) {
- const pluginMap = new Map();
-
- for (let _i = 0; _i < plugins.length; _i++) {
- const plugin = plugins[_i];
- const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}];
- if (!pluginMap.has(name)) pluginMap.set(name, options || {});
- }
-
- return pluginMap;
-}
-
-function parse(input, options) {
- if (options && options.sourceType === "unambiguous") {
- options = Object.assign({}, options);
-
- try {
- options.sourceType = "module";
- const parser = getParser(options, input);
- const ast = parser.parse();
- if (!parser.sawUnambiguousESM) ast.program.sourceType = "script";
- return ast;
- } catch (moduleError) {
- try {
- options.sourceType = "script";
- return getParser(options, input).parse();
- } catch (scriptError) {}
-
- throw moduleError;
- }
- } else {
- return getParser(options, input).parse();
- }
-}
-function parseExpression(input, options) {
- const parser = getParser(options, input);
-
- if (parser.options.strictMode) {
- parser.state.strict = true;
- }
-
- return parser.getExpression();
-}
-
-function getParser(options, input) {
- let cls = Parser;
-
- if (options && options.plugins) {
- validatePlugins(options.plugins);
- cls = getParserClass(options.plugins);
- }
-
- return new cls(options, input);
-}
-
-const parserClassCache = {};
-
-function getParserClass(pluginsFromOptions) {
- const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name));
- const key = pluginList.join("/");
- let cls = parserClassCache[key];
-
- if (!cls) {
- cls = Parser;
-
- for (let _i = 0; _i < pluginList.length; _i++) {
- const plugin = pluginList[_i];
- cls = mixinPlugins[plugin](cls);
- }
-
- parserClassCache[key] = cls;
- }
-
- return cls;
-}
-
-exports.parse = parse;
-exports.parseExpression = parseExpression;
-exports.tokTypes = types;
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json
deleted file mode 100644
index 4bfd8d41cb8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/parser/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bin": {
- "parser": "./bin/babel-parser.js"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A JavaScript parser",
- "devDependencies": {
- "@babel/code-frame": "^7.5.5",
- "@babel/helper-fixtures": "^7.5.5",
- "charcodes": "^0.2.0",
- "unicode-12.0.0": "^0.7.9"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "files": [
- "bin",
- "lib",
- "typings"
- ],
- "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
- "homepage": "https://babeljs.io/",
- "keywords": [
- "babel",
- "javascript",
- "parser",
- "tc39",
- "ecmascript",
- "@babel/parser"
- ],
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/parser",
- "publishConfig": {
- "tag": "next"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-parser"
- },
- "types": "typings/babel-parser.d.ts",
- "version": "7.5.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md
deleted file mode 100644
index cf8f944396f..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/template
-
-> Generate an AST from a string template.
-
-See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/template
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/template --dev
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js
deleted file mode 100644
index 59e0984cba5..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/formatters.js
+++ /dev/null
@@ -1,63 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0;
-
-function makeStatementFormatter(fn) {
- return {
- code: str => `/* @babel/template */;\n${str}`,
- validate: () => {},
- unwrap: ast => {
- return fn(ast.program.body.slice(1));
- }
- };
-}
-
-const smart = makeStatementFormatter(body => {
- if (body.length > 1) {
- return body;
- } else {
- return body[0];
- }
-});
-exports.smart = smart;
-const statements = makeStatementFormatter(body => body);
-exports.statements = statements;
-const statement = makeStatementFormatter(body => {
- if (body.length === 0) {
- throw new Error("Found nothing to return.");
- }
-
- if (body.length > 1) {
- throw new Error("Found multiple statements but wanted one");
- }
-
- return body[0];
-});
-exports.statement = statement;
-const expression = {
- code: str => `(\n${str}\n)`,
- validate: ({
- program
- }) => {
- if (program.body.length > 1) {
- throw new Error("Found multiple statements but wanted one");
- }
-
- const expression = program.body[0].expression;
-
- if (expression.start === 0) {
- throw new Error("Parse result included parens.");
- }
- },
- unwrap: ast => ast.program.body[0].expression
-};
-exports.expression = expression;
-const program = {
- code: str => str,
- validate: () => {},
- unwrap: ast => ast.program
-};
-exports.program = program; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js
deleted file mode 100644
index 7ce85e9f1ba..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/index.js
+++ /dev/null
@@ -1,36 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0;
-
-var formatters = _interopRequireWildcard(require("./formatters"));
-
-var _builder = _interopRequireDefault(require("./builder"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const smart = (0, _builder.default)(formatters.smart);
-exports.smart = smart;
-const statement = (0, _builder.default)(formatters.statement);
-exports.statement = statement;
-const statements = (0, _builder.default)(formatters.statements);
-exports.statements = statements;
-const expression = (0, _builder.default)(formatters.expression);
-exports.expression = expression;
-const program = (0, _builder.default)(formatters.program);
-exports.program = program;
-
-var _default = Object.assign(smart.bind(undefined), {
- smart,
- statement,
- statements,
- expression,
- program,
- ast: smart.ast
-});
-
-exports.default = _default; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/literal.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/literal.js
deleted file mode 100644
index 0b8f9045826..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/literal.js
+++ /dev/null
@@ -1,82 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = literalTemplate;
-
-var _options = require("./options");
-
-var _parse = _interopRequireDefault(require("./parse"));
-
-var _populate = _interopRequireDefault(require("./populate"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function literalTemplate(formatter, tpl, opts) {
- const {
- metadata,
- names
- } = buildLiteralData(formatter, tpl, opts);
- return arg => {
- const defaultReplacements = arg.reduce((acc, replacement, i) => {
- acc[names[i]] = replacement;
- return acc;
- }, {});
- return arg => {
- const replacements = (0, _options.normalizeReplacements)(arg);
-
- if (replacements) {
- Object.keys(replacements).forEach(key => {
- if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
- throw new Error("Unexpected replacement overlap.");
- }
- });
- }
-
- return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
- };
- };
-}
-
-function buildLiteralData(formatter, tpl, opts) {
- let names;
- let nameSet;
- let metadata;
- let prefix = "";
-
- do {
- prefix += "$";
- const result = buildTemplateCode(tpl, prefix);
- names = result.names;
- nameSet = new Set(names);
- metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
- parser: opts.parser,
- placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
- placeholderPattern: opts.placeholderPattern,
- preserveComments: opts.preserveComments,
- syntacticPlaceholders: opts.syntacticPlaceholders
- });
- } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name)));
-
- return {
- metadata,
- names
- };
-}
-
-function buildTemplateCode(tpl, prefix) {
- const names = [];
- let code = tpl[0];
-
- for (let i = 1; i < tpl.length; i++) {
- const value = `${prefix}${i - 1}`;
- names.push(value);
- code += value + tpl[i];
- }
-
- return {
- names,
- code
- };
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js
deleted file mode 100644
index 35ed7333885..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/options.js
+++ /dev/null
@@ -1,82 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.merge = merge;
-exports.validate = validate;
-exports.normalizeReplacements = normalizeReplacements;
-
-function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
-
-function merge(a, b) {
- const {
- placeholderWhitelist = a.placeholderWhitelist,
- placeholderPattern = a.placeholderPattern,
- preserveComments = a.preserveComments,
- syntacticPlaceholders = a.syntacticPlaceholders
- } = b;
- return {
- parser: Object.assign({}, a.parser, b.parser),
- placeholderWhitelist,
- placeholderPattern,
- preserveComments,
- syntacticPlaceholders
- };
-}
-
-function validate(opts) {
- if (opts != null && typeof opts !== "object") {
- throw new Error("Unknown template options.");
- }
-
- const _ref = opts || {},
- {
- placeholderWhitelist,
- placeholderPattern,
- preserveComments,
- syntacticPlaceholders
- } = _ref,
- parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]);
-
- if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
- throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
- }
-
- if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
- throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
- }
-
- if (preserveComments != null && typeof preserveComments !== "boolean") {
- throw new Error("'.preserveComments' must be a boolean, null, or undefined");
- }
-
- if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
- throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
- }
-
- if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
- throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
- }
-
- return {
- parser,
- placeholderWhitelist: placeholderWhitelist || undefined,
- placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
- preserveComments: preserveComments == null ? false : preserveComments,
- syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
- };
-}
-
-function normalizeReplacements(replacements) {
- if (Array.isArray(replacements)) {
- return replacements.reduce((acc, replacement, i) => {
- acc["$" + i] = replacement;
- return acc;
- }, {});
- } else if (typeof replacements === "object" || replacements == null) {
- return replacements || undefined;
- }
-
- throw new Error("Template replacements must be an array, object, null, or undefined");
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js
deleted file mode 100644
index 31733495592..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/parse.js
+++ /dev/null
@@ -1,193 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = parseAndBuildMetadata;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _parser() {
- const data = require("@babel/parser");
-
- _parser = function () {
- return data;
- };
-
- return data;
-}
-
-function _codeFrame() {
- const data = require("@babel/code-frame");
-
- _codeFrame = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const PATTERN = /^[_$A-Z0-9]+$/;
-
-function parseAndBuildMetadata(formatter, code, opts) {
- const ast = parseWithCodeFrame(code, opts.parser);
- const {
- placeholderWhitelist,
- placeholderPattern,
- preserveComments,
- syntacticPlaceholders
- } = opts;
- t().removePropertiesDeep(ast, {
- preserveComments
- });
- formatter.validate(ast);
- const syntactic = {
- placeholders: [],
- placeholderNames: new Set()
- };
- const legacy = {
- placeholders: [],
- placeholderNames: new Set()
- };
- const isLegacyRef = {
- value: undefined
- };
- t().traverse(ast, placeholderVisitorHandler, {
- syntactic,
- legacy,
- isLegacyRef,
- placeholderWhitelist,
- placeholderPattern,
- syntacticPlaceholders
- });
- return Object.assign({
- ast
- }, isLegacyRef.value ? legacy : syntactic);
-}
-
-function placeholderVisitorHandler(node, ancestors, state) {
- let name;
-
- if (t().isPlaceholder(node)) {
- if (state.syntacticPlaceholders === false) {
- throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
- } else {
- name = node.name.name;
- state.isLegacyRef.value = false;
- }
- } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
- return;
- } else if (t().isIdentifier(node) || t().isJSXIdentifier(node)) {
- name = node.name;
- state.isLegacyRef.value = true;
- } else if (t().isStringLiteral(node)) {
- name = node.value;
- state.isLegacyRef.value = true;
- } else {
- return;
- }
-
- if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
- throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
- }
-
- if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) {
- return;
- }
-
- ancestors = ancestors.slice();
- const {
- node: parent,
- key
- } = ancestors[ancestors.length - 1];
- let type;
-
- if (t().isStringLiteral(node) || t().isPlaceholder(node, {
- expectedNode: "StringLiteral"
- })) {
- type = "string";
- } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") {
- type = "param";
- } else if (t().isExpressionStatement(parent) && !t().isPlaceholder(node)) {
- type = "statement";
- ancestors = ancestors.slice(0, -1);
- } else if (t().isStatement(node) && t().isPlaceholder(node)) {
- type = "statement";
- } else {
- type = "other";
- }
-
- const {
- placeholders,
- placeholderNames
- } = state.isLegacyRef.value ? state.legacy : state.syntactic;
- placeholders.push({
- name,
- type,
- resolve: ast => resolveAncestors(ast, ancestors),
- isDuplicate: placeholderNames.has(name)
- });
- placeholderNames.add(name);
-}
-
-function resolveAncestors(ast, ancestors) {
- let parent = ast;
-
- for (let i = 0; i < ancestors.length - 1; i++) {
- const {
- key,
- index
- } = ancestors[i];
-
- if (index === undefined) {
- parent = parent[key];
- } else {
- parent = parent[key][index];
- }
- }
-
- const {
- key,
- index
- } = ancestors[ancestors.length - 1];
- return {
- parent,
- key,
- index
- };
-}
-
-function parseWithCodeFrame(code, parserOpts) {
- parserOpts = Object.assign({
- allowReturnOutsideFunction: true,
- allowSuperOutsideMethod: true,
- sourceType: "module"
- }, parserOpts, {
- plugins: (parserOpts.plugins || []).concat("placeholders")
- });
-
- try {
- return (0, _parser().parse)(code, parserOpts);
- } catch (err) {
- const loc = err.loc;
-
- if (loc) {
- err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, {
- start: loc
- });
- err.code = "BABEL_TEMPLATE_PARSE_ERROR";
- }
-
- throw err;
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js b/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js
deleted file mode 100644
index c69f7fdfe28..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/lib/populate.js
+++ /dev/null
@@ -1,133 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = populatePlaceholders;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function populatePlaceholders(metadata, replacements) {
- const ast = t().cloneNode(metadata.ast);
-
- if (replacements) {
- metadata.placeholders.forEach(placeholder => {
- if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
- const placeholderName = placeholder.name;
- throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
- placeholder you may want to consider passing one of the following options to @babel/template:
- - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
- - { placeholderPattern: /^${placeholderName}$/ }`);
- }
- });
- Object.keys(replacements).forEach(key => {
- if (!metadata.placeholderNames.has(key)) {
- throw new Error(`Unknown substitution "${key}" given`);
- }
- });
- }
-
- metadata.placeholders.slice().reverse().forEach(placeholder => {
- try {
- applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
- } catch (e) {
- e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
- throw e;
- }
- });
- return ast;
-}
-
-function applyReplacement(placeholder, ast, replacement) {
- if (placeholder.isDuplicate) {
- if (Array.isArray(replacement)) {
- replacement = replacement.map(node => t().cloneNode(node));
- } else if (typeof replacement === "object") {
- replacement = t().cloneNode(replacement);
- }
- }
-
- const {
- parent,
- key,
- index
- } = placeholder.resolve(ast);
-
- if (placeholder.type === "string") {
- if (typeof replacement === "string") {
- replacement = t().stringLiteral(replacement);
- }
-
- if (!replacement || !t().isStringLiteral(replacement)) {
- throw new Error("Expected string substitution");
- }
- } else if (placeholder.type === "statement") {
- if (index === undefined) {
- if (!replacement) {
- replacement = t().emptyStatement();
- } else if (Array.isArray(replacement)) {
- replacement = t().blockStatement(replacement);
- } else if (typeof replacement === "string") {
- replacement = t().expressionStatement(t().identifier(replacement));
- } else if (!t().isStatement(replacement)) {
- replacement = t().expressionStatement(replacement);
- }
- } else {
- if (replacement && !Array.isArray(replacement)) {
- if (typeof replacement === "string") {
- replacement = t().identifier(replacement);
- }
-
- if (!t().isStatement(replacement)) {
- replacement = t().expressionStatement(replacement);
- }
- }
- }
- } else if (placeholder.type === "param") {
- if (typeof replacement === "string") {
- replacement = t().identifier(replacement);
- }
-
- if (index === undefined) throw new Error("Assertion failure.");
- } else {
- if (typeof replacement === "string") {
- replacement = t().identifier(replacement);
- }
-
- if (Array.isArray(replacement)) {
- throw new Error("Cannot replace single expression with an array.");
- }
- }
-
- if (index === undefined) {
- t().validate(parent, key, replacement);
- parent[key] = replacement;
- } else {
- const items = parent[key].slice();
-
- if (placeholder.type === "statement" || placeholder.type === "param") {
- if (replacement == null) {
- items.splice(index, 1);
- } else if (Array.isArray(replacement)) {
- items.splice(index, 1, ...replacement);
- } else {
- items[index] = replacement;
- }
- } else {
- items[index] = replacement;
- }
-
- t().validate(parent, key, items);
- parent[key] = items;
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json
deleted file mode 100644
index 54bdfd64233..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/template/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.4.4",
- "@babel/types": "^7.4.4"
- },
- "deprecated": false,
- "description": "Generate an AST from a string template.",
- "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/template",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-template"
- },
- "version": "7.4.4"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md
deleted file mode 100644
index 61dc5800652..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/traverse
-
-> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes
-
-See our website [@babel/traverse](https://babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/traverse
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/traverse --dev
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js
deleted file mode 100644
index 7becbcd2573..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/context.js
+++ /dev/null
@@ -1,152 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-var _path = _interopRequireDefault(require("./path"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const testing = process.env.NODE_ENV === "test";
-
-class TraversalContext {
- constructor(scope, opts, state, parentPath) {
- this.queue = null;
- this.parentPath = parentPath;
- this.scope = scope;
- this.state = state;
- this.opts = opts;
- }
-
- shouldVisit(node) {
- const opts = this.opts;
- if (opts.enter || opts.exit) return true;
- if (opts[node.type]) return true;
- const keys = t().VISITOR_KEYS[node.type];
- if (!keys || !keys.length) return false;
-
- for (const key of keys) {
- if (node[key]) return true;
- }
-
- return false;
- }
-
- create(node, obj, key, listKey) {
- return _path.default.get({
- parentPath: this.parentPath,
- parent: node,
- container: obj,
- key: key,
- listKey
- });
- }
-
- maybeQueue(path, notPriority) {
- if (this.trap) {
- throw new Error("Infinite cycle detected");
- }
-
- if (this.queue) {
- if (notPriority) {
- this.queue.push(path);
- } else {
- this.priorityQueue.push(path);
- }
- }
- }
-
- visitMultiple(container, parent, listKey) {
- if (container.length === 0) return false;
- const queue = [];
-
- for (let key = 0; key < container.length; key++) {
- const node = container[key];
-
- if (node && this.shouldVisit(node)) {
- queue.push(this.create(parent, container, key, listKey));
- }
- }
-
- return this.visitQueue(queue);
- }
-
- visitSingle(node, key) {
- if (this.shouldVisit(node[key])) {
- return this.visitQueue([this.create(node, node, key)]);
- } else {
- return false;
- }
- }
-
- visitQueue(queue) {
- this.queue = queue;
- this.priorityQueue = [];
- const visited = [];
- let stop = false;
-
- for (const path of queue) {
- path.resync();
-
- if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
- path.pushContext(this);
- }
-
- if (path.key === null) continue;
-
- if (testing && queue.length >= 10000) {
- this.trap = true;
- }
-
- if (visited.indexOf(path.node) >= 0) continue;
- visited.push(path.node);
-
- if (path.visit()) {
- stop = true;
- break;
- }
-
- if (this.priorityQueue.length) {
- stop = this.visitQueue(this.priorityQueue);
- this.priorityQueue = [];
- this.queue = queue;
- if (stop) break;
- }
- }
-
- for (const path of queue) {
- path.popContext();
- }
-
- this.queue = null;
- return stop;
- }
-
- visit(node, key) {
- const nodes = node[key];
- if (!nodes) return false;
-
- if (Array.isArray(nodes)) {
- return this.visitMultiple(nodes, node, key);
- } else {
- return this.visitSingle(node, key);
- }
- }
-
-}
-
-exports.default = TraversalContext; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js
deleted file mode 100644
index 1865e2abc87..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/index.js
+++ /dev/null
@@ -1,130 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = traverse;
-Object.defineProperty(exports, "NodePath", {
- enumerable: true,
- get: function () {
- return _path.default;
- }
-});
-Object.defineProperty(exports, "Scope", {
- enumerable: true,
- get: function () {
- return _scope.default;
- }
-});
-Object.defineProperty(exports, "Hub", {
- enumerable: true,
- get: function () {
- return _hub.default;
- }
-});
-exports.visitors = void 0;
-
-var _context = _interopRequireDefault(require("./context"));
-
-var visitors = _interopRequireWildcard(require("./visitors"));
-
-exports.visitors = visitors;
-
-function _includes() {
- const data = _interopRequireDefault(require("lodash/includes"));
-
- _includes = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var cache = _interopRequireWildcard(require("./cache"));
-
-var _path = _interopRequireDefault(require("./path"));
-
-var _scope = _interopRequireDefault(require("./scope"));
-
-var _hub = _interopRequireDefault(require("./hub"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function traverse(parent, opts, scope, state, parentPath) {
- if (!parent) return;
- if (!opts) opts = {};
-
- if (!opts.noScope && !scope) {
- if (parent.type !== "Program" && parent.type !== "File") {
- throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath.");
- }
- }
-
- visitors.explode(opts);
- traverse.node(parent, opts, scope, state, parentPath);
-}
-
-traverse.visitors = visitors;
-traverse.verify = visitors.verify;
-traverse.explode = visitors.explode;
-
-traverse.cheap = function (node, enter) {
- return t().traverseFast(node, enter);
-};
-
-traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
- const keys = t().VISITOR_KEYS[node.type];
- if (!keys) return;
- const context = new _context.default(scope, opts, state, parentPath);
-
- for (const key of keys) {
- if (skipKeys && skipKeys[key]) continue;
- if (context.visit(node, key)) return;
- }
-};
-
-traverse.clearNode = function (node, opts) {
- t().removeProperties(node, opts);
- cache.path.delete(node);
-};
-
-traverse.removeProperties = function (tree, opts) {
- t().traverseFast(tree, traverse.clearNode, opts);
- return tree;
-};
-
-function hasBlacklistedType(path, state) {
- if (path.node.type === state.type) {
- state.has = true;
- path.stop();
- }
-}
-
-traverse.hasType = function (tree, type, blacklistTypes) {
- if ((0, _includes().default)(blacklistTypes, tree.type)) return false;
- if (tree.type === type) return true;
- const state = {
- has: false,
- type: type
- };
- traverse(tree, {
- noScope: true,
- blacklist: blacklistTypes,
- enter: hasBlacklistedType
- }, null, state);
- return state.has;
-};
-
-traverse.cache = cache; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/ancestry.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/ancestry.js
deleted file mode 100644
index 60e6a98f0be..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/ancestry.js
+++ /dev/null
@@ -1,188 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.findParent = findParent;
-exports.find = find;
-exports.getFunctionParent = getFunctionParent;
-exports.getStatementParent = getStatementParent;
-exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
-exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
-exports.getAncestry = getAncestry;
-exports.isAncestor = isAncestor;
-exports.isDescendant = isDescendant;
-exports.inType = inType;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var _index = _interopRequireDefault(require("./index"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function findParent(callback) {
- let path = this;
-
- while (path = path.parentPath) {
- if (callback(path)) return path;
- }
-
- return null;
-}
-
-function find(callback) {
- let path = this;
-
- do {
- if (callback(path)) return path;
- } while (path = path.parentPath);
-
- return null;
-}
-
-function getFunctionParent() {
- return this.findParent(p => p.isFunction());
-}
-
-function getStatementParent() {
- let path = this;
-
- do {
- if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
- break;
- } else {
- path = path.parentPath;
- }
- } while (path);
-
- if (path && (path.isProgram() || path.isFile())) {
- throw new Error("File/Program node, we can't possibly find a statement parent to this");
- }
-
- return path;
-}
-
-function getEarliestCommonAncestorFrom(paths) {
- return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
- let earliest;
- const keys = t().VISITOR_KEYS[deepest.type];
-
- for (const ancestry of ancestries) {
- const path = ancestry[i + 1];
-
- if (!earliest) {
- earliest = path;
- continue;
- }
-
- if (path.listKey && earliest.listKey === path.listKey) {
- if (path.key < earliest.key) {
- earliest = path;
- continue;
- }
- }
-
- const earliestKeyIndex = keys.indexOf(earliest.parentKey);
- const currentKeyIndex = keys.indexOf(path.parentKey);
-
- if (earliestKeyIndex > currentKeyIndex) {
- earliest = path;
- }
- }
-
- return earliest;
- });
-}
-
-function getDeepestCommonAncestorFrom(paths, filter) {
- if (!paths.length) {
- return this;
- }
-
- if (paths.length === 1) {
- return paths[0];
- }
-
- let minDepth = Infinity;
- let lastCommonIndex, lastCommon;
- const ancestries = paths.map(path => {
- const ancestry = [];
-
- do {
- ancestry.unshift(path);
- } while ((path = path.parentPath) && path !== this);
-
- if (ancestry.length < minDepth) {
- minDepth = ancestry.length;
- }
-
- return ancestry;
- });
- const first = ancestries[0];
-
- depthLoop: for (let i = 0; i < minDepth; i++) {
- const shouldMatch = first[i];
-
- for (const ancestry of ancestries) {
- if (ancestry[i] !== shouldMatch) {
- break depthLoop;
- }
- }
-
- lastCommonIndex = i;
- lastCommon = shouldMatch;
- }
-
- if (lastCommon) {
- if (filter) {
- return filter(lastCommon, lastCommonIndex, ancestries);
- } else {
- return lastCommon;
- }
- } else {
- throw new Error("Couldn't find intersection");
- }
-}
-
-function getAncestry() {
- let path = this;
- const paths = [];
-
- do {
- paths.push(path);
- } while (path = path.parentPath);
-
- return paths;
-}
-
-function isAncestor(maybeDescendant) {
- return maybeDescendant.isDescendant(this);
-}
-
-function isDescendant(maybeAncestor) {
- return !!this.findParent(parent => parent === maybeAncestor);
-}
-
-function inType() {
- let path = this;
-
- while (path) {
- for (const type of arguments) {
- if (path.node.type === type) return true;
- }
-
- path = path.parentPath;
- }
-
- return false;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js
deleted file mode 100644
index 09ec514b91a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/comments.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
-exports.addComment = addComment;
-exports.addComments = addComments;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function shareCommentsWithSiblings() {
- if (typeof this.key === "string") return;
- const node = this.node;
- if (!node) return;
- const trailing = node.trailingComments;
- const leading = node.leadingComments;
- if (!trailing && !leading) return;
- const prev = this.getSibling(this.key - 1);
- const next = this.getSibling(this.key + 1);
- const hasPrev = Boolean(prev.node);
- const hasNext = Boolean(next.node);
-
- if (hasPrev && hasNext) {} else if (hasPrev) {
- prev.addComments("trailing", trailing);
- } else if (hasNext) {
- next.addComments("leading", leading);
- }
-}
-
-function addComment(type, content, line) {
- t().addComment(this.node, type, content, line);
-}
-
-function addComments(type, comments) {
- t().addComments(this.node, type, comments);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js
deleted file mode 100644
index eacfc4e9b21..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/context.js
+++ /dev/null
@@ -1,245 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.call = call;
-exports._call = _call;
-exports.isBlacklisted = isBlacklisted;
-exports.visit = visit;
-exports.skip = skip;
-exports.skipKey = skipKey;
-exports.stop = stop;
-exports.setScope = setScope;
-exports.setContext = setContext;
-exports.resync = resync;
-exports._resyncParent = _resyncParent;
-exports._resyncKey = _resyncKey;
-exports._resyncList = _resyncList;
-exports._resyncRemoved = _resyncRemoved;
-exports.popContext = popContext;
-exports.pushContext = pushContext;
-exports.setup = setup;
-exports.setKey = setKey;
-exports.requeue = requeue;
-exports._getQueueContexts = _getQueueContexts;
-
-var _index = _interopRequireDefault(require("../index"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function call(key) {
- const opts = this.opts;
- this.debug(key);
-
- if (this.node) {
- if (this._call(opts[key])) return true;
- }
-
- if (this.node) {
- return this._call(opts[this.node.type] && opts[this.node.type][key]);
- }
-
- return false;
-}
-
-function _call(fns) {
- if (!fns) return false;
-
- for (const fn of fns) {
- if (!fn) continue;
- const node = this.node;
- if (!node) return true;
- const ret = fn.call(this.state, this, this.state);
-
- if (ret && typeof ret === "object" && typeof ret.then === "function") {
- throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
- }
-
- if (ret) {
- throw new Error(`Unexpected return value from visitor method ${fn}`);
- }
-
- if (this.node !== node) return true;
- if (this.shouldStop || this.shouldSkip || this.removed) return true;
- }
-
- return false;
-}
-
-function isBlacklisted() {
- const blacklist = this.opts.blacklist;
- return blacklist && blacklist.indexOf(this.node.type) > -1;
-}
-
-function visit() {
- if (!this.node) {
- return false;
- }
-
- if (this.isBlacklisted()) {
- return false;
- }
-
- if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
- return false;
- }
-
- if (this.call("enter") || this.shouldSkip) {
- this.debug("Skip...");
- return this.shouldStop;
- }
-
- this.debug("Recursing into...");
-
- _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
-
- this.call("exit");
- return this.shouldStop;
-}
-
-function skip() {
- this.shouldSkip = true;
-}
-
-function skipKey(key) {
- this.skipKeys[key] = true;
-}
-
-function stop() {
- this.shouldStop = true;
- this.shouldSkip = true;
-}
-
-function setScope() {
- if (this.opts && this.opts.noScope) return;
- let path = this.parentPath;
- let target;
-
- while (path && !target) {
- if (path.opts && path.opts.noScope) return;
- target = path.scope;
- path = path.parentPath;
- }
-
- this.scope = this.getScope(target);
- if (this.scope) this.scope.init();
-}
-
-function setContext(context) {
- this.shouldSkip = false;
- this.shouldStop = false;
- this.removed = false;
- this.skipKeys = {};
-
- if (context) {
- this.context = context;
- this.state = context.state;
- this.opts = context.opts;
- }
-
- this.setScope();
- return this;
-}
-
-function resync() {
- if (this.removed) return;
-
- this._resyncParent();
-
- this._resyncList();
-
- this._resyncKey();
-}
-
-function _resyncParent() {
- if (this.parentPath) {
- this.parent = this.parentPath.node;
- }
-}
-
-function _resyncKey() {
- if (!this.container) return;
- if (this.node === this.container[this.key]) return;
-
- if (Array.isArray(this.container)) {
- for (let i = 0; i < this.container.length; i++) {
- if (this.container[i] === this.node) {
- return this.setKey(i);
- }
- }
- } else {
- for (const key of Object.keys(this.container)) {
- if (this.container[key] === this.node) {
- return this.setKey(key);
- }
- }
- }
-
- this.key = null;
-}
-
-function _resyncList() {
- if (!this.parent || !this.inList) return;
- const newContainer = this.parent[this.listKey];
- if (this.container === newContainer) return;
- this.container = newContainer || null;
-}
-
-function _resyncRemoved() {
- if (this.key == null || !this.container || this.container[this.key] !== this.node) {
- this._markRemoved();
- }
-}
-
-function popContext() {
- this.contexts.pop();
-
- if (this.contexts.length > 0) {
- this.setContext(this.contexts[this.contexts.length - 1]);
- } else {
- this.setContext(undefined);
- }
-}
-
-function pushContext(context) {
- this.contexts.push(context);
- this.setContext(context);
-}
-
-function setup(parentPath, container, listKey, key) {
- this.inList = !!listKey;
- this.listKey = listKey;
- this.parentKey = listKey || key;
- this.container = container;
- this.parentPath = parentPath || this.parentPath;
- this.setKey(key);
-}
-
-function setKey(key) {
- this.key = key;
- this.node = this.container[this.key];
- this.type = this.node && this.node.type;
-}
-
-function requeue(pathToQueue = this) {
- if (pathToQueue.removed) return;
- const contexts = this.contexts;
-
- for (const context of contexts) {
- context.maybeQueue(pathToQueue);
- }
-}
-
-function _getQueueContexts() {
- let path = this;
- let contexts = this.contexts;
-
- while (!contexts.length) {
- path = path.parentPath;
- if (!path) break;
- contexts = path.contexts;
- }
-
- return contexts;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js
deleted file mode 100644
index 9faa9053bc9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/conversion.js
+++ /dev/null
@@ -1,463 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.toComputedKey = toComputedKey;
-exports.ensureBlock = ensureBlock;
-exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
-exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
-exports.arrowFunctionToExpression = arrowFunctionToExpression;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _helperFunctionName() {
- const data = _interopRequireDefault(require("@babel/helper-function-name"));
-
- _helperFunctionName = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function toComputedKey() {
- const node = this.node;
- let key;
-
- if (this.isMemberExpression()) {
- key = node.property;
- } else if (this.isProperty() || this.isMethod()) {
- key = node.key;
- } else {
- throw new ReferenceError("todo");
- }
-
- if (!node.computed) {
- if (t().isIdentifier(key)) key = t().stringLiteral(key.name);
- }
-
- return key;
-}
-
-function ensureBlock() {
- const body = this.get("body");
- const bodyNode = body.node;
-
- if (Array.isArray(body)) {
- throw new Error("Can't convert array path to a block statement");
- }
-
- if (!bodyNode) {
- throw new Error("Can't convert node without a body");
- }
-
- if (body.isBlockStatement()) {
- return bodyNode;
- }
-
- const statements = [];
- let stringPath = "body";
- let key;
- let listKey;
-
- if (body.isStatement()) {
- listKey = "body";
- key = 0;
- statements.push(body.node);
- } else {
- stringPath += ".body.0";
-
- if (this.isFunction()) {
- key = "argument";
- statements.push(t().returnStatement(body.node));
- } else {
- key = "expression";
- statements.push(t().expressionStatement(body.node));
- }
- }
-
- this.node.body = t().blockStatement(statements);
- const parentPath = this.get(stringPath);
- body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
- return this.node;
-}
-
-function arrowFunctionToShadowed() {
- if (!this.isArrowFunctionExpression()) return;
- this.arrowFunctionToExpression();
-}
-
-function unwrapFunctionEnvironment() {
- if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
- throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
- }
-
- hoistFunctionEnvironment(this);
-}
-
-function arrowFunctionToExpression({
- allowInsertArrow = true,
- specCompliant = false
-} = {}) {
- if (!this.isArrowFunctionExpression()) {
- throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
- }
-
- const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow);
- this.ensureBlock();
- this.node.type = "FunctionExpression";
-
- if (specCompliant) {
- const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
-
- if (checkBinding) {
- this.parentPath.scope.push({
- id: checkBinding,
- init: t().objectExpression([])
- });
- }
-
- this.get("body").unshiftContainer("body", t().expressionStatement(t().callExpression(this.hub.addHelper("newArrowCheck"), [t().thisExpression(), checkBinding ? t().identifier(checkBinding.name) : t().identifier(thisBinding)])));
- this.replaceWith(t().callExpression(t().memberExpression((0, _helperFunctionName().default)(this, true) || this.node, t().identifier("bind")), [checkBinding ? t().identifier(checkBinding.name) : t().thisExpression()]));
- }
-}
-
-function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) {
- const thisEnvFn = fnPath.findParent(p => {
- return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
- static: false
- });
- });
- const inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor";
-
- if (thisEnvFn.isClassProperty()) {
- throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
- }
-
- const {
- thisPaths,
- argumentsPaths,
- newTargetPaths,
- superProps,
- superCalls
- } = getScopeInformation(fnPath);
-
- if (inConstructor && superCalls.length > 0) {
- if (!allowInsertArrow) {
- throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
- }
-
- const allSuperCalls = [];
- thisEnvFn.traverse({
- Function(child) {
- if (child.isArrowFunctionExpression()) return;
- child.skip();
- },
-
- ClassProperty(child) {
- child.skip();
- },
-
- CallExpression(child) {
- if (!child.get("callee").isSuper()) return;
- allSuperCalls.push(child);
- }
-
- });
- const superBinding = getSuperBinding(thisEnvFn);
- allSuperCalls.forEach(superCall => {
- const callee = t().identifier(superBinding);
- callee.loc = superCall.node.callee.loc;
- superCall.get("callee").replaceWith(callee);
- });
- }
-
- let thisBinding;
-
- if (thisPaths.length > 0 || specCompliant) {
- thisBinding = getThisBinding(thisEnvFn, inConstructor);
-
- if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) {
- thisPaths.forEach(thisChild => {
- const thisRef = thisChild.isJSX() ? t().jsxIdentifier(thisBinding) : t().identifier(thisBinding);
- thisRef.loc = thisChild.node.loc;
- thisChild.replaceWith(thisRef);
- });
- if (specCompliant) thisBinding = null;
- }
- }
-
- if (argumentsPaths.length > 0) {
- const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t().identifier("arguments"));
- argumentsPaths.forEach(argumentsChild => {
- const argsRef = t().identifier(argumentsBinding);
- argsRef.loc = argumentsChild.node.loc;
- argumentsChild.replaceWith(argsRef);
- });
- }
-
- if (newTargetPaths.length > 0) {
- const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t().metaProperty(t().identifier("new"), t().identifier("target")));
- newTargetPaths.forEach(targetChild => {
- const targetRef = t().identifier(newTargetBinding);
- targetRef.loc = targetChild.node.loc;
- targetChild.replaceWith(targetRef);
- });
- }
-
- if (superProps.length > 0) {
- if (!allowInsertArrow) {
- throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
- }
-
- const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
- flatSuperProps.forEach(superProp => {
- const key = superProp.node.computed ? "" : superProp.get("property").node.name;
-
- if (superProp.parentPath.isCallExpression({
- callee: superProp.node
- })) {
- const superBinding = getSuperPropCallBinding(thisEnvFn, key);
-
- if (superProp.node.computed) {
- const prop = superProp.get("property").node;
- superProp.replaceWith(t().identifier(superBinding));
- superProp.parentPath.node.arguments.unshift(prop);
- } else {
- superProp.replaceWith(t().identifier(superBinding));
- }
- } else {
- const isAssignment = superProp.parentPath.isAssignmentExpression({
- left: superProp.node
- });
- const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
- const args = [];
-
- if (superProp.node.computed) {
- args.push(superProp.get("property").node);
- }
-
- if (isAssignment) {
- const value = superProp.parentPath.node.right;
- args.push(value);
- superProp.parentPath.replaceWith(t().callExpression(t().identifier(superBinding), args));
- } else {
- superProp.replaceWith(t().callExpression(t().identifier(superBinding), args));
- }
- }
- });
- }
-
- return thisBinding;
-}
-
-function standardizeSuperProperty(superProp) {
- if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
- const assignmentPath = superProp.parentPath;
- const op = assignmentPath.node.operator.slice(0, -1);
- const value = assignmentPath.node.right;
- assignmentPath.node.operator = "=";
-
- if (superProp.node.computed) {
- const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
- assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, t().assignmentExpression("=", tmp, superProp.node.property), true));
- assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(tmp.name), true), value));
- } else {
- assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, superProp.node.property));
- assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(superProp.node.property.name)), value));
- }
-
- return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
- } else if (superProp.parentPath.isUpdateExpression()) {
- const updateExpr = superProp.parentPath;
- const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
- const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
- const parts = [t().assignmentExpression("=", tmp, t().memberExpression(superProp.node.object, computedKey ? t().assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t().assignmentExpression("=", t().memberExpression(superProp.node.object, computedKey ? t().identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t().binaryExpression("+", t().identifier(tmp.name), t().numericLiteral(1)))];
-
- if (!superProp.parentPath.node.prefix) {
- parts.push(t().identifier(tmp.name));
- }
-
- updateExpr.replaceWith(t().sequenceExpression(parts));
- const left = updateExpr.get("expressions.0.right");
- const right = updateExpr.get("expressions.1.left");
- return [left, right];
- }
-
- return [superProp];
-}
-
-function hasSuperClass(thisEnvFn) {
- return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
-}
-
-function getThisBinding(thisEnvFn, inConstructor) {
- return getBinding(thisEnvFn, "this", thisBinding => {
- if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression();
- const supers = new WeakSet();
- thisEnvFn.traverse({
- Function(child) {
- if (child.isArrowFunctionExpression()) return;
- child.skip();
- },
-
- ClassProperty(child) {
- child.skip();
- },
-
- CallExpression(child) {
- if (!child.get("callee").isSuper()) return;
- if (supers.has(child.node)) return;
- supers.add(child.node);
- child.replaceWithMultiple([child.node, t().assignmentExpression("=", t().identifier(thisBinding), t().identifier("this"))]);
- }
-
- });
- });
-}
-
-function getSuperBinding(thisEnvFn) {
- return getBinding(thisEnvFn, "supercall", () => {
- const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
- return t().arrowFunctionExpression([t().restElement(argsBinding)], t().callExpression(t().super(), [t().spreadElement(t().identifier(argsBinding.name))]));
- });
-}
-
-function getSuperPropCallBinding(thisEnvFn, propName) {
- return getBinding(thisEnvFn, `superprop_call:${propName || ""}`, () => {
- const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
- const argsList = [t().restElement(argsBinding)];
- let fnBody;
-
- if (propName) {
- fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]);
- } else {
- const method = thisEnvFn.scope.generateUidIdentifier("prop");
- argsList.unshift(method);
- fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]);
- }
-
- return t().arrowFunctionExpression(argsList, fnBody);
- });
-}
-
-function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
- const op = isAssignment ? "set" : "get";
- return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
- const argsList = [];
- let fnBody;
-
- if (propName) {
- fnBody = t().memberExpression(t().super(), t().identifier(propName));
- } else {
- const method = thisEnvFn.scope.generateUidIdentifier("prop");
- argsList.unshift(method);
- fnBody = t().memberExpression(t().super(), t().identifier(method.name), true);
- }
-
- if (isAssignment) {
- const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
- argsList.push(valueIdent);
- fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name));
- }
-
- return t().arrowFunctionExpression(argsList, fnBody);
- });
-}
-
-function getBinding(thisEnvFn, key, init) {
- const cacheKey = "binding:" + key;
- let data = thisEnvFn.getData(cacheKey);
-
- if (!data) {
- const id = thisEnvFn.scope.generateUidIdentifier(key);
- data = id.name;
- thisEnvFn.setData(cacheKey, data);
- thisEnvFn.scope.push({
- id: id,
- init: init(data)
- });
- }
-
- return data;
-}
-
-function getScopeInformation(fnPath) {
- const thisPaths = [];
- const argumentsPaths = [];
- const newTargetPaths = [];
- const superProps = [];
- const superCalls = [];
- fnPath.traverse({
- ClassProperty(child) {
- child.skip();
- },
-
- Function(child) {
- if (child.isArrowFunctionExpression()) return;
- child.skip();
- },
-
- ThisExpression(child) {
- thisPaths.push(child);
- },
-
- JSXIdentifier(child) {
- if (child.node.name !== "this") return;
-
- if (!child.parentPath.isJSXMemberExpression({
- object: child.node
- }) && !child.parentPath.isJSXOpeningElement({
- name: child.node
- })) {
- return;
- }
-
- thisPaths.push(child);
- },
-
- CallExpression(child) {
- if (child.get("callee").isSuper()) superCalls.push(child);
- },
-
- MemberExpression(child) {
- if (child.get("object").isSuper()) superProps.push(child);
- },
-
- ReferencedIdentifier(child) {
- if (child.node.name !== "arguments") return;
- argumentsPaths.push(child);
- },
-
- MetaProperty(child) {
- if (!child.get("meta").isIdentifier({
- name: "new"
- })) return;
- if (!child.get("property").isIdentifier({
- name: "target"
- })) return;
- newTargetPaths.push(child);
- }
-
- });
- return {
- thisPaths,
- argumentsPaths,
- newTargetPaths,
- superProps,
- superCalls
- };
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/evaluation.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/evaluation.js
deleted file mode 100644
index 61c0a550b13..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/evaluation.js
+++ /dev/null
@@ -1,404 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.evaluateTruthy = evaluateTruthy;
-exports.evaluate = evaluate;
-const VALID_CALLEES = ["String", "Number", "Math"];
-const INVALID_METHODS = ["random"];
-
-function evaluateTruthy() {
- const res = this.evaluate();
- if (res.confident) return !!res.value;
-}
-
-function deopt(path, state) {
- if (!state.confident) return;
- state.deoptPath = path;
- state.confident = false;
-}
-
-function evaluateCached(path, state) {
- const {
- node
- } = path;
- const {
- seen
- } = state;
-
- if (seen.has(node)) {
- const existing = seen.get(node);
-
- if (existing.resolved) {
- return existing.value;
- } else {
- deopt(path, state);
- return;
- }
- } else {
- const item = {
- resolved: false
- };
- seen.set(node, item);
-
- const val = _evaluate(path, state);
-
- if (state.confident) {
- item.resolved = true;
- item.value = val;
- }
-
- return val;
- }
-}
-
-function _evaluate(path, state) {
- if (!state.confident) return;
- const {
- node
- } = path;
-
- if (path.isSequenceExpression()) {
- const exprs = path.get("expressions");
- return evaluateCached(exprs[exprs.length - 1], state);
- }
-
- if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
- return node.value;
- }
-
- if (path.isNullLiteral()) {
- return null;
- }
-
- if (path.isTemplateLiteral()) {
- return evaluateQuasis(path, node.quasis, state);
- }
-
- if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
- const object = path.get("tag.object");
- const {
- node: {
- name
- }
- } = object;
- const property = path.get("tag.property");
-
- if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") {
- return evaluateQuasis(path, node.quasi.quasis, state, true);
- }
- }
-
- if (path.isConditionalExpression()) {
- const testResult = evaluateCached(path.get("test"), state);
- if (!state.confident) return;
-
- if (testResult) {
- return evaluateCached(path.get("consequent"), state);
- } else {
- return evaluateCached(path.get("alternate"), state);
- }
- }
-
- if (path.isExpressionWrapper()) {
- return evaluateCached(path.get("expression"), state);
- }
-
- if (path.isMemberExpression() && !path.parentPath.isCallExpression({
- callee: node
- })) {
- const property = path.get("property");
- const object = path.get("object");
-
- if (object.isLiteral() && property.isIdentifier()) {
- const value = object.node.value;
- const type = typeof value;
-
- if (type === "number" || type === "string") {
- return value[property.node.name];
- }
- }
- }
-
- if (path.isReferencedIdentifier()) {
- const binding = path.scope.getBinding(node.name);
-
- if (binding && binding.constantViolations.length > 0) {
- return deopt(binding.path, state);
- }
-
- if (binding && path.node.start < binding.path.node.end) {
- return deopt(binding.path, state);
- }
-
- if (binding && binding.hasValue) {
- return binding.value;
- } else {
- if (node.name === "undefined") {
- return binding ? deopt(binding.path, state) : undefined;
- } else if (node.name === "Infinity") {
- return binding ? deopt(binding.path, state) : Infinity;
- } else if (node.name === "NaN") {
- return binding ? deopt(binding.path, state) : NaN;
- }
-
- const resolved = path.resolve();
-
- if (resolved === path) {
- return deopt(path, state);
- } else {
- return evaluateCached(resolved, state);
- }
- }
- }
-
- if (path.isUnaryExpression({
- prefix: true
- })) {
- if (node.operator === "void") {
- return undefined;
- }
-
- const argument = path.get("argument");
-
- if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
- return "function";
- }
-
- const arg = evaluateCached(argument, state);
- if (!state.confident) return;
-
- switch (node.operator) {
- case "!":
- return !arg;
-
- case "+":
- return +arg;
-
- case "-":
- return -arg;
-
- case "~":
- return ~arg;
-
- case "typeof":
- return typeof arg;
- }
- }
-
- if (path.isArrayExpression()) {
- const arr = [];
- const elems = path.get("elements");
-
- for (const elem of elems) {
- const elemValue = elem.evaluate();
-
- if (elemValue.confident) {
- arr.push(elemValue.value);
- } else {
- return deopt(elem, state);
- }
- }
-
- return arr;
- }
-
- if (path.isObjectExpression()) {
- const obj = {};
- const props = path.get("properties");
-
- for (const prop of props) {
- if (prop.isObjectMethod() || prop.isSpreadElement()) {
- return deopt(prop, state);
- }
-
- const keyPath = prop.get("key");
- let key = keyPath;
-
- if (prop.node.computed) {
- key = key.evaluate();
-
- if (!key.confident) {
- return deopt(keyPath, state);
- }
-
- key = key.value;
- } else if (key.isIdentifier()) {
- key = key.node.name;
- } else {
- key = key.node.value;
- }
-
- const valuePath = prop.get("value");
- let value = valuePath.evaluate();
-
- if (!value.confident) {
- return deopt(valuePath, state);
- }
-
- value = value.value;
- obj[key] = value;
- }
-
- return obj;
- }
-
- if (path.isLogicalExpression()) {
- const wasConfident = state.confident;
- const left = evaluateCached(path.get("left"), state);
- const leftConfident = state.confident;
- state.confident = wasConfident;
- const right = evaluateCached(path.get("right"), state);
- const rightConfident = state.confident;
-
- switch (node.operator) {
- case "||":
- state.confident = leftConfident && (!!left || rightConfident);
- if (!state.confident) return;
- return left || right;
-
- case "&&":
- state.confident = leftConfident && (!left || rightConfident);
- if (!state.confident) return;
- return left && right;
- }
- }
-
- if (path.isBinaryExpression()) {
- const left = evaluateCached(path.get("left"), state);
- if (!state.confident) return;
- const right = evaluateCached(path.get("right"), state);
- if (!state.confident) return;
-
- switch (node.operator) {
- case "-":
- return left - right;
-
- case "+":
- return left + right;
-
- case "/":
- return left / right;
-
- case "*":
- return left * right;
-
- case "%":
- return left % right;
-
- case "**":
- return Math.pow(left, right);
-
- case "<":
- return left < right;
-
- case ">":
- return left > right;
-
- case "<=":
- return left <= right;
-
- case ">=":
- return left >= right;
-
- case "==":
- return left == right;
-
- case "!=":
- return left != right;
-
- case "===":
- return left === right;
-
- case "!==":
- return left !== right;
-
- case "|":
- return left | right;
-
- case "&":
- return left & right;
-
- case "^":
- return left ^ right;
-
- case "<<":
- return left << right;
-
- case ">>":
- return left >> right;
-
- case ">>>":
- return left >>> right;
- }
- }
-
- if (path.isCallExpression()) {
- const callee = path.get("callee");
- let context;
- let func;
-
- if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
- func = global[node.callee.name];
- }
-
- if (callee.isMemberExpression()) {
- const object = callee.get("object");
- const property = callee.get("property");
-
- if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
- context = global[object.node.name];
- func = context[property.node.name];
- }
-
- if (object.isLiteral() && property.isIdentifier()) {
- const type = typeof object.node.value;
-
- if (type === "string" || type === "number") {
- context = object.node.value;
- func = context[property.node.name];
- }
- }
- }
-
- if (func) {
- const args = path.get("arguments").map(arg => evaluateCached(arg, state));
- if (!state.confident) return;
- return func.apply(context, args);
- }
- }
-
- deopt(path, state);
-}
-
-function evaluateQuasis(path, quasis, state, raw = false) {
- let str = "";
- let i = 0;
- const exprs = path.get("expressions");
-
- for (const elem of quasis) {
- if (!state.confident) break;
- str += raw ? elem.value.raw : elem.value.cooked;
- const expr = exprs[i++];
- if (expr) str += String(evaluateCached(expr, state));
- }
-
- if (!state.confident) return;
- return str;
-}
-
-function evaluate() {
- const state = {
- confident: true,
- deoptPath: null,
- seen: new Map()
- };
- let value = evaluateCached(this, state);
- if (!state.confident) value = undefined;
- return {
- confident: state.confident,
- deopt: state.deoptPath,
- value: value
- };
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js
deleted file mode 100644
index 42b3fc69597..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/family.js
+++ /dev/null
@@ -1,241 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.getOpposite = getOpposite;
-exports.getCompletionRecords = getCompletionRecords;
-exports.getSibling = getSibling;
-exports.getPrevSibling = getPrevSibling;
-exports.getNextSibling = getNextSibling;
-exports.getAllNextSiblings = getAllNextSiblings;
-exports.getAllPrevSiblings = getAllPrevSiblings;
-exports.get = get;
-exports._getKey = _getKey;
-exports._getPattern = _getPattern;
-exports.getBindingIdentifiers = getBindingIdentifiers;
-exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
-exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
-exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
-
-var _index = _interopRequireDefault(require("./index"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function getOpposite() {
- if (this.key === "left") {
- return this.getSibling("right");
- } else if (this.key === "right") {
- return this.getSibling("left");
- }
-}
-
-function addCompletionRecords(path, paths) {
- if (path) return paths.concat(path.getCompletionRecords());
- return paths;
-}
-
-function getCompletionRecords() {
- let paths = [];
-
- if (this.isIfStatement()) {
- paths = addCompletionRecords(this.get("consequent"), paths);
- paths = addCompletionRecords(this.get("alternate"), paths);
- } else if (this.isDoExpression() || this.isFor() || this.isWhile()) {
- paths = addCompletionRecords(this.get("body"), paths);
- } else if (this.isProgram() || this.isBlockStatement()) {
- paths = addCompletionRecords(this.get("body").pop(), paths);
- } else if (this.isFunction()) {
- return this.get("body").getCompletionRecords();
- } else if (this.isTryStatement()) {
- paths = addCompletionRecords(this.get("block"), paths);
- paths = addCompletionRecords(this.get("handler"), paths);
- paths = addCompletionRecords(this.get("finalizer"), paths);
- } else if (this.isCatchClause()) {
- paths = addCompletionRecords(this.get("body"), paths);
- } else {
- paths.push(this);
- }
-
- return paths;
-}
-
-function getSibling(key) {
- return _index.default.get({
- parentPath: this.parentPath,
- parent: this.parent,
- container: this.container,
- listKey: this.listKey,
- key: key
- });
-}
-
-function getPrevSibling() {
- return this.getSibling(this.key - 1);
-}
-
-function getNextSibling() {
- return this.getSibling(this.key + 1);
-}
-
-function getAllNextSiblings() {
- let _key = this.key;
- let sibling = this.getSibling(++_key);
- const siblings = [];
-
- while (sibling.node) {
- siblings.push(sibling);
- sibling = this.getSibling(++_key);
- }
-
- return siblings;
-}
-
-function getAllPrevSiblings() {
- let _key = this.key;
- let sibling = this.getSibling(--_key);
- const siblings = [];
-
- while (sibling.node) {
- siblings.push(sibling);
- sibling = this.getSibling(--_key);
- }
-
- return siblings;
-}
-
-function get(key, context) {
- if (context === true) context = this.context;
- const parts = key.split(".");
-
- if (parts.length === 1) {
- return this._getKey(key, context);
- } else {
- return this._getPattern(parts, context);
- }
-}
-
-function _getKey(key, context) {
- const node = this.node;
- const container = node[key];
-
- if (Array.isArray(container)) {
- return container.map((_, i) => {
- return _index.default.get({
- listKey: key,
- parentPath: this,
- parent: node,
- container: container,
- key: i
- }).setContext(context);
- });
- } else {
- return _index.default.get({
- parentPath: this,
- parent: node,
- container: node,
- key: key
- }).setContext(context);
- }
-}
-
-function _getPattern(parts, context) {
- let path = this;
-
- for (const part of parts) {
- if (part === ".") {
- path = path.parentPath;
- } else {
- if (Array.isArray(path)) {
- path = path[part];
- } else {
- path = path.get(part, context);
- }
- }
- }
-
- return path;
-}
-
-function getBindingIdentifiers(duplicates) {
- return t().getBindingIdentifiers(this.node, duplicates);
-}
-
-function getOuterBindingIdentifiers(duplicates) {
- return t().getOuterBindingIdentifiers(this.node, duplicates);
-}
-
-function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
- const path = this;
- let search = [].concat(path);
- const ids = Object.create(null);
-
- while (search.length) {
- const id = search.shift();
- if (!id) continue;
- if (!id.node) continue;
- const keys = t().getBindingIdentifiers.keys[id.node.type];
-
- if (id.isIdentifier()) {
- if (duplicates) {
- const _ids = ids[id.node.name] = ids[id.node.name] || [];
-
- _ids.push(id);
- } else {
- ids[id.node.name] = id;
- }
-
- continue;
- }
-
- if (id.isExportDeclaration()) {
- const declaration = id.get("declaration");
-
- if (declaration.isDeclaration()) {
- search.push(declaration);
- }
-
- continue;
- }
-
- if (outerOnly) {
- if (id.isFunctionDeclaration()) {
- search.push(id.get("id"));
- continue;
- }
-
- if (id.isFunctionExpression()) {
- continue;
- }
- }
-
- if (keys) {
- for (let i = 0; i < keys.length; i++) {
- const key = keys[i];
- const child = id.get(key);
-
- if (Array.isArray(child) || child.node) {
- search = search.concat(child);
- }
- }
- }
- }
-
- return ids;
-}
-
-function getOuterBindingIdentifierPaths(duplicates) {
- return this.getBindingIdentifierPaths(duplicates, true);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js
deleted file mode 100644
index 906087f10d8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/index.js
+++ /dev/null
@@ -1,219 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types"));
-
-function _debug() {
- const data = _interopRequireDefault(require("debug"));
-
- _debug = function () {
- return data;
- };
-
- return data;
-}
-
-var _index = _interopRequireDefault(require("../index"));
-
-var _scope = _interopRequireDefault(require("../scope"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var _cache = require("../cache");
-
-function _generator() {
- const data = _interopRequireDefault(require("@babel/generator"));
-
- _generator = function () {
- return data;
- };
-
- return data;
-}
-
-var NodePath_ancestry = _interopRequireWildcard(require("./ancestry"));
-
-var NodePath_inference = _interopRequireWildcard(require("./inference"));
-
-var NodePath_replacement = _interopRequireWildcard(require("./replacement"));
-
-var NodePath_evaluation = _interopRequireWildcard(require("./evaluation"));
-
-var NodePath_conversion = _interopRequireWildcard(require("./conversion"));
-
-var NodePath_introspection = _interopRequireWildcard(require("./introspection"));
-
-var NodePath_context = _interopRequireWildcard(require("./context"));
-
-var NodePath_removal = _interopRequireWildcard(require("./removal"));
-
-var NodePath_modification = _interopRequireWildcard(require("./modification"));
-
-var NodePath_family = _interopRequireWildcard(require("./family"));
-
-var NodePath_comments = _interopRequireWildcard(require("./comments"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const debug = (0, _debug().default)("babel");
-
-class NodePath {
- constructor(hub, parent) {
- this.parent = parent;
- this.hub = hub;
- this.contexts = [];
- this.data = Object.create(null);
- this.shouldSkip = false;
- this.shouldStop = false;
- this.removed = false;
- this.state = null;
- this.opts = null;
- this.skipKeys = null;
- this.parentPath = null;
- this.context = null;
- this.container = null;
- this.listKey = null;
- this.inList = false;
- this.parentKey = null;
- this.key = null;
- this.node = null;
- this.scope = null;
- this.type = null;
- this.typeAnnotation = null;
- }
-
- static get({
- hub,
- parentPath,
- parent,
- container,
- listKey,
- key
- }) {
- if (!hub && parentPath) {
- hub = parentPath.hub;
- }
-
- if (!parent) {
- throw new Error("To get a node path the parent needs to exist");
- }
-
- const targetNode = container[key];
- const paths = _cache.path.get(parent) || [];
-
- if (!_cache.path.has(parent)) {
- _cache.path.set(parent, paths);
- }
-
- let path;
-
- for (let i = 0; i < paths.length; i++) {
- const pathCheck = paths[i];
-
- if (pathCheck.node === targetNode) {
- path = pathCheck;
- break;
- }
- }
-
- if (!path) {
- path = new NodePath(hub, parent);
- paths.push(path);
- }
-
- path.setup(parentPath, container, listKey, key);
- return path;
- }
-
- getScope(scope) {
- return this.isScope() ? new _scope.default(this) : scope;
- }
-
- setData(key, val) {
- return this.data[key] = val;
- }
-
- getData(key, def) {
- let val = this.data[key];
- if (val === undefined && def !== undefined) val = this.data[key] = def;
- return val;
- }
-
- buildCodeFrameError(msg, Error = SyntaxError) {
- return this.hub.buildError(this.node, msg, Error);
- }
-
- traverse(visitor, state) {
- (0, _index.default)(this.node, visitor, this.scope, state, this);
- }
-
- set(key, node) {
- t().validate(this.node, key, node);
- this.node[key] = node;
- }
-
- getPathLocation() {
- const parts = [];
- let path = this;
-
- do {
- let key = path.key;
- if (path.inList) key = `${path.listKey}[${key}]`;
- parts.unshift(key);
- } while (path = path.parentPath);
-
- return parts.join(".");
- }
-
- debug(message) {
- if (!debug.enabled) return;
- debug(`${this.getPathLocation()} ${this.type}: ${message}`);
- }
-
- toString() {
- return (0, _generator().default)(this.node).code;
- }
-
-}
-
-exports.default = NodePath;
-Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
-
-for (const type of t().TYPES) {
- const typeKey = `is${type}`;
- const fn = t()[typeKey];
-
- NodePath.prototype[typeKey] = function (opts) {
- return fn(this.node, opts);
- };
-
- NodePath.prototype[`assert${type}`] = function (opts) {
- if (!fn(this.node, opts)) {
- throw new TypeError(`Expected node path of type ${type}`);
- }
- };
-}
-
-for (const type of Object.keys(virtualTypes)) {
- if (type[0] === "_") continue;
- if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type);
- const virtualType = virtualTypes[type];
-
- NodePath.prototype[`is${type}`] = function (opts) {
- return virtualType.checkPath(this, opts);
- };
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js
deleted file mode 100644
index 80a77d08ae6..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/index.js
+++ /dev/null
@@ -1,132 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.getTypeAnnotation = getTypeAnnotation;
-exports._getTypeAnnotation = _getTypeAnnotation;
-exports.isBaseType = isBaseType;
-exports.couldBeBaseType = couldBeBaseType;
-exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
-exports.isGenericType = isGenericType;
-
-var inferers = _interopRequireWildcard(require("./inferers"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function getTypeAnnotation() {
- if (this.typeAnnotation) return this.typeAnnotation;
- let type = this._getTypeAnnotation() || t().anyTypeAnnotation();
- if (t().isTypeAnnotation(type)) type = type.typeAnnotation;
- return this.typeAnnotation = type;
-}
-
-function _getTypeAnnotation() {
- const node = this.node;
-
- if (!node) {
- if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
- const declar = this.parentPath.parentPath;
- const declarParent = declar.parentPath;
-
- if (declar.key === "left" && declarParent.isForInStatement()) {
- return t().stringTypeAnnotation();
- }
-
- if (declar.key === "left" && declarParent.isForOfStatement()) {
- return t().anyTypeAnnotation();
- }
-
- return t().voidTypeAnnotation();
- } else {
- return;
- }
- }
-
- if (node.typeAnnotation) {
- return node.typeAnnotation;
- }
-
- let inferer = inferers[node.type];
-
- if (inferer) {
- return inferer.call(this, node);
- }
-
- inferer = inferers[this.parentPath.type];
-
- if (inferer && inferer.validParent) {
- return this.parentPath.getTypeAnnotation();
- }
-}
-
-function isBaseType(baseName, soft) {
- return _isBaseType(baseName, this.getTypeAnnotation(), soft);
-}
-
-function _isBaseType(baseName, type, soft) {
- if (baseName === "string") {
- return t().isStringTypeAnnotation(type);
- } else if (baseName === "number") {
- return t().isNumberTypeAnnotation(type);
- } else if (baseName === "boolean") {
- return t().isBooleanTypeAnnotation(type);
- } else if (baseName === "any") {
- return t().isAnyTypeAnnotation(type);
- } else if (baseName === "mixed") {
- return t().isMixedTypeAnnotation(type);
- } else if (baseName === "empty") {
- return t().isEmptyTypeAnnotation(type);
- } else if (baseName === "void") {
- return t().isVoidTypeAnnotation(type);
- } else {
- if (soft) {
- return false;
- } else {
- throw new Error(`Unknown base type ${baseName}`);
- }
- }
-}
-
-function couldBeBaseType(name) {
- const type = this.getTypeAnnotation();
- if (t().isAnyTypeAnnotation(type)) return true;
-
- if (t().isUnionTypeAnnotation(type)) {
- for (const type2 of type.types) {
- if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
- return true;
- }
- }
-
- return false;
- } else {
- return _isBaseType(name, type, true);
- }
-}
-
-function baseTypeStrictlyMatches(right) {
- const left = this.getTypeAnnotation();
- right = right.getTypeAnnotation();
-
- if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) {
- return right.type === left.type;
- }
-}
-
-function isGenericType(genericName) {
- const type = this.getTypeAnnotation();
- return t().isGenericTypeAnnotation(type) && t().isIdentifier(type.id, {
- name: genericName
- });
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
deleted file mode 100644
index 35601aba7d9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
+++ /dev/null
@@ -1,181 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = _default;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _default(node) {
- if (!this.isReferenced()) return;
- const binding = this.scope.getBinding(node.name);
-
- if (binding) {
- if (binding.identifier.typeAnnotation) {
- return binding.identifier.typeAnnotation;
- } else {
- return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
- }
- }
-
- if (node.name === "undefined") {
- return t().voidTypeAnnotation();
- } else if (node.name === "NaN" || node.name === "Infinity") {
- return t().numberTypeAnnotation();
- } else if (node.name === "arguments") {}
-}
-
-function getTypeAnnotationBindingConstantViolations(binding, path, name) {
- const types = [];
- const functionConstantViolations = [];
- let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
- const testType = getConditionalAnnotation(binding, path, name);
-
- if (testType) {
- const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
- constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0);
- types.push(testType.typeAnnotation);
- }
-
- if (constantViolations.length) {
- constantViolations = constantViolations.concat(functionConstantViolations);
-
- for (const violation of constantViolations) {
- types.push(violation.getTypeAnnotation());
- }
- }
-
- if (types.length) {
- return t().createUnionTypeAnnotation(types);
- }
-}
-
-function getConstantViolationsBefore(binding, path, functions) {
- const violations = binding.constantViolations.slice();
- violations.unshift(binding.path);
- return violations.filter(violation => {
- violation = violation.resolve();
-
- const status = violation._guessExecutionStatusRelativeTo(path);
-
- if (functions && status === "function") functions.push(violation);
- return status === "before";
- });
-}
-
-function inferAnnotationFromBinaryExpression(name, path) {
- const operator = path.node.operator;
- const right = path.get("right").resolve();
- const left = path.get("left").resolve();
- let target;
-
- if (left.isIdentifier({
- name
- })) {
- target = right;
- } else if (right.isIdentifier({
- name
- })) {
- target = left;
- }
-
- if (target) {
- if (operator === "===") {
- return target.getTypeAnnotation();
- }
-
- if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
- return t().numberTypeAnnotation();
- }
-
- return;
- }
-
- if (operator !== "===" && operator !== "==") return;
- let typeofPath;
- let typePath;
-
- if (left.isUnaryExpression({
- operator: "typeof"
- })) {
- typeofPath = left;
- typePath = right;
- } else if (right.isUnaryExpression({
- operator: "typeof"
- })) {
- typeofPath = right;
- typePath = left;
- }
-
- if (!typeofPath) return;
- if (!typeofPath.get("argument").isIdentifier({
- name
- })) return;
- typePath = typePath.resolve();
- if (!typePath.isLiteral()) return;
- const typeValue = typePath.node.value;
- if (typeof typeValue !== "string") return;
- return t().createTypeAnnotationBasedOnTypeof(typeValue);
-}
-
-function getParentConditionalPath(binding, path, name) {
- let parentPath;
-
- while (parentPath = path.parentPath) {
- if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
- if (path.key === "test") {
- return;
- }
-
- return parentPath;
- }
-
- if (parentPath.isFunction()) {
- if (parentPath.parentPath.scope.getBinding(name) !== binding) return;
- }
-
- path = parentPath;
- }
-}
-
-function getConditionalAnnotation(binding, path, name) {
- const ifStatement = getParentConditionalPath(binding, path, name);
- if (!ifStatement) return;
- const test = ifStatement.get("test");
- const paths = [test];
- const types = [];
-
- for (let i = 0; i < paths.length; i++) {
- const path = paths[i];
-
- if (path.isLogicalExpression()) {
- if (path.node.operator === "&&") {
- paths.push(path.get("left"));
- paths.push(path.get("right"));
- }
- } else if (path.isBinaryExpression()) {
- const type = inferAnnotationFromBinaryExpression(name, path);
- if (type) types.push(type);
- }
- }
-
- if (types.length) {
- return {
- typeAnnotation: t().createUnionTypeAnnotation(types),
- ifStatement
- };
- }
-
- return getConditionalAnnotation(ifStatement, name);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js
deleted file mode 100644
index 5890b93827a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/inference/inferers.js
+++ /dev/null
@@ -1,227 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.VariableDeclarator = VariableDeclarator;
-exports.TypeCastExpression = TypeCastExpression;
-exports.NewExpression = NewExpression;
-exports.TemplateLiteral = TemplateLiteral;
-exports.UnaryExpression = UnaryExpression;
-exports.BinaryExpression = BinaryExpression;
-exports.LogicalExpression = LogicalExpression;
-exports.ConditionalExpression = ConditionalExpression;
-exports.SequenceExpression = SequenceExpression;
-exports.ParenthesizedExpression = ParenthesizedExpression;
-exports.AssignmentExpression = AssignmentExpression;
-exports.UpdateExpression = UpdateExpression;
-exports.StringLiteral = StringLiteral;
-exports.NumericLiteral = NumericLiteral;
-exports.BooleanLiteral = BooleanLiteral;
-exports.NullLiteral = NullLiteral;
-exports.RegExpLiteral = RegExpLiteral;
-exports.ObjectExpression = ObjectExpression;
-exports.ArrayExpression = ArrayExpression;
-exports.RestElement = RestElement;
-exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
-exports.CallExpression = CallExpression;
-exports.TaggedTemplateExpression = TaggedTemplateExpression;
-Object.defineProperty(exports, "Identifier", {
- enumerable: true,
- get: function () {
- return _infererReference.default;
- }
-});
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var _infererReference = _interopRequireDefault(require("./inferer-reference"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function VariableDeclarator() {
- const id = this.get("id");
- if (!id.isIdentifier()) return;
- const init = this.get("init");
- let type = init.getTypeAnnotation();
-
- if (type && type.type === "AnyTypeAnnotation") {
- if (init.isCallExpression() && init.get("callee").isIdentifier({
- name: "Array"
- }) && !init.scope.hasBinding("Array", true)) {
- type = ArrayExpression();
- }
- }
-
- return type;
-}
-
-function TypeCastExpression(node) {
- return node.typeAnnotation;
-}
-
-TypeCastExpression.validParent = true;
-
-function NewExpression(node) {
- if (this.get("callee").isIdentifier()) {
- return t().genericTypeAnnotation(node.callee);
- }
-}
-
-function TemplateLiteral() {
- return t().stringTypeAnnotation();
-}
-
-function UnaryExpression(node) {
- const operator = node.operator;
-
- if (operator === "void") {
- return t().voidTypeAnnotation();
- } else if (t().NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
- return t().numberTypeAnnotation();
- } else if (t().STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
- return t().stringTypeAnnotation();
- } else if (t().BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
- return t().booleanTypeAnnotation();
- }
-}
-
-function BinaryExpression(node) {
- const operator = node.operator;
-
- if (t().NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
- return t().numberTypeAnnotation();
- } else if (t().BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
- return t().booleanTypeAnnotation();
- } else if (operator === "+") {
- const right = this.get("right");
- const left = this.get("left");
-
- if (left.isBaseType("number") && right.isBaseType("number")) {
- return t().numberTypeAnnotation();
- } else if (left.isBaseType("string") || right.isBaseType("string")) {
- return t().stringTypeAnnotation();
- }
-
- return t().unionTypeAnnotation([t().stringTypeAnnotation(), t().numberTypeAnnotation()]);
- }
-}
-
-function LogicalExpression() {
- return t().createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]);
-}
-
-function ConditionalExpression() {
- return t().createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]);
-}
-
-function SequenceExpression() {
- return this.get("expressions").pop().getTypeAnnotation();
-}
-
-function ParenthesizedExpression() {
- return this.get("expression").getTypeAnnotation();
-}
-
-function AssignmentExpression() {
- return this.get("right").getTypeAnnotation();
-}
-
-function UpdateExpression(node) {
- const operator = node.operator;
-
- if (operator === "++" || operator === "--") {
- return t().numberTypeAnnotation();
- }
-}
-
-function StringLiteral() {
- return t().stringTypeAnnotation();
-}
-
-function NumericLiteral() {
- return t().numberTypeAnnotation();
-}
-
-function BooleanLiteral() {
- return t().booleanTypeAnnotation();
-}
-
-function NullLiteral() {
- return t().nullLiteralTypeAnnotation();
-}
-
-function RegExpLiteral() {
- return t().genericTypeAnnotation(t().identifier("RegExp"));
-}
-
-function ObjectExpression() {
- return t().genericTypeAnnotation(t().identifier("Object"));
-}
-
-function ArrayExpression() {
- return t().genericTypeAnnotation(t().identifier("Array"));
-}
-
-function RestElement() {
- return ArrayExpression();
-}
-
-RestElement.validParent = true;
-
-function Func() {
- return t().genericTypeAnnotation(t().identifier("Function"));
-}
-
-const isArrayFrom = t().buildMatchMemberExpression("Array.from");
-const isObjectKeys = t().buildMatchMemberExpression("Object.keys");
-const isObjectValues = t().buildMatchMemberExpression("Object.values");
-const isObjectEntries = t().buildMatchMemberExpression("Object.entries");
-
-function CallExpression() {
- const {
- callee
- } = this.node;
-
- if (isObjectKeys(callee)) {
- return t().arrayTypeAnnotation(t().stringTypeAnnotation());
- } else if (isArrayFrom(callee) || isObjectValues(callee)) {
- return t().arrayTypeAnnotation(t().anyTypeAnnotation());
- } else if (isObjectEntries(callee)) {
- return t().arrayTypeAnnotation(t().tupleTypeAnnotation([t().stringTypeAnnotation(), t().anyTypeAnnotation()]));
- }
-
- return resolveCall(this.get("callee"));
-}
-
-function TaggedTemplateExpression() {
- return resolveCall(this.get("tag"));
-}
-
-function resolveCall(callee) {
- callee = callee.resolve();
-
- if (callee.isFunction()) {
- if (callee.is("async")) {
- if (callee.is("generator")) {
- return t().genericTypeAnnotation(t().identifier("AsyncIterator"));
- } else {
- return t().genericTypeAnnotation(t().identifier("Promise"));
- }
- } else {
- if (callee.node.returnType) {
- return callee.node.returnType;
- } else {}
- }
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js
deleted file mode 100644
index 3eab2763b8f..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/introspection.js
+++ /dev/null
@@ -1,371 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.matchesPattern = matchesPattern;
-exports.has = has;
-exports.isStatic = isStatic;
-exports.isnt = isnt;
-exports.equals = equals;
-exports.isNodeType = isNodeType;
-exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
-exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
-exports.isCompletionRecord = isCompletionRecord;
-exports.isStatementOrBlock = isStatementOrBlock;
-exports.referencesImport = referencesImport;
-exports.getSource = getSource;
-exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
-exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
-exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
-exports.resolve = resolve;
-exports._resolve = _resolve;
-exports.isConstantExpression = isConstantExpression;
-exports.isInStrictMode = isInStrictMode;
-exports.is = void 0;
-
-function _includes() {
- const data = _interopRequireDefault(require("lodash/includes"));
-
- _includes = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function matchesPattern(pattern, allowPartial) {
- return t().matchesPattern(this.node, pattern, allowPartial);
-}
-
-function has(key) {
- const val = this.node && this.node[key];
-
- if (val && Array.isArray(val)) {
- return !!val.length;
- } else {
- return !!val;
- }
-}
-
-function isStatic() {
- return this.scope.isStatic(this.node);
-}
-
-const is = has;
-exports.is = is;
-
-function isnt(key) {
- return !this.has(key);
-}
-
-function equals(key, value) {
- return this.node[key] === value;
-}
-
-function isNodeType(type) {
- return t().isType(this.type, type);
-}
-
-function canHaveVariableDeclarationOrExpression() {
- return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
-}
-
-function canSwapBetweenExpressionAndStatement(replacement) {
- if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
- return false;
- }
-
- if (this.isExpression()) {
- return t().isBlockStatement(replacement);
- } else if (this.isBlockStatement()) {
- return t().isExpression(replacement);
- }
-
- return false;
-}
-
-function isCompletionRecord(allowInsideFunction) {
- let path = this;
- let first = true;
-
- do {
- const container = path.container;
-
- if (path.isFunction() && !first) {
- return !!allowInsideFunction;
- }
-
- first = false;
-
- if (Array.isArray(container) && path.key !== container.length - 1) {
- return false;
- }
- } while ((path = path.parentPath) && !path.isProgram());
-
- return true;
-}
-
-function isStatementOrBlock() {
- if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) {
- return false;
- } else {
- return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key);
- }
-}
-
-function referencesImport(moduleSource, importName) {
- if (!this.isReferencedIdentifier()) return false;
- const binding = this.scope.getBinding(this.node.name);
- if (!binding || binding.kind !== "module") return false;
- const path = binding.path;
- const parent = path.parentPath;
- if (!parent.isImportDeclaration()) return false;
-
- if (parent.node.source.value === moduleSource) {
- if (!importName) return true;
- } else {
- return false;
- }
-
- if (path.isImportDefaultSpecifier() && importName === "default") {
- return true;
- }
-
- if (path.isImportNamespaceSpecifier() && importName === "*") {
- return true;
- }
-
- if (path.isImportSpecifier() && path.node.imported.name === importName) {
- return true;
- }
-
- return false;
-}
-
-function getSource() {
- const node = this.node;
-
- if (node.end) {
- const code = this.hub.getCode();
- if (code) return code.slice(node.start, node.end);
- }
-
- return "";
-}
-
-function willIMaybeExecuteBefore(target) {
- return this._guessExecutionStatusRelativeTo(target) !== "after";
-}
-
-function _guessExecutionStatusRelativeTo(target) {
- const targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent();
- const selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent();
-
- if (targetFuncParent.node !== selfFuncParent.node) {
- const status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent);
-
- if (status) {
- return status;
- } else {
- target = targetFuncParent.path;
- }
- }
-
- const targetPaths = target.getAncestry();
- if (targetPaths.indexOf(this) >= 0) return "after";
- const selfPaths = this.getAncestry();
- let commonPath;
- let targetIndex;
- let selfIndex;
-
- for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) {
- const selfPath = selfPaths[selfIndex];
- targetIndex = targetPaths.indexOf(selfPath);
-
- if (targetIndex >= 0) {
- commonPath = selfPath;
- break;
- }
- }
-
- if (!commonPath) {
- return "before";
- }
-
- const targetRelationship = targetPaths[targetIndex - 1];
- const selfRelationship = selfPaths[selfIndex - 1];
-
- if (!targetRelationship || !selfRelationship) {
- return "before";
- }
-
- if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) {
- return targetRelationship.key > selfRelationship.key ? "before" : "after";
- }
-
- const keys = t().VISITOR_KEYS[commonPath.type];
- const targetKeyPosition = keys.indexOf(targetRelationship.key);
- const selfKeyPosition = keys.indexOf(selfRelationship.key);
- return targetKeyPosition > selfKeyPosition ? "before" : "after";
-}
-
-function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) {
- const targetFuncPath = targetFuncParent.path;
- if (!targetFuncPath.isFunctionDeclaration()) return;
- const binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name);
- if (!binding.references) return "before";
- const referencePaths = binding.referencePaths;
-
- for (const path of referencePaths) {
- if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
- return;
- }
- }
-
- let allStatus;
-
- for (const path of referencePaths) {
- const childOfFunction = !!path.find(path => path.node === targetFuncPath.node);
- if (childOfFunction) continue;
-
- const status = this._guessExecutionStatusRelativeTo(path);
-
- if (allStatus) {
- if (allStatus !== status) return;
- } else {
- allStatus = status;
- }
- }
-
- return allStatus;
-}
-
-function resolve(dangerous, resolved) {
- return this._resolve(dangerous, resolved) || this;
-}
-
-function _resolve(dangerous, resolved) {
- if (resolved && resolved.indexOf(this) >= 0) return;
- resolved = resolved || [];
- resolved.push(this);
-
- if (this.isVariableDeclarator()) {
- if (this.get("id").isIdentifier()) {
- return this.get("init").resolve(dangerous, resolved);
- } else {}
- } else if (this.isReferencedIdentifier()) {
- const binding = this.scope.getBinding(this.node.name);
- if (!binding) return;
- if (!binding.constant) return;
- if (binding.kind === "module") return;
-
- if (binding.path !== this) {
- const ret = binding.path.resolve(dangerous, resolved);
- if (this.find(parent => parent.node === ret.node)) return;
- return ret;
- }
- } else if (this.isTypeCastExpression()) {
- return this.get("expression").resolve(dangerous, resolved);
- } else if (dangerous && this.isMemberExpression()) {
- const targetKey = this.toComputedKey();
- if (!t().isLiteral(targetKey)) return;
- const targetName = targetKey.value;
- const target = this.get("object").resolve(dangerous, resolved);
-
- if (target.isObjectExpression()) {
- const props = target.get("properties");
-
- for (const prop of props) {
- if (!prop.isProperty()) continue;
- const key = prop.get("key");
- let match = prop.isnt("computed") && key.isIdentifier({
- name: targetName
- });
- match = match || key.isLiteral({
- value: targetName
- });
- if (match) return prop.get("value").resolve(dangerous, resolved);
- }
- } else if (target.isArrayExpression() && !isNaN(+targetName)) {
- const elems = target.get("elements");
- const elem = elems[targetName];
- if (elem) return elem.resolve(dangerous, resolved);
- }
- }
-}
-
-function isConstantExpression() {
- if (this.isIdentifier()) {
- const binding = this.scope.getBinding(this.node.name);
- if (!binding) return false;
- return binding.constant;
- }
-
- if (this.isLiteral()) {
- if (this.isRegExpLiteral()) {
- return false;
- }
-
- if (this.isTemplateLiteral()) {
- return this.get("expressions").every(expression => expression.isConstantExpression());
- }
-
- return true;
- }
-
- if (this.isUnaryExpression()) {
- if (this.get("operator").node !== "void") {
- return false;
- }
-
- return this.get("argument").isConstantExpression();
- }
-
- if (this.isBinaryExpression()) {
- return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
- }
-
- return false;
-}
-
-function isInStrictMode() {
- const start = this.isProgram() ? this : this.parentPath;
- const strictParent = start.find(path => {
- if (path.isProgram({
- sourceType: "module"
- })) return true;
- if (path.isClass()) return true;
- if (!path.isProgram() && !path.isFunction()) return false;
-
- if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
- return false;
- }
-
- let {
- node
- } = path;
- if (path.isFunction()) node = node.body;
-
- for (const directive of node.directives) {
- if (directive.value.value === "use strict") {
- return true;
- }
- }
- });
- return !!strictParent;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js
deleted file mode 100644
index 544d78827b0..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/hoister.js
+++ /dev/null
@@ -1,188 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const referenceVisitor = {
- ReferencedIdentifier(path, state) {
- if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
- return;
- }
-
- if (path.node.name === "this") {
- let scope = path.scope;
-
- do {
- if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
- break;
- }
- } while (scope = scope.parent);
-
- if (scope) state.breakOnScopePaths.push(scope.path);
- }
-
- const binding = path.scope.getBinding(path.node.name);
- if (!binding) return;
- if (binding !== state.scope.getBinding(path.node.name)) return;
- state.bindings[path.node.name] = binding;
- }
-
-};
-
-class PathHoister {
- constructor(path, scope) {
- this.breakOnScopePaths = [];
- this.bindings = {};
- this.scopes = [];
- this.scope = scope;
- this.path = path;
- this.attachAfter = false;
- }
-
- isCompatibleScope(scope) {
- for (const key of Object.keys(this.bindings)) {
- const binding = this.bindings[key];
-
- if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
- return false;
- }
- }
-
- return true;
- }
-
- getCompatibleScopes() {
- let scope = this.path.scope;
-
- do {
- if (this.isCompatibleScope(scope)) {
- this.scopes.push(scope);
- } else {
- break;
- }
-
- if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
- break;
- }
- } while (scope = scope.parent);
- }
-
- getAttachmentPath() {
- let path = this._getAttachmentPath();
-
- if (!path) return;
- let targetScope = path.scope;
-
- if (targetScope.path === path) {
- targetScope = path.scope.parent;
- }
-
- if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
- for (const name of Object.keys(this.bindings)) {
- if (!targetScope.hasOwnBinding(name)) continue;
- const binding = this.bindings[name];
-
- if (binding.kind === "param" || binding.path.parentKey === "params") {
- continue;
- }
-
- const bindingParentPath = this.getAttachmentParentForPath(binding.path);
-
- if (bindingParentPath.key >= path.key) {
- this.attachAfter = true;
- path = binding.path;
-
- for (const violationPath of binding.constantViolations) {
- if (this.getAttachmentParentForPath(violationPath).key > path.key) {
- path = violationPath;
- }
- }
- }
- }
- }
-
- return path;
- }
-
- _getAttachmentPath() {
- const scopes = this.scopes;
- const scope = scopes.pop();
- if (!scope) return;
-
- if (scope.path.isFunction()) {
- if (this.hasOwnParamBindings(scope)) {
- if (this.scope === scope) return;
- const bodies = scope.path.get("body").get("body");
-
- for (let i = 0; i < bodies.length; i++) {
- if (bodies[i].node._blockHoist) continue;
- return bodies[i];
- }
- } else {
- return this.getNextScopeAttachmentParent();
- }
- } else if (scope.path.isProgram()) {
- return this.getNextScopeAttachmentParent();
- }
- }
-
- getNextScopeAttachmentParent() {
- const scope = this.scopes.pop();
- if (scope) return this.getAttachmentParentForPath(scope.path);
- }
-
- getAttachmentParentForPath(path) {
- do {
- if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
- return path;
- }
- } while (path = path.parentPath);
- }
-
- hasOwnParamBindings(scope) {
- for (const name of Object.keys(this.bindings)) {
- if (!scope.hasOwnBinding(name)) continue;
- const binding = this.bindings[name];
- if (binding.kind === "param" && binding.constant) return true;
- }
-
- return false;
- }
-
- run() {
- this.path.traverse(referenceVisitor, this);
- this.getCompatibleScopes();
- const attachTo = this.getAttachmentPath();
- if (!attachTo) return;
- if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
- let uid = attachTo.scope.generateUidIdentifier("ref");
- const declarator = t().variableDeclarator(uid, this.path.node);
- const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
- const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t().variableDeclaration("var", [declarator])]);
- const parent = this.path.parentPath;
-
- if (parent.isJSXElement() && this.path.container === parent.node.children) {
- uid = t().JSXExpressionContainer(uid);
- }
-
- this.path.replaceWith(t().cloneNode(uid));
- return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
- }
-
-}
-
-exports.default = PathHoister; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
deleted file mode 100644
index 2ac7cf044c2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
+++ /dev/null
@@ -1,216 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0;
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const ReferencedIdentifier = {
- types: ["Identifier", "JSXIdentifier"],
-
- checkPath(path, opts) {
- const {
- node,
- parent
- } = path;
-
- if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) {
- if (t().isJSXIdentifier(node, opts)) {
- if (t().react.isCompatTag(node.name)) return false;
- } else {
- return false;
- }
- }
-
- return t().isReferenced(node, parent, path.parentPath.parent);
- }
-
-};
-exports.ReferencedIdentifier = ReferencedIdentifier;
-const ReferencedMemberExpression = {
- types: ["MemberExpression"],
-
- checkPath({
- node,
- parent
- }) {
- return t().isMemberExpression(node) && t().isReferenced(node, parent);
- }
-
-};
-exports.ReferencedMemberExpression = ReferencedMemberExpression;
-const BindingIdentifier = {
- types: ["Identifier"],
-
- checkPath(path) {
- const {
- node,
- parent
- } = path;
- const grandparent = path.parentPath.parent;
- return t().isIdentifier(node) && t().isBinding(node, parent, grandparent);
- }
-
-};
-exports.BindingIdentifier = BindingIdentifier;
-const Statement = {
- types: ["Statement"],
-
- checkPath({
- node,
- parent
- }) {
- if (t().isStatement(node)) {
- if (t().isVariableDeclaration(node)) {
- if (t().isForXStatement(parent, {
- left: node
- })) return false;
- if (t().isForStatement(parent, {
- init: node
- })) return false;
- }
-
- return true;
- } else {
- return false;
- }
- }
-
-};
-exports.Statement = Statement;
-const Expression = {
- types: ["Expression"],
-
- checkPath(path) {
- if (path.isIdentifier()) {
- return path.isReferencedIdentifier();
- } else {
- return t().isExpression(path.node);
- }
- }
-
-};
-exports.Expression = Expression;
-const Scope = {
- types: ["Scopable"],
-
- checkPath(path) {
- return t().isScope(path.node, path.parent);
- }
-
-};
-exports.Scope = Scope;
-const Referenced = {
- checkPath(path) {
- return t().isReferenced(path.node, path.parent);
- }
-
-};
-exports.Referenced = Referenced;
-const BlockScoped = {
- checkPath(path) {
- return t().isBlockScoped(path.node);
- }
-
-};
-exports.BlockScoped = BlockScoped;
-const Var = {
- types: ["VariableDeclaration"],
-
- checkPath(path) {
- return t().isVar(path.node);
- }
-
-};
-exports.Var = Var;
-const User = {
- checkPath(path) {
- return path.node && !!path.node.loc;
- }
-
-};
-exports.User = User;
-const Generated = {
- checkPath(path) {
- return !path.isUser();
- }
-
-};
-exports.Generated = Generated;
-const Pure = {
- checkPath(path, opts) {
- return path.scope.isPure(path.node, opts);
- }
-
-};
-exports.Pure = Pure;
-const Flow = {
- types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
-
- checkPath({
- node
- }) {
- if (t().isFlow(node)) {
- return true;
- } else if (t().isImportDeclaration(node)) {
- return node.importKind === "type" || node.importKind === "typeof";
- } else if (t().isExportDeclaration(node)) {
- return node.exportKind === "type";
- } else if (t().isImportSpecifier(node)) {
- return node.importKind === "type" || node.importKind === "typeof";
- } else {
- return false;
- }
- }
-
-};
-exports.Flow = Flow;
-const RestProperty = {
- types: ["RestElement"],
-
- checkPath(path) {
- return path.parentPath && path.parentPath.isObjectPattern();
- }
-
-};
-exports.RestProperty = RestProperty;
-const SpreadProperty = {
- types: ["RestElement"],
-
- checkPath(path) {
- return path.parentPath && path.parentPath.isObjectExpression();
- }
-
-};
-exports.SpreadProperty = SpreadProperty;
-const ExistentialTypeParam = {
- types: ["ExistsTypeAnnotation"]
-};
-exports.ExistentialTypeParam = ExistentialTypeParam;
-const NumericLiteralTypeAnnotation = {
- types: ["NumberLiteralTypeAnnotation"]
-};
-exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
-const ForAwaitStatement = {
- types: ["ForOfStatement"],
-
- checkPath({
- node
- }) {
- return node.await === true;
- }
-
-};
-exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/modification.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/modification.js
deleted file mode 100644
index 34cee6fb1cf..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/modification.js
+++ /dev/null
@@ -1,222 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.insertBefore = insertBefore;
-exports._containerInsert = _containerInsert;
-exports._containerInsertBefore = _containerInsertBefore;
-exports._containerInsertAfter = _containerInsertAfter;
-exports.insertAfter = insertAfter;
-exports.updateSiblingKeys = updateSiblingKeys;
-exports._verifyNodeList = _verifyNodeList;
-exports.unshiftContainer = unshiftContainer;
-exports.pushContainer = pushContainer;
-exports.hoist = hoist;
-
-var _cache = require("../cache");
-
-var _hoister = _interopRequireDefault(require("./lib/hoister"));
-
-var _index = _interopRequireDefault(require("./index"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function insertBefore(nodes) {
- this._assertUnremoved();
-
- nodes = this._verifyNodeList(nodes);
- const {
- parentPath
- } = this;
-
- if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
- return parentPath.insertBefore(nodes);
- } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
- if (this.node) nodes.push(this.node);
- return this.replaceExpressionWithStatements(nodes);
- } else if (Array.isArray(this.container)) {
- return this._containerInsertBefore(nodes);
- } else if (this.isStatementOrBlock()) {
- const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
- this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : []));
- return this.unshiftContainer("body", nodes);
- } else {
- throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
- }
-}
-
-function _containerInsert(from, nodes) {
- this.updateSiblingKeys(from, nodes.length);
- const paths = [];
- this.container.splice(from, 0, ...nodes);
-
- for (let i = 0; i < nodes.length; i++) {
- const to = from + i;
- const path = this.getSibling(to);
- paths.push(path);
-
- if (this.context && this.context.queue) {
- path.pushContext(this.context);
- }
- }
-
- const contexts = this._getQueueContexts();
-
- for (const path of paths) {
- path.setScope();
- path.debug("Inserted.");
-
- for (const context of contexts) {
- context.maybeQueue(path, true);
- }
- }
-
- return paths;
-}
-
-function _containerInsertBefore(nodes) {
- return this._containerInsert(this.key, nodes);
-}
-
-function _containerInsertAfter(nodes) {
- return this._containerInsert(this.key + 1, nodes);
-}
-
-function insertAfter(nodes) {
- this._assertUnremoved();
-
- nodes = this._verifyNodeList(nodes);
- const {
- parentPath
- } = this;
-
- if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
- return parentPath.insertAfter(nodes.map(node => {
- return t().isExpression(node) ? t().expressionStatement(node) : node;
- }));
- } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
- if (this.node) {
- let {
- scope
- } = this;
-
- if (parentPath.isMethod({
- computed: true,
- key: this.node
- })) {
- scope = scope.parent;
- }
-
- const temp = scope.generateDeclaredUidIdentifier();
- nodes.unshift(t().expressionStatement(t().assignmentExpression("=", t().cloneNode(temp), this.node)));
- nodes.push(t().expressionStatement(t().cloneNode(temp)));
- }
-
- return this.replaceExpressionWithStatements(nodes);
- } else if (Array.isArray(this.container)) {
- return this._containerInsertAfter(nodes);
- } else if (this.isStatementOrBlock()) {
- const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null);
- this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : []));
- return this.pushContainer("body", nodes);
- } else {
- throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
- }
-}
-
-function updateSiblingKeys(fromIndex, incrementBy) {
- if (!this.parent) return;
-
- const paths = _cache.path.get(this.parent);
-
- for (let i = 0; i < paths.length; i++) {
- const path = paths[i];
-
- if (path.key >= fromIndex) {
- path.key += incrementBy;
- }
- }
-}
-
-function _verifyNodeList(nodes) {
- if (!nodes) {
- return [];
- }
-
- if (nodes.constructor !== Array) {
- nodes = [nodes];
- }
-
- for (let i = 0; i < nodes.length; i++) {
- const node = nodes[i];
- let msg;
-
- if (!node) {
- msg = "has falsy node";
- } else if (typeof node !== "object") {
- msg = "contains a non-object node";
- } else if (!node.type) {
- msg = "without a type";
- } else if (node instanceof _index.default) {
- msg = "has a NodePath when it expected a raw object";
- }
-
- if (msg) {
- const type = Array.isArray(node) ? "array" : typeof node;
- throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
- }
- }
-
- return nodes;
-}
-
-function unshiftContainer(listKey, nodes) {
- this._assertUnremoved();
-
- nodes = this._verifyNodeList(nodes);
-
- const path = _index.default.get({
- parentPath: this,
- parent: this.node,
- container: this.node[listKey],
- listKey,
- key: 0
- });
-
- return path._containerInsertBefore(nodes);
-}
-
-function pushContainer(listKey, nodes) {
- this._assertUnremoved();
-
- nodes = this._verifyNodeList(nodes);
- const container = this.node[listKey];
-
- const path = _index.default.get({
- parentPath: this,
- parent: this.node,
- container: container,
- listKey,
- key: container.length
- });
-
- return path.replaceWithMultiple(nodes);
-}
-
-function hoist(scope = this.scope) {
- const hoister = new _hoister.default(this, scope);
- return hoister.run();
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/removal.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/removal.js
deleted file mode 100644
index d509a6de9a7..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/removal.js
+++ /dev/null
@@ -1,65 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.remove = remove;
-exports._removeFromScope = _removeFromScope;
-exports._callRemovalHooks = _callRemovalHooks;
-exports._remove = _remove;
-exports._markRemoved = _markRemoved;
-exports._assertUnremoved = _assertUnremoved;
-
-var _removalHooks = require("./lib/removal-hooks");
-
-function remove() {
- this._assertUnremoved();
-
- this.resync();
-
- this._removeFromScope();
-
- if (this._callRemovalHooks()) {
- this._markRemoved();
-
- return;
- }
-
- this.shareCommentsWithSiblings();
-
- this._remove();
-
- this._markRemoved();
-}
-
-function _removeFromScope() {
- const bindings = this.getBindingIdentifiers();
- Object.keys(bindings).forEach(name => this.scope.removeBinding(name));
-}
-
-function _callRemovalHooks() {
- for (const fn of _removalHooks.hooks) {
- if (fn(this, this.parentPath)) return true;
- }
-}
-
-function _remove() {
- if (Array.isArray(this.container)) {
- this.container.splice(this.key, 1);
- this.updateSiblingKeys(this.key, -1);
- } else {
- this._replaceWith(null);
- }
-}
-
-function _markRemoved() {
- this.shouldSkip = true;
- this.removed = true;
- this.node = null;
-}
-
-function _assertUnremoved() {
- if (this.removed) {
- throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js
deleted file mode 100644
index a204ca6ef81..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/path/replacement.js
+++ /dev/null
@@ -1,266 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.replaceWithMultiple = replaceWithMultiple;
-exports.replaceWithSourceString = replaceWithSourceString;
-exports.replaceWith = replaceWith;
-exports._replaceWith = _replaceWith;
-exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
-exports.replaceInline = replaceInline;
-
-function _codeFrame() {
- const data = require("@babel/code-frame");
-
- _codeFrame = function () {
- return data;
- };
-
- return data;
-}
-
-var _index = _interopRequireDefault(require("../index"));
-
-var _index2 = _interopRequireDefault(require("./index"));
-
-function _parser() {
- const data = require("@babel/parser");
-
- _parser = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const hoistVariablesVisitor = {
- Function(path) {
- path.skip();
- },
-
- VariableDeclaration(path) {
- if (path.node.kind !== "var") return;
- const bindings = path.getBindingIdentifiers();
-
- for (const key of Object.keys(bindings)) {
- path.scope.push({
- id: bindings[key]
- });
- }
-
- const exprs = [];
-
- for (const declar of path.node.declarations) {
- if (declar.init) {
- exprs.push(t().expressionStatement(t().assignmentExpression("=", declar.id, declar.init)));
- }
- }
-
- path.replaceWithMultiple(exprs);
- }
-
-};
-
-function replaceWithMultiple(nodes) {
- this.resync();
- nodes = this._verifyNodeList(nodes);
- t().inheritLeadingComments(nodes[0], this.node);
- t().inheritTrailingComments(nodes[nodes.length - 1], this.node);
- this.node = this.container[this.key] = null;
- const paths = this.insertAfter(nodes);
-
- if (this.node) {
- this.requeue();
- } else {
- this.remove();
- }
-
- return paths;
-}
-
-function replaceWithSourceString(replacement) {
- this.resync();
-
- try {
- replacement = `(${replacement})`;
- replacement = (0, _parser().parse)(replacement);
- } catch (err) {
- const loc = err.loc;
-
- if (loc) {
- err.message += " - make sure this is an expression.\n" + (0, _codeFrame().codeFrameColumns)(replacement, {
- start: {
- line: loc.line,
- column: loc.column + 1
- }
- });
- err.code = "BABEL_REPLACE_SOURCE_ERROR";
- }
-
- throw err;
- }
-
- replacement = replacement.program.body[0].expression;
-
- _index.default.removeProperties(replacement);
-
- return this.replaceWith(replacement);
-}
-
-function replaceWith(replacement) {
- this.resync();
-
- if (this.removed) {
- throw new Error("You can't replace this node, we've already removed it");
- }
-
- if (replacement instanceof _index2.default) {
- replacement = replacement.node;
- }
-
- if (!replacement) {
- throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
- }
-
- if (this.node === replacement) {
- return [this];
- }
-
- if (this.isProgram() && !t().isProgram(replacement)) {
- throw new Error("You can only replace a Program root node with another Program node");
- }
-
- if (Array.isArray(replacement)) {
- throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
- }
-
- if (typeof replacement === "string") {
- throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
- }
-
- let nodePath = "";
-
- if (this.isNodeType("Statement") && t().isExpression(replacement)) {
- if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
- replacement = t().expressionStatement(replacement);
- nodePath = "expression";
- }
- }
-
- if (this.isNodeType("Expression") && t().isStatement(replacement)) {
- if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
- return this.replaceExpressionWithStatements([replacement]);
- }
- }
-
- const oldNode = this.node;
-
- if (oldNode) {
- t().inheritsComments(replacement, oldNode);
- t().removeComments(oldNode);
- }
-
- this._replaceWith(replacement);
-
- this.type = replacement.type;
- this.setScope();
- this.requeue();
- return [nodePath ? this.get(nodePath) : this];
-}
-
-function _replaceWith(node) {
- if (!this.container) {
- throw new ReferenceError("Container is falsy");
- }
-
- if (this.inList) {
- t().validate(this.parent, this.key, [node]);
- } else {
- t().validate(this.parent, this.key, node);
- }
-
- this.debug(`Replace with ${node && node.type}`);
- this.node = this.container[this.key] = node;
-}
-
-function replaceExpressionWithStatements(nodes) {
- this.resync();
- const toSequenceExpression = t().toSequenceExpression(nodes, this.scope);
-
- if (toSequenceExpression) {
- return this.replaceWith(toSequenceExpression)[0].get("expressions");
- }
-
- const functionParent = this.getFunctionParent();
- const isParentAsync = functionParent && functionParent.is("async");
- const container = t().arrowFunctionExpression([], t().blockStatement(nodes));
- this.replaceWith(t().callExpression(container, []));
- this.traverse(hoistVariablesVisitor);
- const completionRecords = this.get("callee").getCompletionRecords();
-
- for (const path of completionRecords) {
- if (!path.isExpressionStatement()) continue;
- const loop = path.findParent(path => path.isLoop());
-
- if (loop) {
- let uid = loop.getData("expressionReplacementReturnUid");
-
- if (!uid) {
- const callee = this.get("callee");
- uid = callee.scope.generateDeclaredUidIdentifier("ret");
- callee.get("body").pushContainer("body", t().returnStatement(t().cloneNode(uid)));
- loop.setData("expressionReplacementReturnUid", uid);
- } else {
- uid = t().identifier(uid.name);
- }
-
- path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression));
- } else {
- path.replaceWith(t().returnStatement(path.node.expression));
- }
- }
-
- const callee = this.get("callee");
- callee.arrowFunctionToExpression();
-
- if (isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t().FUNCTION_TYPES)) {
- callee.set("async", true);
- this.replaceWith(t().awaitExpression(this.node));
- }
-
- return callee.get("body.body");
-}
-
-function replaceInline(nodes) {
- this.resync();
-
- if (Array.isArray(nodes)) {
- if (Array.isArray(this.container)) {
- nodes = this._verifyNodeList(nodes);
-
- const paths = this._containerInsertAfter(nodes);
-
- this.remove();
- return paths;
- } else {
- return this.replaceWithMultiple(nodes);
- }
- } else {
- return this.replaceWith(nodes);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/binding.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/binding.js
deleted file mode 100644
index d19f1168d77..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/binding.js
+++ /dev/null
@@ -1,71 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-class Binding {
- constructor({
- identifier,
- scope,
- path,
- kind
- }) {
- this.identifier = identifier;
- this.scope = scope;
- this.path = path;
- this.kind = kind;
- this.constantViolations = [];
- this.constant = true;
- this.referencePaths = [];
- this.referenced = false;
- this.references = 0;
- this.clearValue();
- }
-
- deoptValue() {
- this.clearValue();
- this.hasDeoptedValue = true;
- }
-
- setValue(value) {
- if (this.hasDeoptedValue) return;
- this.hasValue = true;
- this.value = value;
- }
-
- clearValue() {
- this.hasDeoptedValue = false;
- this.hasValue = false;
- this.value = null;
- }
-
- reassign(path) {
- this.constant = false;
-
- if (this.constantViolations.indexOf(path) !== -1) {
- return;
- }
-
- this.constantViolations.push(path);
- }
-
- reference(path) {
- if (this.referencePaths.indexOf(path) !== -1) {
- return;
- }
-
- this.referenced = true;
- this.references++;
- this.referencePaths.push(path);
- }
-
- dereference() {
- this.references--;
- this.referenced = !!this.references;
- }
-
-}
-
-exports.default = Binding; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js
deleted file mode 100644
index b27f22678a4..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/index.js
+++ /dev/null
@@ -1,892 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-function _includes() {
- const data = _interopRequireDefault(require("lodash/includes"));
-
- _includes = function () {
- return data;
- };
-
- return data;
-}
-
-function _repeat() {
- const data = _interopRequireDefault(require("lodash/repeat"));
-
- _repeat = function () {
- return data;
- };
-
- return data;
-}
-
-var _renamer = _interopRequireDefault(require("./lib/renamer"));
-
-var _index = _interopRequireDefault(require("../index"));
-
-function _defaults() {
- const data = _interopRequireDefault(require("lodash/defaults"));
-
- _defaults = function () {
- return data;
- };
-
- return data;
-}
-
-var _binding = _interopRequireDefault(require("./binding"));
-
-function _globals() {
- const data = _interopRequireDefault(require("globals"));
-
- _globals = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-var _cache = require("../cache");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function gatherNodeParts(node, parts) {
- if (t().isModuleDeclaration(node)) {
- if (node.source) {
- gatherNodeParts(node.source, parts);
- } else if (node.specifiers && node.specifiers.length) {
- for (const specifier of node.specifiers) {
- gatherNodeParts(specifier, parts);
- }
- } else if (node.declaration) {
- gatherNodeParts(node.declaration, parts);
- }
- } else if (t().isModuleSpecifier(node)) {
- gatherNodeParts(node.local, parts);
- } else if (t().isMemberExpression(node)) {
- gatherNodeParts(node.object, parts);
- gatherNodeParts(node.property, parts);
- } else if (t().isIdentifier(node)) {
- parts.push(node.name);
- } else if (t().isLiteral(node)) {
- parts.push(node.value);
- } else if (t().isCallExpression(node)) {
- gatherNodeParts(node.callee, parts);
- } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) {
- for (const prop of node.properties) {
- gatherNodeParts(prop.key || prop.argument, parts);
- }
- } else if (t().isPrivateName(node)) {
- gatherNodeParts(node.id, parts);
- } else if (t().isThisExpression(node)) {
- parts.push("this");
- } else if (t().isSuper(node)) {
- parts.push("super");
- }
-}
-
-const collectorVisitor = {
- For(path) {
- for (const key of t().FOR_INIT_KEYS) {
- const declar = path.get(key);
-
- if (declar.isVar()) {
- const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
- parentScope.registerBinding("var", declar);
- }
- }
- },
-
- Declaration(path) {
- if (path.isBlockScoped()) return;
-
- if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) {
- return;
- }
-
- const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
- parent.registerDeclaration(path);
- },
-
- ReferencedIdentifier(path, state) {
- state.references.push(path);
- },
-
- ForXStatement(path, state) {
- const left = path.get("left");
-
- if (left.isPattern() || left.isIdentifier()) {
- state.constantViolations.push(path);
- }
- },
-
- ExportDeclaration: {
- exit(path) {
- const {
- node,
- scope
- } = path;
- const declar = node.declaration;
-
- if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) {
- const id = declar.id;
- if (!id) return;
- const binding = scope.getBinding(id.name);
- if (binding) binding.reference(path);
- } else if (t().isVariableDeclaration(declar)) {
- for (const decl of declar.declarations) {
- for (const name of Object.keys(t().getBindingIdentifiers(decl))) {
- const binding = scope.getBinding(name);
- if (binding) binding.reference(path);
- }
- }
- }
- }
-
- },
-
- LabeledStatement(path) {
- path.scope.getProgramParent().addGlobal(path.node);
- path.scope.getBlockParent().registerDeclaration(path);
- },
-
- AssignmentExpression(path, state) {
- state.assignments.push(path);
- },
-
- UpdateExpression(path, state) {
- state.constantViolations.push(path);
- },
-
- UnaryExpression(path, state) {
- if (path.node.operator === "delete") {
- state.constantViolations.push(path);
- }
- },
-
- BlockScoped(path) {
- let scope = path.scope;
- if (scope.path === path) scope = scope.parent;
- scope.getBlockParent().registerDeclaration(path);
- },
-
- ClassDeclaration(path) {
- const id = path.node.id;
- if (!id) return;
- const name = id.name;
- path.scope.bindings[name] = path.scope.getBinding(name);
- },
-
- Block(path) {
- const paths = path.get("body");
-
- for (const bodyPath of paths) {
- if (bodyPath.isFunctionDeclaration()) {
- path.scope.getBlockParent().registerDeclaration(bodyPath);
- }
- }
- }
-
-};
-let uid = 0;
-
-class Scope {
- constructor(path) {
- const {
- node
- } = path;
-
- const cached = _cache.scope.get(node);
-
- if (cached && cached.path === path) {
- return cached;
- }
-
- _cache.scope.set(node, this);
-
- this.uid = uid++;
- this.block = node;
- this.path = path;
- this.labels = new Map();
- }
-
- get parent() {
- const parent = this.path.findParent(p => p.isScope());
- return parent && parent.scope;
- }
-
- get parentBlock() {
- return this.path.parent;
- }
-
- get hub() {
- return this.path.hub;
- }
-
- traverse(node, opts, state) {
- (0, _index.default)(node, opts, this, state, this.path);
- }
-
- generateDeclaredUidIdentifier(name) {
- const id = this.generateUidIdentifier(name);
- this.push({
- id
- });
- return t().cloneNode(id);
- }
-
- generateUidIdentifier(name) {
- return t().identifier(this.generateUid(name));
- }
-
- generateUid(name = "temp") {
- name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
- let uid;
- let i = 0;
-
- do {
- uid = this._generateUid(name, i);
- i++;
- } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
-
- const program = this.getProgramParent();
- program.references[uid] = true;
- program.uids[uid] = true;
- return uid;
- }
-
- _generateUid(name, i) {
- let id = name;
- if (i > 1) id += i;
- return `_${id}`;
- }
-
- generateUidBasedOnNode(parent, defaultName) {
- let node = parent;
-
- if (t().isAssignmentExpression(parent)) {
- node = parent.left;
- } else if (t().isVariableDeclarator(parent)) {
- node = parent.id;
- } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) {
- node = node.key;
- }
-
- const parts = [];
- gatherNodeParts(node, parts);
- let id = parts.join("$");
- id = id.replace(/^_/, "") || defaultName || "ref";
- return this.generateUid(id.slice(0, 20));
- }
-
- generateUidIdentifierBasedOnNode(parent, defaultName) {
- return t().identifier(this.generateUidBasedOnNode(parent, defaultName));
- }
-
- isStatic(node) {
- if (t().isThisExpression(node) || t().isSuper(node)) {
- return true;
- }
-
- if (t().isIdentifier(node)) {
- const binding = this.getBinding(node.name);
-
- if (binding) {
- return binding.constant;
- } else {
- return this.hasBinding(node.name);
- }
- }
-
- return false;
- }
-
- maybeGenerateMemoised(node, dontPush) {
- if (this.isStatic(node)) {
- return null;
- } else {
- const id = this.generateUidIdentifierBasedOnNode(node);
-
- if (!dontPush) {
- this.push({
- id
- });
- return t().cloneNode(id);
- }
-
- return id;
- }
- }
-
- checkBlockScopedCollisions(local, kind, name, id) {
- if (kind === "param") return;
- if (local.kind === "local") return;
- const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
-
- if (duplicate) {
- throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError);
- }
- }
-
- rename(oldName, newName, block) {
- const binding = this.getBinding(oldName);
-
- if (binding) {
- newName = newName || this.generateUidIdentifier(oldName).name;
- return new _renamer.default(binding, oldName, newName).rename(block);
- }
- }
-
- _renameFromMap(map, oldName, newName, value) {
- if (map[oldName]) {
- map[newName] = value;
- map[oldName] = null;
- }
- }
-
- dump() {
- const sep = (0, _repeat().default)("-", 60);
- console.log(sep);
- let scope = this;
-
- do {
- console.log("#", scope.block.type);
-
- for (const name of Object.keys(scope.bindings)) {
- const binding = scope.bindings[name];
- console.log(" -", name, {
- constant: binding.constant,
- references: binding.references,
- violations: binding.constantViolations.length,
- kind: binding.kind
- });
- }
- } while (scope = scope.parent);
-
- console.log(sep);
- }
-
- toArray(node, i) {
- if (t().isIdentifier(node)) {
- const binding = this.getBinding(node.name);
-
- if (binding && binding.constant && binding.path.isGenericType("Array")) {
- return node;
- }
- }
-
- if (t().isArrayExpression(node)) {
- return node;
- }
-
- if (t().isIdentifier(node, {
- name: "arguments"
- })) {
- return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]);
- }
-
- let helperName;
- const args = [node];
-
- if (i === true) {
- helperName = "toConsumableArray";
- } else if (i) {
- args.push(t().numericLiteral(i));
- helperName = "slicedToArray";
- } else {
- helperName = "toArray";
- }
-
- return t().callExpression(this.hub.addHelper(helperName), args);
- }
-
- hasLabel(name) {
- return !!this.getLabel(name);
- }
-
- getLabel(name) {
- return this.labels.get(name);
- }
-
- registerLabel(path) {
- this.labels.set(path.node.label.name, path);
- }
-
- registerDeclaration(path) {
- if (path.isLabeledStatement()) {
- this.registerLabel(path);
- } else if (path.isFunctionDeclaration()) {
- this.registerBinding("hoisted", path.get("id"), path);
- } else if (path.isVariableDeclaration()) {
- const declarations = path.get("declarations");
-
- for (const declar of declarations) {
- this.registerBinding(path.node.kind, declar);
- }
- } else if (path.isClassDeclaration()) {
- this.registerBinding("let", path);
- } else if (path.isImportDeclaration()) {
- const specifiers = path.get("specifiers");
-
- for (const specifier of specifiers) {
- this.registerBinding("module", specifier);
- }
- } else if (path.isExportDeclaration()) {
- const declar = path.get("declaration");
-
- if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
- this.registerDeclaration(declar);
- }
- } else {
- this.registerBinding("unknown", path);
- }
- }
-
- buildUndefinedNode() {
- if (this.hasBinding("undefined")) {
- return t().unaryExpression("void", t().numericLiteral(0), true);
- } else {
- return t().identifier("undefined");
- }
- }
-
- registerConstantViolation(path) {
- const ids = path.getBindingIdentifiers();
-
- for (const name of Object.keys(ids)) {
- const binding = this.getBinding(name);
- if (binding) binding.reassign(path);
- }
- }
-
- registerBinding(kind, path, bindingPath = path) {
- if (!kind) throw new ReferenceError("no `kind`");
-
- if (path.isVariableDeclaration()) {
- const declarators = path.get("declarations");
-
- for (const declar of declarators) {
- this.registerBinding(kind, declar);
- }
-
- return;
- }
-
- const parent = this.getProgramParent();
- const ids = path.getOuterBindingIdentifiers(true);
-
- for (const name of Object.keys(ids)) {
- for (const id of ids[name]) {
- const local = this.getOwnBinding(name);
-
- if (local) {
- if (local.identifier === id) continue;
- this.checkBlockScopedCollisions(local, kind, name, id);
- }
-
- parent.references[name] = true;
-
- if (local) {
- this.registerConstantViolation(bindingPath);
- } else {
- this.bindings[name] = new _binding.default({
- identifier: id,
- scope: this,
- path: bindingPath,
- kind: kind
- });
- }
- }
- }
- }
-
- addGlobal(node) {
- this.globals[node.name] = node;
- }
-
- hasUid(name) {
- let scope = this;
-
- do {
- if (scope.uids[name]) return true;
- } while (scope = scope.parent);
-
- return false;
- }
-
- hasGlobal(name) {
- let scope = this;
-
- do {
- if (scope.globals[name]) return true;
- } while (scope = scope.parent);
-
- return false;
- }
-
- hasReference(name) {
- let scope = this;
-
- do {
- if (scope.references[name]) return true;
- } while (scope = scope.parent);
-
- return false;
- }
-
- isPure(node, constantsOnly) {
- if (t().isIdentifier(node)) {
- const binding = this.getBinding(node.name);
- if (!binding) return false;
- if (constantsOnly) return binding.constant;
- return true;
- } else if (t().isClass(node)) {
- if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
- return false;
- }
-
- return this.isPure(node.body, constantsOnly);
- } else if (t().isClassBody(node)) {
- for (const method of node.body) {
- if (!this.isPure(method, constantsOnly)) return false;
- }
-
- return true;
- } else if (t().isBinary(node)) {
- return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
- } else if (t().isArrayExpression(node)) {
- for (const elem of node.elements) {
- if (!this.isPure(elem, constantsOnly)) return false;
- }
-
- return true;
- } else if (t().isObjectExpression(node)) {
- for (const prop of node.properties) {
- if (!this.isPure(prop, constantsOnly)) return false;
- }
-
- return true;
- } else if (t().isClassMethod(node)) {
- if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
- if (node.kind === "get" || node.kind === "set") return false;
- return true;
- } else if (t().isProperty(node)) {
- if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
- return this.isPure(node.value, constantsOnly);
- } else if (t().isUnaryExpression(node)) {
- return this.isPure(node.argument, constantsOnly);
- } else if (t().isTaggedTemplateExpression(node)) {
- return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
- } else if (t().isTemplateLiteral(node)) {
- for (const expression of node.expressions) {
- if (!this.isPure(expression, constantsOnly)) return false;
- }
-
- return true;
- } else {
- return t().isPureish(node);
- }
- }
-
- setData(key, val) {
- return this.data[key] = val;
- }
-
- getData(key) {
- let scope = this;
-
- do {
- const data = scope.data[key];
- if (data != null) return data;
- } while (scope = scope.parent);
- }
-
- removeData(key) {
- let scope = this;
-
- do {
- const data = scope.data[key];
- if (data != null) scope.data[key] = null;
- } while (scope = scope.parent);
- }
-
- init() {
- if (!this.references) this.crawl();
- }
-
- crawl() {
- const path = this.path;
- this.references = Object.create(null);
- this.bindings = Object.create(null);
- this.globals = Object.create(null);
- this.uids = Object.create(null);
- this.data = Object.create(null);
-
- if (path.isLoop()) {
- for (const key of t().FOR_INIT_KEYS) {
- const node = path.get(key);
- if (node.isBlockScoped()) this.registerBinding(node.node.kind, node);
- }
- }
-
- if (path.isFunctionExpression() && path.has("id")) {
- if (!path.get("id").node[t().NOT_LOCAL_BINDING]) {
- this.registerBinding("local", path.get("id"), path);
- }
- }
-
- if (path.isClassExpression() && path.has("id")) {
- if (!path.get("id").node[t().NOT_LOCAL_BINDING]) {
- this.registerBinding("local", path);
- }
- }
-
- if (path.isFunction()) {
- const params = path.get("params");
-
- for (const param of params) {
- this.registerBinding("param", param);
- }
- }
-
- if (path.isCatchClause()) {
- this.registerBinding("let", path);
- }
-
- const parent = this.getProgramParent();
- if (parent.crawling) return;
- const state = {
- references: [],
- constantViolations: [],
- assignments: []
- };
- this.crawling = true;
- path.traverse(collectorVisitor, state);
- this.crawling = false;
-
- for (const path of state.assignments) {
- const ids = path.getBindingIdentifiers();
- let programParent;
-
- for (const name of Object.keys(ids)) {
- if (path.scope.getBinding(name)) continue;
- programParent = programParent || path.scope.getProgramParent();
- programParent.addGlobal(ids[name]);
- }
-
- path.scope.registerConstantViolation(path);
- }
-
- for (const ref of state.references) {
- const binding = ref.scope.getBinding(ref.node.name);
-
- if (binding) {
- binding.reference(ref);
- } else {
- ref.scope.getProgramParent().addGlobal(ref.node);
- }
- }
-
- for (const path of state.constantViolations) {
- path.scope.registerConstantViolation(path);
- }
- }
-
- push(opts) {
- let path = this.path;
-
- if (!path.isBlockStatement() && !path.isProgram()) {
- path = this.getBlockParent().path;
- }
-
- if (path.isSwitchStatement()) {
- path = (this.getFunctionParent() || this.getProgramParent()).path;
- }
-
- if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
- path.ensureBlock();
- path = path.get("body");
- }
-
- const unique = opts.unique;
- const kind = opts.kind || "var";
- const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
- const dataKey = `declaration:${kind}:${blockHoist}`;
- let declarPath = !unique && path.getData(dataKey);
-
- if (!declarPath) {
- const declar = t().variableDeclaration(kind, []);
- declar._blockHoist = blockHoist;
- [declarPath] = path.unshiftContainer("body", [declar]);
- if (!unique) path.setData(dataKey, declarPath);
- }
-
- const declarator = t().variableDeclarator(opts.id, opts.init);
- declarPath.node.declarations.push(declarator);
- this.registerBinding(kind, declarPath.get("declarations").pop());
- }
-
- getProgramParent() {
- let scope = this;
-
- do {
- if (scope.path.isProgram()) {
- return scope;
- }
- } while (scope = scope.parent);
-
- throw new Error("Couldn't find a Program");
- }
-
- getFunctionParent() {
- let scope = this;
-
- do {
- if (scope.path.isFunctionParent()) {
- return scope;
- }
- } while (scope = scope.parent);
-
- return null;
- }
-
- getBlockParent() {
- let scope = this;
-
- do {
- if (scope.path.isBlockParent()) {
- return scope;
- }
- } while (scope = scope.parent);
-
- throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
- }
-
- getAllBindings() {
- const ids = Object.create(null);
- let scope = this;
-
- do {
- (0, _defaults().default)(ids, scope.bindings);
- scope = scope.parent;
- } while (scope);
-
- return ids;
- }
-
- getAllBindingsOfKind() {
- const ids = Object.create(null);
-
- for (const kind of arguments) {
- let scope = this;
-
- do {
- for (const name of Object.keys(scope.bindings)) {
- const binding = scope.bindings[name];
- if (binding.kind === kind) ids[name] = binding;
- }
-
- scope = scope.parent;
- } while (scope);
- }
-
- return ids;
- }
-
- bindingIdentifierEquals(name, node) {
- return this.getBindingIdentifier(name) === node;
- }
-
- getBinding(name) {
- let scope = this;
-
- do {
- const binding = scope.getOwnBinding(name);
- if (binding) return binding;
- } while (scope = scope.parent);
- }
-
- getOwnBinding(name) {
- return this.bindings[name];
- }
-
- getBindingIdentifier(name) {
- const info = this.getBinding(name);
- return info && info.identifier;
- }
-
- getOwnBindingIdentifier(name) {
- const binding = this.bindings[name];
- return binding && binding.identifier;
- }
-
- hasOwnBinding(name) {
- return !!this.getOwnBinding(name);
- }
-
- hasBinding(name, noGlobals) {
- if (!name) return false;
- if (this.hasOwnBinding(name)) return true;
- if (this.parentHasBinding(name, noGlobals)) return true;
- if (this.hasUid(name)) return true;
- if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true;
- if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true;
- return false;
- }
-
- parentHasBinding(name, noGlobals) {
- return this.parent && this.parent.hasBinding(name, noGlobals);
- }
-
- moveBindingTo(name, scope) {
- const info = this.getBinding(name);
-
- if (info) {
- info.scope.removeOwnBinding(name);
- info.scope = scope;
- scope.bindings[name] = info;
- }
- }
-
- removeOwnBinding(name) {
- delete this.bindings[name];
- }
-
- removeBinding(name) {
- const info = this.getBinding(name);
-
- if (info) {
- info.scope.removeOwnBinding(name);
- }
-
- let scope = this;
-
- do {
- if (scope.uids[name]) {
- scope.uids[name] = false;
- }
- } while (scope = scope.parent);
- }
-
-}
-
-exports.default = Scope;
-Scope.globals = Object.keys(_globals().default.builtin);
-Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js
deleted file mode 100644
index b7a10ec69c8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/scope/lib/renamer.js
+++ /dev/null
@@ -1,138 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-
-var _binding = _interopRequireDefault(require("../binding"));
-
-function _helperSplitExportDeclaration() {
- const data = _interopRequireDefault(require("@babel/helper-split-export-declaration"));
-
- _helperSplitExportDeclaration = function () {
- return data;
- };
-
- return data;
-}
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const renameVisitor = {
- ReferencedIdentifier({
- node
- }, state) {
- if (node.name === state.oldName) {
- node.name = state.newName;
- }
- },
-
- Scope(path, state) {
- if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
- path.skip();
- }
- },
-
- "AssignmentExpression|Declaration"(path, state) {
- const ids = path.getOuterBindingIdentifiers();
-
- for (const name in ids) {
- if (name === state.oldName) ids[name].name = state.newName;
- }
- }
-
-};
-
-class Renamer {
- constructor(binding, oldName, newName) {
- this.newName = newName;
- this.oldName = oldName;
- this.binding = binding;
- }
-
- maybeConvertFromExportDeclaration(parentDeclar) {
- const maybeExportDeclar = parentDeclar.parentPath;
-
- if (!maybeExportDeclar.isExportDeclaration()) {
- return;
- }
-
- if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
- return;
- }
-
- (0, _helperSplitExportDeclaration().default)(maybeExportDeclar);
- }
-
- maybeConvertFromClassFunctionDeclaration(path) {
- return;
- if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
- if (this.binding.kind !== "hoisted") return;
- path.node.id = t().identifier(this.oldName);
- path.node._blockHoist = 3;
- path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))]));
- }
-
- maybeConvertFromClassFunctionExpression(path) {
- return;
- if (!path.isFunctionExpression() && !path.isClassExpression()) return;
- if (this.binding.kind !== "local") return;
- path.node.id = t().identifier(this.oldName);
- this.binding.scope.parent.push({
- id: t().identifier(this.newName)
- });
- path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node));
- }
-
- rename(block) {
- const {
- binding,
- oldName,
- newName
- } = this;
- const {
- scope,
- path
- } = binding;
- const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression());
-
- if (parentDeclar) {
- const bindingIds = parentDeclar.getOuterBindingIdentifiers();
-
- if (bindingIds[oldName] === binding.identifier) {
- this.maybeConvertFromExportDeclaration(parentDeclar);
- }
- }
-
- scope.traverse(block || scope.block, renameVisitor, this);
-
- if (!block) {
- scope.removeOwnBinding(oldName);
- scope.bindings[newName] = binding;
- this.binding.identifier.name = newName;
- }
-
- if (binding.type === "hoisted") {}
-
- if (parentDeclar) {
- this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
- this.maybeConvertFromClassFunctionExpression(parentDeclar);
- }
- }
-
-}
-
-exports.default = Renamer; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/visitors.js b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/visitors.js
deleted file mode 100644
index 7483fe17353..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/lib/visitors.js
+++ /dev/null
@@ -1,254 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.explode = explode;
-exports.verify = verify;
-exports.merge = merge;
-
-var virtualTypes = _interopRequireWildcard(require("./path/lib/virtual-types"));
-
-function t() {
- const data = _interopRequireWildcard(require("@babel/types"));
-
- t = function () {
- return data;
- };
-
- return data;
-}
-
-function _clone() {
- const data = _interopRequireDefault(require("lodash/clone"));
-
- _clone = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function explode(visitor) {
- if (visitor._exploded) return visitor;
- visitor._exploded = true;
-
- for (const nodeType of Object.keys(visitor)) {
- if (shouldIgnoreKey(nodeType)) continue;
- const parts = nodeType.split("|");
- if (parts.length === 1) continue;
- const fns = visitor[nodeType];
- delete visitor[nodeType];
-
- for (const part of parts) {
- visitor[part] = fns;
- }
- }
-
- verify(visitor);
- delete visitor.__esModule;
- ensureEntranceObjects(visitor);
- ensureCallbackArrays(visitor);
-
- for (const nodeType of Object.keys(visitor)) {
- if (shouldIgnoreKey(nodeType)) continue;
- const wrapper = virtualTypes[nodeType];
- if (!wrapper) continue;
- const fns = visitor[nodeType];
-
- for (const type of Object.keys(fns)) {
- fns[type] = wrapCheck(wrapper, fns[type]);
- }
-
- delete visitor[nodeType];
-
- if (wrapper.types) {
- for (const type of wrapper.types) {
- if (visitor[type]) {
- mergePair(visitor[type], fns);
- } else {
- visitor[type] = fns;
- }
- }
- } else {
- mergePair(visitor, fns);
- }
- }
-
- for (const nodeType of Object.keys(visitor)) {
- if (shouldIgnoreKey(nodeType)) continue;
- const fns = visitor[nodeType];
- let aliases = t().FLIPPED_ALIAS_KEYS[nodeType];
- const deprecratedKey = t().DEPRECATED_KEYS[nodeType];
-
- if (deprecratedKey) {
- console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecratedKey}`);
- aliases = [deprecratedKey];
- }
-
- if (!aliases) continue;
- delete visitor[nodeType];
-
- for (const alias of aliases) {
- const existing = visitor[alias];
-
- if (existing) {
- mergePair(existing, fns);
- } else {
- visitor[alias] = (0, _clone().default)(fns);
- }
- }
- }
-
- for (const nodeType of Object.keys(visitor)) {
- if (shouldIgnoreKey(nodeType)) continue;
- ensureCallbackArrays(visitor[nodeType]);
- }
-
- return visitor;
-}
-
-function verify(visitor) {
- if (visitor._verified) return;
-
- if (typeof visitor === "function") {
- throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
- }
-
- for (const nodeType of Object.keys(visitor)) {
- if (nodeType === "enter" || nodeType === "exit") {
- validateVisitorMethods(nodeType, visitor[nodeType]);
- }
-
- if (shouldIgnoreKey(nodeType)) continue;
-
- if (t().TYPES.indexOf(nodeType) < 0) {
- throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
- }
-
- const visitors = visitor[nodeType];
-
- if (typeof visitors === "object") {
- for (const visitorKey of Object.keys(visitors)) {
- if (visitorKey === "enter" || visitorKey === "exit") {
- validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
- } else {
- throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`);
- }
- }
- }
- }
-
- visitor._verified = true;
-}
-
-function validateVisitorMethods(path, val) {
- const fns = [].concat(val);
-
- for (const fn of fns) {
- if (typeof fn !== "function") {
- throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
- }
- }
-}
-
-function merge(visitors, states = [], wrapper) {
- const rootVisitor = {};
-
- for (let i = 0; i < visitors.length; i++) {
- const visitor = visitors[i];
- const state = states[i];
- explode(visitor);
-
- for (const type of Object.keys(visitor)) {
- let visitorType = visitor[type];
-
- if (state || wrapper) {
- visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
- }
-
- const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
- mergePair(nodeVisitor, visitorType);
- }
- }
-
- return rootVisitor;
-}
-
-function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
- const newVisitor = {};
-
- for (const key of Object.keys(oldVisitor)) {
- let fns = oldVisitor[key];
- if (!Array.isArray(fns)) continue;
- fns = fns.map(function (fn) {
- let newFn = fn;
-
- if (state) {
- newFn = function (path) {
- return fn.call(state, path, state);
- };
- }
-
- if (wrapper) {
- newFn = wrapper(state.key, key, newFn);
- }
-
- return newFn;
- });
- newVisitor[key] = fns;
- }
-
- return newVisitor;
-}
-
-function ensureEntranceObjects(obj) {
- for (const key of Object.keys(obj)) {
- if (shouldIgnoreKey(key)) continue;
- const fns = obj[key];
-
- if (typeof fns === "function") {
- obj[key] = {
- enter: fns
- };
- }
- }
-}
-
-function ensureCallbackArrays(obj) {
- if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
- if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
-}
-
-function wrapCheck(wrapper, fn) {
- const newFn = function (path) {
- if (wrapper.checkPath(path)) {
- return fn.apply(this, arguments);
- }
- };
-
- newFn.toString = () => fn.toString();
-
- return newFn;
-}
-
-function shouldIgnoreKey(key) {
- if (key[0] === "_") return true;
- if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
-
- if (key === "blacklist" || key === "noScope" || key === "skipKeys") {
- return true;
- }
-
- return false;
-}
-
-function mergePair(dest, src) {
- for (const key of Object.keys(src)) {
- dest[key] = [].concat(dest[key] || [], src[key]);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json
deleted file mode 100644
index f53af95bf56..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/traverse/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/code-frame": "^7.5.5",
- "@babel/generator": "^7.5.5",
- "@babel/helper-function-name": "^7.1.0",
- "@babel/helper-split-export-declaration": "^7.4.4",
- "@babel/parser": "^7.5.5",
- "@babel/types": "^7.5.5",
- "debug": "^4.1.0",
- "globals": "^11.1.0",
- "lodash": "^4.17.13"
- },
- "deprecated": false,
- "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
- "devDependencies": {
- "@babel/helper-plugin-test-runner": "^7.0.0"
- },
- "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/traverse",
- "publishConfig": {
- "access": "public"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse"
- },
- "version": "7.5.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md b/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md
deleted file mode 100644
index 8d33374d3ba..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# @babel/types
-
-> Babel Types is a Lodash-esque utility library for AST nodes
-
-See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package.
-
-## Install
-
-Using npm:
-
-```sh
-npm install --save-dev @babel/types
-```
-
-or using yarn:
-
-```sh
-yarn add @babel/types --dev
-```
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/assertNode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/assertNode.js
deleted file mode 100644
index 194ec716814..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/assertNode.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = assertNode;
-
-var _isNode = _interopRequireDefault(require("../validators/isNode"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function assertNode(node) {
- if (!(0, _isNode.default)(node)) {
- const type = node && node.type || JSON.stringify(node);
- throw new TypeError(`Not a valid node of type "${type}"`);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js
deleted file mode 100644
index a9f59b08ad8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/asserts/generated/index.js
+++ /dev/null
@@ -1,1364 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.assertArrayExpression = assertArrayExpression;
-exports.assertAssignmentExpression = assertAssignmentExpression;
-exports.assertBinaryExpression = assertBinaryExpression;
-exports.assertInterpreterDirective = assertInterpreterDirective;
-exports.assertDirective = assertDirective;
-exports.assertDirectiveLiteral = assertDirectiveLiteral;
-exports.assertBlockStatement = assertBlockStatement;
-exports.assertBreakStatement = assertBreakStatement;
-exports.assertCallExpression = assertCallExpression;
-exports.assertCatchClause = assertCatchClause;
-exports.assertConditionalExpression = assertConditionalExpression;
-exports.assertContinueStatement = assertContinueStatement;
-exports.assertDebuggerStatement = assertDebuggerStatement;
-exports.assertDoWhileStatement = assertDoWhileStatement;
-exports.assertEmptyStatement = assertEmptyStatement;
-exports.assertExpressionStatement = assertExpressionStatement;
-exports.assertFile = assertFile;
-exports.assertForInStatement = assertForInStatement;
-exports.assertForStatement = assertForStatement;
-exports.assertFunctionDeclaration = assertFunctionDeclaration;
-exports.assertFunctionExpression = assertFunctionExpression;
-exports.assertIdentifier = assertIdentifier;
-exports.assertIfStatement = assertIfStatement;
-exports.assertLabeledStatement = assertLabeledStatement;
-exports.assertStringLiteral = assertStringLiteral;
-exports.assertNumericLiteral = assertNumericLiteral;
-exports.assertNullLiteral = assertNullLiteral;
-exports.assertBooleanLiteral = assertBooleanLiteral;
-exports.assertRegExpLiteral = assertRegExpLiteral;
-exports.assertLogicalExpression = assertLogicalExpression;
-exports.assertMemberExpression = assertMemberExpression;
-exports.assertNewExpression = assertNewExpression;
-exports.assertProgram = assertProgram;
-exports.assertObjectExpression = assertObjectExpression;
-exports.assertObjectMethod = assertObjectMethod;
-exports.assertObjectProperty = assertObjectProperty;
-exports.assertRestElement = assertRestElement;
-exports.assertReturnStatement = assertReturnStatement;
-exports.assertSequenceExpression = assertSequenceExpression;
-exports.assertParenthesizedExpression = assertParenthesizedExpression;
-exports.assertSwitchCase = assertSwitchCase;
-exports.assertSwitchStatement = assertSwitchStatement;
-exports.assertThisExpression = assertThisExpression;
-exports.assertThrowStatement = assertThrowStatement;
-exports.assertTryStatement = assertTryStatement;
-exports.assertUnaryExpression = assertUnaryExpression;
-exports.assertUpdateExpression = assertUpdateExpression;
-exports.assertVariableDeclaration = assertVariableDeclaration;
-exports.assertVariableDeclarator = assertVariableDeclarator;
-exports.assertWhileStatement = assertWhileStatement;
-exports.assertWithStatement = assertWithStatement;
-exports.assertAssignmentPattern = assertAssignmentPattern;
-exports.assertArrayPattern = assertArrayPattern;
-exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
-exports.assertClassBody = assertClassBody;
-exports.assertClassDeclaration = assertClassDeclaration;
-exports.assertClassExpression = assertClassExpression;
-exports.assertExportAllDeclaration = assertExportAllDeclaration;
-exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
-exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
-exports.assertExportSpecifier = assertExportSpecifier;
-exports.assertForOfStatement = assertForOfStatement;
-exports.assertImportDeclaration = assertImportDeclaration;
-exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
-exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
-exports.assertImportSpecifier = assertImportSpecifier;
-exports.assertMetaProperty = assertMetaProperty;
-exports.assertClassMethod = assertClassMethod;
-exports.assertObjectPattern = assertObjectPattern;
-exports.assertSpreadElement = assertSpreadElement;
-exports.assertSuper = assertSuper;
-exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
-exports.assertTemplateElement = assertTemplateElement;
-exports.assertTemplateLiteral = assertTemplateLiteral;
-exports.assertYieldExpression = assertYieldExpression;
-exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
-exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
-exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
-exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
-exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
-exports.assertClassImplements = assertClassImplements;
-exports.assertDeclareClass = assertDeclareClass;
-exports.assertDeclareFunction = assertDeclareFunction;
-exports.assertDeclareInterface = assertDeclareInterface;
-exports.assertDeclareModule = assertDeclareModule;
-exports.assertDeclareModuleExports = assertDeclareModuleExports;
-exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
-exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
-exports.assertDeclareVariable = assertDeclareVariable;
-exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
-exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
-exports.assertDeclaredPredicate = assertDeclaredPredicate;
-exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
-exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
-exports.assertFunctionTypeParam = assertFunctionTypeParam;
-exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
-exports.assertInferredPredicate = assertInferredPredicate;
-exports.assertInterfaceExtends = assertInterfaceExtends;
-exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
-exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
-exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
-exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
-exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
-exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
-exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
-exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
-exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
-exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
-exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
-exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
-exports.assertObjectTypeProperty = assertObjectTypeProperty;
-exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
-exports.assertOpaqueType = assertOpaqueType;
-exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
-exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
-exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
-exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
-exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
-exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
-exports.assertTypeAlias = assertTypeAlias;
-exports.assertTypeAnnotation = assertTypeAnnotation;
-exports.assertTypeCastExpression = assertTypeCastExpression;
-exports.assertTypeParameter = assertTypeParameter;
-exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
-exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
-exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
-exports.assertVariance = assertVariance;
-exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
-exports.assertJSXAttribute = assertJSXAttribute;
-exports.assertJSXClosingElement = assertJSXClosingElement;
-exports.assertJSXElement = assertJSXElement;
-exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
-exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
-exports.assertJSXSpreadChild = assertJSXSpreadChild;
-exports.assertJSXIdentifier = assertJSXIdentifier;
-exports.assertJSXMemberExpression = assertJSXMemberExpression;
-exports.assertJSXNamespacedName = assertJSXNamespacedName;
-exports.assertJSXOpeningElement = assertJSXOpeningElement;
-exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
-exports.assertJSXText = assertJSXText;
-exports.assertJSXFragment = assertJSXFragment;
-exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
-exports.assertJSXClosingFragment = assertJSXClosingFragment;
-exports.assertNoop = assertNoop;
-exports.assertPlaceholder = assertPlaceholder;
-exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
-exports.assertAwaitExpression = assertAwaitExpression;
-exports.assertBindExpression = assertBindExpression;
-exports.assertClassProperty = assertClassProperty;
-exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
-exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
-exports.assertPipelineBareFunction = assertPipelineBareFunction;
-exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
-exports.assertOptionalCallExpression = assertOptionalCallExpression;
-exports.assertClassPrivateProperty = assertClassPrivateProperty;
-exports.assertClassPrivateMethod = assertClassPrivateMethod;
-exports.assertImport = assertImport;
-exports.assertDecorator = assertDecorator;
-exports.assertDoExpression = assertDoExpression;
-exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
-exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
-exports.assertPrivateName = assertPrivateName;
-exports.assertBigIntLiteral = assertBigIntLiteral;
-exports.assertTSParameterProperty = assertTSParameterProperty;
-exports.assertTSDeclareFunction = assertTSDeclareFunction;
-exports.assertTSDeclareMethod = assertTSDeclareMethod;
-exports.assertTSQualifiedName = assertTSQualifiedName;
-exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
-exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
-exports.assertTSPropertySignature = assertTSPropertySignature;
-exports.assertTSMethodSignature = assertTSMethodSignature;
-exports.assertTSIndexSignature = assertTSIndexSignature;
-exports.assertTSAnyKeyword = assertTSAnyKeyword;
-exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
-exports.assertTSNumberKeyword = assertTSNumberKeyword;
-exports.assertTSObjectKeyword = assertTSObjectKeyword;
-exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
-exports.assertTSStringKeyword = assertTSStringKeyword;
-exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
-exports.assertTSVoidKeyword = assertTSVoidKeyword;
-exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
-exports.assertTSNullKeyword = assertTSNullKeyword;
-exports.assertTSNeverKeyword = assertTSNeverKeyword;
-exports.assertTSThisType = assertTSThisType;
-exports.assertTSFunctionType = assertTSFunctionType;
-exports.assertTSConstructorType = assertTSConstructorType;
-exports.assertTSTypeReference = assertTSTypeReference;
-exports.assertTSTypePredicate = assertTSTypePredicate;
-exports.assertTSTypeQuery = assertTSTypeQuery;
-exports.assertTSTypeLiteral = assertTSTypeLiteral;
-exports.assertTSArrayType = assertTSArrayType;
-exports.assertTSTupleType = assertTSTupleType;
-exports.assertTSOptionalType = assertTSOptionalType;
-exports.assertTSRestType = assertTSRestType;
-exports.assertTSUnionType = assertTSUnionType;
-exports.assertTSIntersectionType = assertTSIntersectionType;
-exports.assertTSConditionalType = assertTSConditionalType;
-exports.assertTSInferType = assertTSInferType;
-exports.assertTSParenthesizedType = assertTSParenthesizedType;
-exports.assertTSTypeOperator = assertTSTypeOperator;
-exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
-exports.assertTSMappedType = assertTSMappedType;
-exports.assertTSLiteralType = assertTSLiteralType;
-exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
-exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
-exports.assertTSInterfaceBody = assertTSInterfaceBody;
-exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
-exports.assertTSAsExpression = assertTSAsExpression;
-exports.assertTSTypeAssertion = assertTSTypeAssertion;
-exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
-exports.assertTSEnumMember = assertTSEnumMember;
-exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
-exports.assertTSModuleBlock = assertTSModuleBlock;
-exports.assertTSImportType = assertTSImportType;
-exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
-exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
-exports.assertTSNonNullExpression = assertTSNonNullExpression;
-exports.assertTSExportAssignment = assertTSExportAssignment;
-exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
-exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
-exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
-exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
-exports.assertTSTypeParameter = assertTSTypeParameter;
-exports.assertExpression = assertExpression;
-exports.assertBinary = assertBinary;
-exports.assertScopable = assertScopable;
-exports.assertBlockParent = assertBlockParent;
-exports.assertBlock = assertBlock;
-exports.assertStatement = assertStatement;
-exports.assertTerminatorless = assertTerminatorless;
-exports.assertCompletionStatement = assertCompletionStatement;
-exports.assertConditional = assertConditional;
-exports.assertLoop = assertLoop;
-exports.assertWhile = assertWhile;
-exports.assertExpressionWrapper = assertExpressionWrapper;
-exports.assertFor = assertFor;
-exports.assertForXStatement = assertForXStatement;
-exports.assertFunction = assertFunction;
-exports.assertFunctionParent = assertFunctionParent;
-exports.assertPureish = assertPureish;
-exports.assertDeclaration = assertDeclaration;
-exports.assertPatternLike = assertPatternLike;
-exports.assertLVal = assertLVal;
-exports.assertTSEntityName = assertTSEntityName;
-exports.assertLiteral = assertLiteral;
-exports.assertImmutable = assertImmutable;
-exports.assertUserWhitespacable = assertUserWhitespacable;
-exports.assertMethod = assertMethod;
-exports.assertObjectMember = assertObjectMember;
-exports.assertProperty = assertProperty;
-exports.assertUnaryLike = assertUnaryLike;
-exports.assertPattern = assertPattern;
-exports.assertClass = assertClass;
-exports.assertModuleDeclaration = assertModuleDeclaration;
-exports.assertExportDeclaration = assertExportDeclaration;
-exports.assertModuleSpecifier = assertModuleSpecifier;
-exports.assertFlow = assertFlow;
-exports.assertFlowType = assertFlowType;
-exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
-exports.assertFlowDeclaration = assertFlowDeclaration;
-exports.assertFlowPredicate = assertFlowPredicate;
-exports.assertJSX = assertJSX;
-exports.assertPrivate = assertPrivate;
-exports.assertTSTypeElement = assertTSTypeElement;
-exports.assertTSType = assertTSType;
-exports.assertNumberLiteral = assertNumberLiteral;
-exports.assertRegexLiteral = assertRegexLiteral;
-exports.assertRestProperty = assertRestProperty;
-exports.assertSpreadProperty = assertSpreadProperty;
-
-var _is = _interopRequireDefault(require("../../validators/is"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function assert(type, node, opts) {
- if (!(0, _is.default)(type, node, opts)) {
- throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`);
- }
-}
-
-function assertArrayExpression(node, opts = {}) {
- assert("ArrayExpression", node, opts);
-}
-
-function assertAssignmentExpression(node, opts = {}) {
- assert("AssignmentExpression", node, opts);
-}
-
-function assertBinaryExpression(node, opts = {}) {
- assert("BinaryExpression", node, opts);
-}
-
-function assertInterpreterDirective(node, opts = {}) {
- assert("InterpreterDirective", node, opts);
-}
-
-function assertDirective(node, opts = {}) {
- assert("Directive", node, opts);
-}
-
-function assertDirectiveLiteral(node, opts = {}) {
- assert("DirectiveLiteral", node, opts);
-}
-
-function assertBlockStatement(node, opts = {}) {
- assert("BlockStatement", node, opts);
-}
-
-function assertBreakStatement(node, opts = {}) {
- assert("BreakStatement", node, opts);
-}
-
-function assertCallExpression(node, opts = {}) {
- assert("CallExpression", node, opts);
-}
-
-function assertCatchClause(node, opts = {}) {
- assert("CatchClause", node, opts);
-}
-
-function assertConditionalExpression(node, opts = {}) {
- assert("ConditionalExpression", node, opts);
-}
-
-function assertContinueStatement(node, opts = {}) {
- assert("ContinueStatement", node, opts);
-}
-
-function assertDebuggerStatement(node, opts = {}) {
- assert("DebuggerStatement", node, opts);
-}
-
-function assertDoWhileStatement(node, opts = {}) {
- assert("DoWhileStatement", node, opts);
-}
-
-function assertEmptyStatement(node, opts = {}) {
- assert("EmptyStatement", node, opts);
-}
-
-function assertExpressionStatement(node, opts = {}) {
- assert("ExpressionStatement", node, opts);
-}
-
-function assertFile(node, opts = {}) {
- assert("File", node, opts);
-}
-
-function assertForInStatement(node, opts = {}) {
- assert("ForInStatement", node, opts);
-}
-
-function assertForStatement(node, opts = {}) {
- assert("ForStatement", node, opts);
-}
-
-function assertFunctionDeclaration(node, opts = {}) {
- assert("FunctionDeclaration", node, opts);
-}
-
-function assertFunctionExpression(node, opts = {}) {
- assert("FunctionExpression", node, opts);
-}
-
-function assertIdentifier(node, opts = {}) {
- assert("Identifier", node, opts);
-}
-
-function assertIfStatement(node, opts = {}) {
- assert("IfStatement", node, opts);
-}
-
-function assertLabeledStatement(node, opts = {}) {
- assert("LabeledStatement", node, opts);
-}
-
-function assertStringLiteral(node, opts = {}) {
- assert("StringLiteral", node, opts);
-}
-
-function assertNumericLiteral(node, opts = {}) {
- assert("NumericLiteral", node, opts);
-}
-
-function assertNullLiteral(node, opts = {}) {
- assert("NullLiteral", node, opts);
-}
-
-function assertBooleanLiteral(node, opts = {}) {
- assert("BooleanLiteral", node, opts);
-}
-
-function assertRegExpLiteral(node, opts = {}) {
- assert("RegExpLiteral", node, opts);
-}
-
-function assertLogicalExpression(node, opts = {}) {
- assert("LogicalExpression", node, opts);
-}
-
-function assertMemberExpression(node, opts = {}) {
- assert("MemberExpression", node, opts);
-}
-
-function assertNewExpression(node, opts = {}) {
- assert("NewExpression", node, opts);
-}
-
-function assertProgram(node, opts = {}) {
- assert("Program", node, opts);
-}
-
-function assertObjectExpression(node, opts = {}) {
- assert("ObjectExpression", node, opts);
-}
-
-function assertObjectMethod(node, opts = {}) {
- assert("ObjectMethod", node, opts);
-}
-
-function assertObjectProperty(node, opts = {}) {
- assert("ObjectProperty", node, opts);
-}
-
-function assertRestElement(node, opts = {}) {
- assert("RestElement", node, opts);
-}
-
-function assertReturnStatement(node, opts = {}) {
- assert("ReturnStatement", node, opts);
-}
-
-function assertSequenceExpression(node, opts = {}) {
- assert("SequenceExpression", node, opts);
-}
-
-function assertParenthesizedExpression(node, opts = {}) {
- assert("ParenthesizedExpression", node, opts);
-}
-
-function assertSwitchCase(node, opts = {}) {
- assert("SwitchCase", node, opts);
-}
-
-function assertSwitchStatement(node, opts = {}) {
- assert("SwitchStatement", node, opts);
-}
-
-function assertThisExpression(node, opts = {}) {
- assert("ThisExpression", node, opts);
-}
-
-function assertThrowStatement(node, opts = {}) {
- assert("ThrowStatement", node, opts);
-}
-
-function assertTryStatement(node, opts = {}) {
- assert("TryStatement", node, opts);
-}
-
-function assertUnaryExpression(node, opts = {}) {
- assert("UnaryExpression", node, opts);
-}
-
-function assertUpdateExpression(node, opts = {}) {
- assert("UpdateExpression", node, opts);
-}
-
-function assertVariableDeclaration(node, opts = {}) {
- assert("VariableDeclaration", node, opts);
-}
-
-function assertVariableDeclarator(node, opts = {}) {
- assert("VariableDeclarator", node, opts);
-}
-
-function assertWhileStatement(node, opts = {}) {
- assert("WhileStatement", node, opts);
-}
-
-function assertWithStatement(node, opts = {}) {
- assert("WithStatement", node, opts);
-}
-
-function assertAssignmentPattern(node, opts = {}) {
- assert("AssignmentPattern", node, opts);
-}
-
-function assertArrayPattern(node, opts = {}) {
- assert("ArrayPattern", node, opts);
-}
-
-function assertArrowFunctionExpression(node, opts = {}) {
- assert("ArrowFunctionExpression", node, opts);
-}
-
-function assertClassBody(node, opts = {}) {
- assert("ClassBody", node, opts);
-}
-
-function assertClassDeclaration(node, opts = {}) {
- assert("ClassDeclaration", node, opts);
-}
-
-function assertClassExpression(node, opts = {}) {
- assert("ClassExpression", node, opts);
-}
-
-function assertExportAllDeclaration(node, opts = {}) {
- assert("ExportAllDeclaration", node, opts);
-}
-
-function assertExportDefaultDeclaration(node, opts = {}) {
- assert("ExportDefaultDeclaration", node, opts);
-}
-
-function assertExportNamedDeclaration(node, opts = {}) {
- assert("ExportNamedDeclaration", node, opts);
-}
-
-function assertExportSpecifier(node, opts = {}) {
- assert("ExportSpecifier", node, opts);
-}
-
-function assertForOfStatement(node, opts = {}) {
- assert("ForOfStatement", node, opts);
-}
-
-function assertImportDeclaration(node, opts = {}) {
- assert("ImportDeclaration", node, opts);
-}
-
-function assertImportDefaultSpecifier(node, opts = {}) {
- assert("ImportDefaultSpecifier", node, opts);
-}
-
-function assertImportNamespaceSpecifier(node, opts = {}) {
- assert("ImportNamespaceSpecifier", node, opts);
-}
-
-function assertImportSpecifier(node, opts = {}) {
- assert("ImportSpecifier", node, opts);
-}
-
-function assertMetaProperty(node, opts = {}) {
- assert("MetaProperty", node, opts);
-}
-
-function assertClassMethod(node, opts = {}) {
- assert("ClassMethod", node, opts);
-}
-
-function assertObjectPattern(node, opts = {}) {
- assert("ObjectPattern", node, opts);
-}
-
-function assertSpreadElement(node, opts = {}) {
- assert("SpreadElement", node, opts);
-}
-
-function assertSuper(node, opts = {}) {
- assert("Super", node, opts);
-}
-
-function assertTaggedTemplateExpression(node, opts = {}) {
- assert("TaggedTemplateExpression", node, opts);
-}
-
-function assertTemplateElement(node, opts = {}) {
- assert("TemplateElement", node, opts);
-}
-
-function assertTemplateLiteral(node, opts = {}) {
- assert("TemplateLiteral", node, opts);
-}
-
-function assertYieldExpression(node, opts = {}) {
- assert("YieldExpression", node, opts);
-}
-
-function assertAnyTypeAnnotation(node, opts = {}) {
- assert("AnyTypeAnnotation", node, opts);
-}
-
-function assertArrayTypeAnnotation(node, opts = {}) {
- assert("ArrayTypeAnnotation", node, opts);
-}
-
-function assertBooleanTypeAnnotation(node, opts = {}) {
- assert("BooleanTypeAnnotation", node, opts);
-}
-
-function assertBooleanLiteralTypeAnnotation(node, opts = {}) {
- assert("BooleanLiteralTypeAnnotation", node, opts);
-}
-
-function assertNullLiteralTypeAnnotation(node, opts = {}) {
- assert("NullLiteralTypeAnnotation", node, opts);
-}
-
-function assertClassImplements(node, opts = {}) {
- assert("ClassImplements", node, opts);
-}
-
-function assertDeclareClass(node, opts = {}) {
- assert("DeclareClass", node, opts);
-}
-
-function assertDeclareFunction(node, opts = {}) {
- assert("DeclareFunction", node, opts);
-}
-
-function assertDeclareInterface(node, opts = {}) {
- assert("DeclareInterface", node, opts);
-}
-
-function assertDeclareModule(node, opts = {}) {
- assert("DeclareModule", node, opts);
-}
-
-function assertDeclareModuleExports(node, opts = {}) {
- assert("DeclareModuleExports", node, opts);
-}
-
-function assertDeclareTypeAlias(node, opts = {}) {
- assert("DeclareTypeAlias", node, opts);
-}
-
-function assertDeclareOpaqueType(node, opts = {}) {
- assert("DeclareOpaqueType", node, opts);
-}
-
-function assertDeclareVariable(node, opts = {}) {
- assert("DeclareVariable", node, opts);
-}
-
-function assertDeclareExportDeclaration(node, opts = {}) {
- assert("DeclareExportDeclaration", node, opts);
-}
-
-function assertDeclareExportAllDeclaration(node, opts = {}) {
- assert("DeclareExportAllDeclaration", node, opts);
-}
-
-function assertDeclaredPredicate(node, opts = {}) {
- assert("DeclaredPredicate", node, opts);
-}
-
-function assertExistsTypeAnnotation(node, opts = {}) {
- assert("ExistsTypeAnnotation", node, opts);
-}
-
-function assertFunctionTypeAnnotation(node, opts = {}) {
- assert("FunctionTypeAnnotation", node, opts);
-}
-
-function assertFunctionTypeParam(node, opts = {}) {
- assert("FunctionTypeParam", node, opts);
-}
-
-function assertGenericTypeAnnotation(node, opts = {}) {
- assert("GenericTypeAnnotation", node, opts);
-}
-
-function assertInferredPredicate(node, opts = {}) {
- assert("InferredPredicate", node, opts);
-}
-
-function assertInterfaceExtends(node, opts = {}) {
- assert("InterfaceExtends", node, opts);
-}
-
-function assertInterfaceDeclaration(node, opts = {}) {
- assert("InterfaceDeclaration", node, opts);
-}
-
-function assertInterfaceTypeAnnotation(node, opts = {}) {
- assert("InterfaceTypeAnnotation", node, opts);
-}
-
-function assertIntersectionTypeAnnotation(node, opts = {}) {
- assert("IntersectionTypeAnnotation", node, opts);
-}
-
-function assertMixedTypeAnnotation(node, opts = {}) {
- assert("MixedTypeAnnotation", node, opts);
-}
-
-function assertEmptyTypeAnnotation(node, opts = {}) {
- assert("EmptyTypeAnnotation", node, opts);
-}
-
-function assertNullableTypeAnnotation(node, opts = {}) {
- assert("NullableTypeAnnotation", node, opts);
-}
-
-function assertNumberLiteralTypeAnnotation(node, opts = {}) {
- assert("NumberLiteralTypeAnnotation", node, opts);
-}
-
-function assertNumberTypeAnnotation(node, opts = {}) {
- assert("NumberTypeAnnotation", node, opts);
-}
-
-function assertObjectTypeAnnotation(node, opts = {}) {
- assert("ObjectTypeAnnotation", node, opts);
-}
-
-function assertObjectTypeInternalSlot(node, opts = {}) {
- assert("ObjectTypeInternalSlot", node, opts);
-}
-
-function assertObjectTypeCallProperty(node, opts = {}) {
- assert("ObjectTypeCallProperty", node, opts);
-}
-
-function assertObjectTypeIndexer(node, opts = {}) {
- assert("ObjectTypeIndexer", node, opts);
-}
-
-function assertObjectTypeProperty(node, opts = {}) {
- assert("ObjectTypeProperty", node, opts);
-}
-
-function assertObjectTypeSpreadProperty(node, opts = {}) {
- assert("ObjectTypeSpreadProperty", node, opts);
-}
-
-function assertOpaqueType(node, opts = {}) {
- assert("OpaqueType", node, opts);
-}
-
-function assertQualifiedTypeIdentifier(node, opts = {}) {
- assert("QualifiedTypeIdentifier", node, opts);
-}
-
-function assertStringLiteralTypeAnnotation(node, opts = {}) {
- assert("StringLiteralTypeAnnotation", node, opts);
-}
-
-function assertStringTypeAnnotation(node, opts = {}) {
- assert("StringTypeAnnotation", node, opts);
-}
-
-function assertThisTypeAnnotation(node, opts = {}) {
- assert("ThisTypeAnnotation", node, opts);
-}
-
-function assertTupleTypeAnnotation(node, opts = {}) {
- assert("TupleTypeAnnotation", node, opts);
-}
-
-function assertTypeofTypeAnnotation(node, opts = {}) {
- assert("TypeofTypeAnnotation", node, opts);
-}
-
-function assertTypeAlias(node, opts = {}) {
- assert("TypeAlias", node, opts);
-}
-
-function assertTypeAnnotation(node, opts = {}) {
- assert("TypeAnnotation", node, opts);
-}
-
-function assertTypeCastExpression(node, opts = {}) {
- assert("TypeCastExpression", node, opts);
-}
-
-function assertTypeParameter(node, opts = {}) {
- assert("TypeParameter", node, opts);
-}
-
-function assertTypeParameterDeclaration(node, opts = {}) {
- assert("TypeParameterDeclaration", node, opts);
-}
-
-function assertTypeParameterInstantiation(node, opts = {}) {
- assert("TypeParameterInstantiation", node, opts);
-}
-
-function assertUnionTypeAnnotation(node, opts = {}) {
- assert("UnionTypeAnnotation", node, opts);
-}
-
-function assertVariance(node, opts = {}) {
- assert("Variance", node, opts);
-}
-
-function assertVoidTypeAnnotation(node, opts = {}) {
- assert("VoidTypeAnnotation", node, opts);
-}
-
-function assertJSXAttribute(node, opts = {}) {
- assert("JSXAttribute", node, opts);
-}
-
-function assertJSXClosingElement(node, opts = {}) {
- assert("JSXClosingElement", node, opts);
-}
-
-function assertJSXElement(node, opts = {}) {
- assert("JSXElement", node, opts);
-}
-
-function assertJSXEmptyExpression(node, opts = {}) {
- assert("JSXEmptyExpression", node, opts);
-}
-
-function assertJSXExpressionContainer(node, opts = {}) {
- assert("JSXExpressionContainer", node, opts);
-}
-
-function assertJSXSpreadChild(node, opts = {}) {
- assert("JSXSpreadChild", node, opts);
-}
-
-function assertJSXIdentifier(node, opts = {}) {
- assert("JSXIdentifier", node, opts);
-}
-
-function assertJSXMemberExpression(node, opts = {}) {
- assert("JSXMemberExpression", node, opts);
-}
-
-function assertJSXNamespacedName(node, opts = {}) {
- assert("JSXNamespacedName", node, opts);
-}
-
-function assertJSXOpeningElement(node, opts = {}) {
- assert("JSXOpeningElement", node, opts);
-}
-
-function assertJSXSpreadAttribute(node, opts = {}) {
- assert("JSXSpreadAttribute", node, opts);
-}
-
-function assertJSXText(node, opts = {}) {
- assert("JSXText", node, opts);
-}
-
-function assertJSXFragment(node, opts = {}) {
- assert("JSXFragment", node, opts);
-}
-
-function assertJSXOpeningFragment(node, opts = {}) {
- assert("JSXOpeningFragment", node, opts);
-}
-
-function assertJSXClosingFragment(node, opts = {}) {
- assert("JSXClosingFragment", node, opts);
-}
-
-function assertNoop(node, opts = {}) {
- assert("Noop", node, opts);
-}
-
-function assertPlaceholder(node, opts = {}) {
- assert("Placeholder", node, opts);
-}
-
-function assertArgumentPlaceholder(node, opts = {}) {
- assert("ArgumentPlaceholder", node, opts);
-}
-
-function assertAwaitExpression(node, opts = {}) {
- assert("AwaitExpression", node, opts);
-}
-
-function assertBindExpression(node, opts = {}) {
- assert("BindExpression", node, opts);
-}
-
-function assertClassProperty(node, opts = {}) {
- assert("ClassProperty", node, opts);
-}
-
-function assertOptionalMemberExpression(node, opts = {}) {
- assert("OptionalMemberExpression", node, opts);
-}
-
-function assertPipelineTopicExpression(node, opts = {}) {
- assert("PipelineTopicExpression", node, opts);
-}
-
-function assertPipelineBareFunction(node, opts = {}) {
- assert("PipelineBareFunction", node, opts);
-}
-
-function assertPipelinePrimaryTopicReference(node, opts = {}) {
- assert("PipelinePrimaryTopicReference", node, opts);
-}
-
-function assertOptionalCallExpression(node, opts = {}) {
- assert("OptionalCallExpression", node, opts);
-}
-
-function assertClassPrivateProperty(node, opts = {}) {
- assert("ClassPrivateProperty", node, opts);
-}
-
-function assertClassPrivateMethod(node, opts = {}) {
- assert("ClassPrivateMethod", node, opts);
-}
-
-function assertImport(node, opts = {}) {
- assert("Import", node, opts);
-}
-
-function assertDecorator(node, opts = {}) {
- assert("Decorator", node, opts);
-}
-
-function assertDoExpression(node, opts = {}) {
- assert("DoExpression", node, opts);
-}
-
-function assertExportDefaultSpecifier(node, opts = {}) {
- assert("ExportDefaultSpecifier", node, opts);
-}
-
-function assertExportNamespaceSpecifier(node, opts = {}) {
- assert("ExportNamespaceSpecifier", node, opts);
-}
-
-function assertPrivateName(node, opts = {}) {
- assert("PrivateName", node, opts);
-}
-
-function assertBigIntLiteral(node, opts = {}) {
- assert("BigIntLiteral", node, opts);
-}
-
-function assertTSParameterProperty(node, opts = {}) {
- assert("TSParameterProperty", node, opts);
-}
-
-function assertTSDeclareFunction(node, opts = {}) {
- assert("TSDeclareFunction", node, opts);
-}
-
-function assertTSDeclareMethod(node, opts = {}) {
- assert("TSDeclareMethod", node, opts);
-}
-
-function assertTSQualifiedName(node, opts = {}) {
- assert("TSQualifiedName", node, opts);
-}
-
-function assertTSCallSignatureDeclaration(node, opts = {}) {
- assert("TSCallSignatureDeclaration", node, opts);
-}
-
-function assertTSConstructSignatureDeclaration(node, opts = {}) {
- assert("TSConstructSignatureDeclaration", node, opts);
-}
-
-function assertTSPropertySignature(node, opts = {}) {
- assert("TSPropertySignature", node, opts);
-}
-
-function assertTSMethodSignature(node, opts = {}) {
- assert("TSMethodSignature", node, opts);
-}
-
-function assertTSIndexSignature(node, opts = {}) {
- assert("TSIndexSignature", node, opts);
-}
-
-function assertTSAnyKeyword(node, opts = {}) {
- assert("TSAnyKeyword", node, opts);
-}
-
-function assertTSUnknownKeyword(node, opts = {}) {
- assert("TSUnknownKeyword", node, opts);
-}
-
-function assertTSNumberKeyword(node, opts = {}) {
- assert("TSNumberKeyword", node, opts);
-}
-
-function assertTSObjectKeyword(node, opts = {}) {
- assert("TSObjectKeyword", node, opts);
-}
-
-function assertTSBooleanKeyword(node, opts = {}) {
- assert("TSBooleanKeyword", node, opts);
-}
-
-function assertTSStringKeyword(node, opts = {}) {
- assert("TSStringKeyword", node, opts);
-}
-
-function assertTSSymbolKeyword(node, opts = {}) {
- assert("TSSymbolKeyword", node, opts);
-}
-
-function assertTSVoidKeyword(node, opts = {}) {
- assert("TSVoidKeyword", node, opts);
-}
-
-function assertTSUndefinedKeyword(node, opts = {}) {
- assert("TSUndefinedKeyword", node, opts);
-}
-
-function assertTSNullKeyword(node, opts = {}) {
- assert("TSNullKeyword", node, opts);
-}
-
-function assertTSNeverKeyword(node, opts = {}) {
- assert("TSNeverKeyword", node, opts);
-}
-
-function assertTSThisType(node, opts = {}) {
- assert("TSThisType", node, opts);
-}
-
-function assertTSFunctionType(node, opts = {}) {
- assert("TSFunctionType", node, opts);
-}
-
-function assertTSConstructorType(node, opts = {}) {
- assert("TSConstructorType", node, opts);
-}
-
-function assertTSTypeReference(node, opts = {}) {
- assert("TSTypeReference", node, opts);
-}
-
-function assertTSTypePredicate(node, opts = {}) {
- assert("TSTypePredicate", node, opts);
-}
-
-function assertTSTypeQuery(node, opts = {}) {
- assert("TSTypeQuery", node, opts);
-}
-
-function assertTSTypeLiteral(node, opts = {}) {
- assert("TSTypeLiteral", node, opts);
-}
-
-function assertTSArrayType(node, opts = {}) {
- assert("TSArrayType", node, opts);
-}
-
-function assertTSTupleType(node, opts = {}) {
- assert("TSTupleType", node, opts);
-}
-
-function assertTSOptionalType(node, opts = {}) {
- assert("TSOptionalType", node, opts);
-}
-
-function assertTSRestType(node, opts = {}) {
- assert("TSRestType", node, opts);
-}
-
-function assertTSUnionType(node, opts = {}) {
- assert("TSUnionType", node, opts);
-}
-
-function assertTSIntersectionType(node, opts = {}) {
- assert("TSIntersectionType", node, opts);
-}
-
-function assertTSConditionalType(node, opts = {}) {
- assert("TSConditionalType", node, opts);
-}
-
-function assertTSInferType(node, opts = {}) {
- assert("TSInferType", node, opts);
-}
-
-function assertTSParenthesizedType(node, opts = {}) {
- assert("TSParenthesizedType", node, opts);
-}
-
-function assertTSTypeOperator(node, opts = {}) {
- assert("TSTypeOperator", node, opts);
-}
-
-function assertTSIndexedAccessType(node, opts = {}) {
- assert("TSIndexedAccessType", node, opts);
-}
-
-function assertTSMappedType(node, opts = {}) {
- assert("TSMappedType", node, opts);
-}
-
-function assertTSLiteralType(node, opts = {}) {
- assert("TSLiteralType", node, opts);
-}
-
-function assertTSExpressionWithTypeArguments(node, opts = {}) {
- assert("TSExpressionWithTypeArguments", node, opts);
-}
-
-function assertTSInterfaceDeclaration(node, opts = {}) {
- assert("TSInterfaceDeclaration", node, opts);
-}
-
-function assertTSInterfaceBody(node, opts = {}) {
- assert("TSInterfaceBody", node, opts);
-}
-
-function assertTSTypeAliasDeclaration(node, opts = {}) {
- assert("TSTypeAliasDeclaration", node, opts);
-}
-
-function assertTSAsExpression(node, opts = {}) {
- assert("TSAsExpression", node, opts);
-}
-
-function assertTSTypeAssertion(node, opts = {}) {
- assert("TSTypeAssertion", node, opts);
-}
-
-function assertTSEnumDeclaration(node, opts = {}) {
- assert("TSEnumDeclaration", node, opts);
-}
-
-function assertTSEnumMember(node, opts = {}) {
- assert("TSEnumMember", node, opts);
-}
-
-function assertTSModuleDeclaration(node, opts = {}) {
- assert("TSModuleDeclaration", node, opts);
-}
-
-function assertTSModuleBlock(node, opts = {}) {
- assert("TSModuleBlock", node, opts);
-}
-
-function assertTSImportType(node, opts = {}) {
- assert("TSImportType", node, opts);
-}
-
-function assertTSImportEqualsDeclaration(node, opts = {}) {
- assert("TSImportEqualsDeclaration", node, opts);
-}
-
-function assertTSExternalModuleReference(node, opts = {}) {
- assert("TSExternalModuleReference", node, opts);
-}
-
-function assertTSNonNullExpression(node, opts = {}) {
- assert("TSNonNullExpression", node, opts);
-}
-
-function assertTSExportAssignment(node, opts = {}) {
- assert("TSExportAssignment", node, opts);
-}
-
-function assertTSNamespaceExportDeclaration(node, opts = {}) {
- assert("TSNamespaceExportDeclaration", node, opts);
-}
-
-function assertTSTypeAnnotation(node, opts = {}) {
- assert("TSTypeAnnotation", node, opts);
-}
-
-function assertTSTypeParameterInstantiation(node, opts = {}) {
- assert("TSTypeParameterInstantiation", node, opts);
-}
-
-function assertTSTypeParameterDeclaration(node, opts = {}) {
- assert("TSTypeParameterDeclaration", node, opts);
-}
-
-function assertTSTypeParameter(node, opts = {}) {
- assert("TSTypeParameter", node, opts);
-}
-
-function assertExpression(node, opts = {}) {
- assert("Expression", node, opts);
-}
-
-function assertBinary(node, opts = {}) {
- assert("Binary", node, opts);
-}
-
-function assertScopable(node, opts = {}) {
- assert("Scopable", node, opts);
-}
-
-function assertBlockParent(node, opts = {}) {
- assert("BlockParent", node, opts);
-}
-
-function assertBlock(node, opts = {}) {
- assert("Block", node, opts);
-}
-
-function assertStatement(node, opts = {}) {
- assert("Statement", node, opts);
-}
-
-function assertTerminatorless(node, opts = {}) {
- assert("Terminatorless", node, opts);
-}
-
-function assertCompletionStatement(node, opts = {}) {
- assert("CompletionStatement", node, opts);
-}
-
-function assertConditional(node, opts = {}) {
- assert("Conditional", node, opts);
-}
-
-function assertLoop(node, opts = {}) {
- assert("Loop", node, opts);
-}
-
-function assertWhile(node, opts = {}) {
- assert("While", node, opts);
-}
-
-function assertExpressionWrapper(node, opts = {}) {
- assert("ExpressionWrapper", node, opts);
-}
-
-function assertFor(node, opts = {}) {
- assert("For", node, opts);
-}
-
-function assertForXStatement(node, opts = {}) {
- assert("ForXStatement", node, opts);
-}
-
-function assertFunction(node, opts = {}) {
- assert("Function", node, opts);
-}
-
-function assertFunctionParent(node, opts = {}) {
- assert("FunctionParent", node, opts);
-}
-
-function assertPureish(node, opts = {}) {
- assert("Pureish", node, opts);
-}
-
-function assertDeclaration(node, opts = {}) {
- assert("Declaration", node, opts);
-}
-
-function assertPatternLike(node, opts = {}) {
- assert("PatternLike", node, opts);
-}
-
-function assertLVal(node, opts = {}) {
- assert("LVal", node, opts);
-}
-
-function assertTSEntityName(node, opts = {}) {
- assert("TSEntityName", node, opts);
-}
-
-function assertLiteral(node, opts = {}) {
- assert("Literal", node, opts);
-}
-
-function assertImmutable(node, opts = {}) {
- assert("Immutable", node, opts);
-}
-
-function assertUserWhitespacable(node, opts = {}) {
- assert("UserWhitespacable", node, opts);
-}
-
-function assertMethod(node, opts = {}) {
- assert("Method", node, opts);
-}
-
-function assertObjectMember(node, opts = {}) {
- assert("ObjectMember", node, opts);
-}
-
-function assertProperty(node, opts = {}) {
- assert("Property", node, opts);
-}
-
-function assertUnaryLike(node, opts = {}) {
- assert("UnaryLike", node, opts);
-}
-
-function assertPattern(node, opts = {}) {
- assert("Pattern", node, opts);
-}
-
-function assertClass(node, opts = {}) {
- assert("Class", node, opts);
-}
-
-function assertModuleDeclaration(node, opts = {}) {
- assert("ModuleDeclaration", node, opts);
-}
-
-function assertExportDeclaration(node, opts = {}) {
- assert("ExportDeclaration", node, opts);
-}
-
-function assertModuleSpecifier(node, opts = {}) {
- assert("ModuleSpecifier", node, opts);
-}
-
-function assertFlow(node, opts = {}) {
- assert("Flow", node, opts);
-}
-
-function assertFlowType(node, opts = {}) {
- assert("FlowType", node, opts);
-}
-
-function assertFlowBaseAnnotation(node, opts = {}) {
- assert("FlowBaseAnnotation", node, opts);
-}
-
-function assertFlowDeclaration(node, opts = {}) {
- assert("FlowDeclaration", node, opts);
-}
-
-function assertFlowPredicate(node, opts = {}) {
- assert("FlowPredicate", node, opts);
-}
-
-function assertJSX(node, opts = {}) {
- assert("JSX", node, opts);
-}
-
-function assertPrivate(node, opts = {}) {
- assert("Private", node, opts);
-}
-
-function assertTSTypeElement(node, opts = {}) {
- assert("TSTypeElement", node, opts);
-}
-
-function assertTSType(node, opts = {}) {
- assert("TSType", node, opts);
-}
-
-function assertNumberLiteral(node, opts) {
- console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
- assert("NumberLiteral", node, opts);
-}
-
-function assertRegexLiteral(node, opts) {
- console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
- assert("RegexLiteral", node, opts);
-}
-
-function assertRestProperty(node, opts) {
- console.trace("The node type RestProperty has been renamed to RestElement");
- assert("RestProperty", node, opts);
-}
-
-function assertSpreadProperty(node, opts) {
- console.trace("The node type SpreadProperty has been renamed to SpreadElement");
- assert("SpreadProperty", node, opts);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/builder.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/builder.js
deleted file mode 100644
index b42fac2f155..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/builder.js
+++ /dev/null
@@ -1,50 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = builder;
-
-function _clone() {
- const data = _interopRequireDefault(require("lodash/clone"));
-
- _clone = function () {
- return data;
- };
-
- return data;
-}
-
-var _definitions = require("../definitions");
-
-var _validate = _interopRequireDefault(require("../validators/validate"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function builder(type, ...args) {
- const keys = _definitions.BUILDER_KEYS[type];
- const countArgs = args.length;
-
- if (countArgs > keys.length) {
- throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`);
- }
-
- const node = {
- type
- };
- let i = 0;
- keys.forEach(key => {
- const field = _definitions.NODE_FIELDS[type][key];
- let arg;
- if (i < countArgs) arg = args[i];
- if (arg === undefined) arg = (0, _clone().default)(field.default);
- node[key] = arg;
- i++;
- });
-
- for (const key of Object.keys(node)) {
- (0, _validate.default)(node, key, node[key]);
- }
-
- return node;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js
deleted file mode 100644
index df76b0107ff..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = createUnionTypeAnnotation;
-
-var _generated = require("../generated");
-
-var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function createUnionTypeAnnotation(types) {
- const flattened = (0, _removeTypeDuplicates.default)(types);
-
- if (flattened.length === 1) {
- return flattened[0];
- } else {
- return (0, _generated.unionTypeAnnotation)(flattened);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js
deleted file mode 100644
index 06d0127d129..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/builders/generated/index.js
+++ /dev/null
@@ -1,1148 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.arrayExpression = exports.ArrayExpression = ArrayExpression;
-exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression;
-exports.binaryExpression = exports.BinaryExpression = BinaryExpression;
-exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective;
-exports.directive = exports.Directive = Directive;
-exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral;
-exports.blockStatement = exports.BlockStatement = BlockStatement;
-exports.breakStatement = exports.BreakStatement = BreakStatement;
-exports.callExpression = exports.CallExpression = CallExpression;
-exports.catchClause = exports.CatchClause = CatchClause;
-exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression;
-exports.continueStatement = exports.ContinueStatement = ContinueStatement;
-exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement;
-exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement;
-exports.emptyStatement = exports.EmptyStatement = EmptyStatement;
-exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement;
-exports.file = exports.File = File;
-exports.forInStatement = exports.ForInStatement = ForInStatement;
-exports.forStatement = exports.ForStatement = ForStatement;
-exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration;
-exports.functionExpression = exports.FunctionExpression = FunctionExpression;
-exports.identifier = exports.Identifier = Identifier;
-exports.ifStatement = exports.IfStatement = IfStatement;
-exports.labeledStatement = exports.LabeledStatement = LabeledStatement;
-exports.stringLiteral = exports.StringLiteral = StringLiteral;
-exports.numericLiteral = exports.NumericLiteral = NumericLiteral;
-exports.nullLiteral = exports.NullLiteral = NullLiteral;
-exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral;
-exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral;
-exports.logicalExpression = exports.LogicalExpression = LogicalExpression;
-exports.memberExpression = exports.MemberExpression = MemberExpression;
-exports.newExpression = exports.NewExpression = NewExpression;
-exports.program = exports.Program = Program;
-exports.objectExpression = exports.ObjectExpression = ObjectExpression;
-exports.objectMethod = exports.ObjectMethod = ObjectMethod;
-exports.objectProperty = exports.ObjectProperty = ObjectProperty;
-exports.restElement = exports.RestElement = RestElement;
-exports.returnStatement = exports.ReturnStatement = ReturnStatement;
-exports.sequenceExpression = exports.SequenceExpression = SequenceExpression;
-exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression;
-exports.switchCase = exports.SwitchCase = SwitchCase;
-exports.switchStatement = exports.SwitchStatement = SwitchStatement;
-exports.thisExpression = exports.ThisExpression = ThisExpression;
-exports.throwStatement = exports.ThrowStatement = ThrowStatement;
-exports.tryStatement = exports.TryStatement = TryStatement;
-exports.unaryExpression = exports.UnaryExpression = UnaryExpression;
-exports.updateExpression = exports.UpdateExpression = UpdateExpression;
-exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration;
-exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator;
-exports.whileStatement = exports.WhileStatement = WhileStatement;
-exports.withStatement = exports.WithStatement = WithStatement;
-exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern;
-exports.arrayPattern = exports.ArrayPattern = ArrayPattern;
-exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression;
-exports.classBody = exports.ClassBody = ClassBody;
-exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration;
-exports.classExpression = exports.ClassExpression = ClassExpression;
-exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration;
-exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
-exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration;
-exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier;
-exports.forOfStatement = exports.ForOfStatement = ForOfStatement;
-exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration;
-exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
-exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
-exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier;
-exports.metaProperty = exports.MetaProperty = MetaProperty;
-exports.classMethod = exports.ClassMethod = ClassMethod;
-exports.objectPattern = exports.ObjectPattern = ObjectPattern;
-exports.spreadElement = exports.SpreadElement = SpreadElement;
-exports.super = exports.Super = Super;
-exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression;
-exports.templateElement = exports.TemplateElement = TemplateElement;
-exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral;
-exports.yieldExpression = exports.YieldExpression = YieldExpression;
-exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation;
-exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
-exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
-exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
-exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
-exports.classImplements = exports.ClassImplements = ClassImplements;
-exports.declareClass = exports.DeclareClass = DeclareClass;
-exports.declareFunction = exports.DeclareFunction = DeclareFunction;
-exports.declareInterface = exports.DeclareInterface = DeclareInterface;
-exports.declareModule = exports.DeclareModule = DeclareModule;
-exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports;
-exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias;
-exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType;
-exports.declareVariable = exports.DeclareVariable = DeclareVariable;
-exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration;
-exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
-exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate;
-exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
-exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
-exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam;
-exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation;
-exports.inferredPredicate = exports.InferredPredicate = InferredPredicate;
-exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends;
-exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration;
-exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
-exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
-exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation;
-exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
-exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation;
-exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation;
-exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation;
-exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
-exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
-exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
-exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer;
-exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty;
-exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
-exports.opaqueType = exports.OpaqueType = OpaqueType;
-exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
-exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation;
-exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation;
-exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation;
-exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation;
-exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
-exports.typeAlias = exports.TypeAlias = TypeAlias;
-exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation;
-exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression;
-exports.typeParameter = exports.TypeParameter = TypeParameter;
-exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration;
-exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation;
-exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
-exports.variance = exports.Variance = Variance;
-exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation;
-exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute;
-exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement;
-exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement;
-exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression;
-exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer;
-exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild;
-exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier;
-exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression;
-exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName;
-exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement;
-exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute;
-exports.jSXText = exports.jsxText = exports.JSXText = JSXText;
-exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment;
-exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment;
-exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment;
-exports.noop = exports.Noop = Noop;
-exports.placeholder = exports.Placeholder = Placeholder;
-exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder;
-exports.awaitExpression = exports.AwaitExpression = AwaitExpression;
-exports.bindExpression = exports.BindExpression = BindExpression;
-exports.classProperty = exports.ClassProperty = ClassProperty;
-exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
-exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression;
-exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction;
-exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
-exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression;
-exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty;
-exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod;
-exports.import = exports.Import = Import;
-exports.decorator = exports.Decorator = Decorator;
-exports.doExpression = exports.DoExpression = DoExpression;
-exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
-exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
-exports.privateName = exports.PrivateName = PrivateName;
-exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral;
-exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty;
-exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction;
-exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod;
-exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName;
-exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
-exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
-exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature;
-exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature;
-exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature;
-exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword;
-exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword;
-exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword;
-exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword;
-exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword;
-exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword;
-exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword;
-exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword;
-exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword;
-exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword;
-exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword;
-exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType;
-exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType;
-exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType;
-exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference;
-exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate;
-exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery;
-exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral;
-exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType;
-exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType;
-exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType;
-exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType;
-exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType;
-exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType;
-exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType;
-exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType;
-exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType;
-exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator;
-exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType;
-exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType;
-exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType;
-exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
-exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
-exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody;
-exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
-exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression;
-exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion;
-exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration;
-exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember;
-exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration;
-exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock;
-exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType;
-exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
-exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference;
-exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression;
-exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment;
-exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
-exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation;
-exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
-exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration;
-exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter;
-exports.numberLiteral = exports.NumberLiteral = NumberLiteral;
-exports.regexLiteral = exports.RegexLiteral = RegexLiteral;
-exports.restProperty = exports.RestProperty = RestProperty;
-exports.spreadProperty = exports.SpreadProperty = SpreadProperty;
-
-var _builder = _interopRequireDefault(require("../builder"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function ArrayExpression(...args) {
- return (0, _builder.default)("ArrayExpression", ...args);
-}
-
-function AssignmentExpression(...args) {
- return (0, _builder.default)("AssignmentExpression", ...args);
-}
-
-function BinaryExpression(...args) {
- return (0, _builder.default)("BinaryExpression", ...args);
-}
-
-function InterpreterDirective(...args) {
- return (0, _builder.default)("InterpreterDirective", ...args);
-}
-
-function Directive(...args) {
- return (0, _builder.default)("Directive", ...args);
-}
-
-function DirectiveLiteral(...args) {
- return (0, _builder.default)("DirectiveLiteral", ...args);
-}
-
-function BlockStatement(...args) {
- return (0, _builder.default)("BlockStatement", ...args);
-}
-
-function BreakStatement(...args) {
- return (0, _builder.default)("BreakStatement", ...args);
-}
-
-function CallExpression(...args) {
- return (0, _builder.default)("CallExpression", ...args);
-}
-
-function CatchClause(...args) {
- return (0, _builder.default)("CatchClause", ...args);
-}
-
-function ConditionalExpression(...args) {
- return (0, _builder.default)("ConditionalExpression", ...args);
-}
-
-function ContinueStatement(...args) {
- return (0, _builder.default)("ContinueStatement", ...args);
-}
-
-function DebuggerStatement(...args) {
- return (0, _builder.default)("DebuggerStatement", ...args);
-}
-
-function DoWhileStatement(...args) {
- return (0, _builder.default)("DoWhileStatement", ...args);
-}
-
-function EmptyStatement(...args) {
- return (0, _builder.default)("EmptyStatement", ...args);
-}
-
-function ExpressionStatement(...args) {
- return (0, _builder.default)("ExpressionStatement", ...args);
-}
-
-function File(...args) {
- return (0, _builder.default)("File", ...args);
-}
-
-function ForInStatement(...args) {
- return (0, _builder.default)("ForInStatement", ...args);
-}
-
-function ForStatement(...args) {
- return (0, _builder.default)("ForStatement", ...args);
-}
-
-function FunctionDeclaration(...args) {
- return (0, _builder.default)("FunctionDeclaration", ...args);
-}
-
-function FunctionExpression(...args) {
- return (0, _builder.default)("FunctionExpression", ...args);
-}
-
-function Identifier(...args) {
- return (0, _builder.default)("Identifier", ...args);
-}
-
-function IfStatement(...args) {
- return (0, _builder.default)("IfStatement", ...args);
-}
-
-function LabeledStatement(...args) {
- return (0, _builder.default)("LabeledStatement", ...args);
-}
-
-function StringLiteral(...args) {
- return (0, _builder.default)("StringLiteral", ...args);
-}
-
-function NumericLiteral(...args) {
- return (0, _builder.default)("NumericLiteral", ...args);
-}
-
-function NullLiteral(...args) {
- return (0, _builder.default)("NullLiteral", ...args);
-}
-
-function BooleanLiteral(...args) {
- return (0, _builder.default)("BooleanLiteral", ...args);
-}
-
-function RegExpLiteral(...args) {
- return (0, _builder.default)("RegExpLiteral", ...args);
-}
-
-function LogicalExpression(...args) {
- return (0, _builder.default)("LogicalExpression", ...args);
-}
-
-function MemberExpression(...args) {
- return (0, _builder.default)("MemberExpression", ...args);
-}
-
-function NewExpression(...args) {
- return (0, _builder.default)("NewExpression", ...args);
-}
-
-function Program(...args) {
- return (0, _builder.default)("Program", ...args);
-}
-
-function ObjectExpression(...args) {
- return (0, _builder.default)("ObjectExpression", ...args);
-}
-
-function ObjectMethod(...args) {
- return (0, _builder.default)("ObjectMethod", ...args);
-}
-
-function ObjectProperty(...args) {
- return (0, _builder.default)("ObjectProperty", ...args);
-}
-
-function RestElement(...args) {
- return (0, _builder.default)("RestElement", ...args);
-}
-
-function ReturnStatement(...args) {
- return (0, _builder.default)("ReturnStatement", ...args);
-}
-
-function SequenceExpression(...args) {
- return (0, _builder.default)("SequenceExpression", ...args);
-}
-
-function ParenthesizedExpression(...args) {
- return (0, _builder.default)("ParenthesizedExpression", ...args);
-}
-
-function SwitchCase(...args) {
- return (0, _builder.default)("SwitchCase", ...args);
-}
-
-function SwitchStatement(...args) {
- return (0, _builder.default)("SwitchStatement", ...args);
-}
-
-function ThisExpression(...args) {
- return (0, _builder.default)("ThisExpression", ...args);
-}
-
-function ThrowStatement(...args) {
- return (0, _builder.default)("ThrowStatement", ...args);
-}
-
-function TryStatement(...args) {
- return (0, _builder.default)("TryStatement", ...args);
-}
-
-function UnaryExpression(...args) {
- return (0, _builder.default)("UnaryExpression", ...args);
-}
-
-function UpdateExpression(...args) {
- return (0, _builder.default)("UpdateExpression", ...args);
-}
-
-function VariableDeclaration(...args) {
- return (0, _builder.default)("VariableDeclaration", ...args);
-}
-
-function VariableDeclarator(...args) {
- return (0, _builder.default)("VariableDeclarator", ...args);
-}
-
-function WhileStatement(...args) {
- return (0, _builder.default)("WhileStatement", ...args);
-}
-
-function WithStatement(...args) {
- return (0, _builder.default)("WithStatement", ...args);
-}
-
-function AssignmentPattern(...args) {
- return (0, _builder.default)("AssignmentPattern", ...args);
-}
-
-function ArrayPattern(...args) {
- return (0, _builder.default)("ArrayPattern", ...args);
-}
-
-function ArrowFunctionExpression(...args) {
- return (0, _builder.default)("ArrowFunctionExpression", ...args);
-}
-
-function ClassBody(...args) {
- return (0, _builder.default)("ClassBody", ...args);
-}
-
-function ClassDeclaration(...args) {
- return (0, _builder.default)("ClassDeclaration", ...args);
-}
-
-function ClassExpression(...args) {
- return (0, _builder.default)("ClassExpression", ...args);
-}
-
-function ExportAllDeclaration(...args) {
- return (0, _builder.default)("ExportAllDeclaration", ...args);
-}
-
-function ExportDefaultDeclaration(...args) {
- return (0, _builder.default)("ExportDefaultDeclaration", ...args);
-}
-
-function ExportNamedDeclaration(...args) {
- return (0, _builder.default)("ExportNamedDeclaration", ...args);
-}
-
-function ExportSpecifier(...args) {
- return (0, _builder.default)("ExportSpecifier", ...args);
-}
-
-function ForOfStatement(...args) {
- return (0, _builder.default)("ForOfStatement", ...args);
-}
-
-function ImportDeclaration(...args) {
- return (0, _builder.default)("ImportDeclaration", ...args);
-}
-
-function ImportDefaultSpecifier(...args) {
- return (0, _builder.default)("ImportDefaultSpecifier", ...args);
-}
-
-function ImportNamespaceSpecifier(...args) {
- return (0, _builder.default)("ImportNamespaceSpecifier", ...args);
-}
-
-function ImportSpecifier(...args) {
- return (0, _builder.default)("ImportSpecifier", ...args);
-}
-
-function MetaProperty(...args) {
- return (0, _builder.default)("MetaProperty", ...args);
-}
-
-function ClassMethod(...args) {
- return (0, _builder.default)("ClassMethod", ...args);
-}
-
-function ObjectPattern(...args) {
- return (0, _builder.default)("ObjectPattern", ...args);
-}
-
-function SpreadElement(...args) {
- return (0, _builder.default)("SpreadElement", ...args);
-}
-
-function Super(...args) {
- return (0, _builder.default)("Super", ...args);
-}
-
-function TaggedTemplateExpression(...args) {
- return (0, _builder.default)("TaggedTemplateExpression", ...args);
-}
-
-function TemplateElement(...args) {
- return (0, _builder.default)("TemplateElement", ...args);
-}
-
-function TemplateLiteral(...args) {
- return (0, _builder.default)("TemplateLiteral", ...args);
-}
-
-function YieldExpression(...args) {
- return (0, _builder.default)("YieldExpression", ...args);
-}
-
-function AnyTypeAnnotation(...args) {
- return (0, _builder.default)("AnyTypeAnnotation", ...args);
-}
-
-function ArrayTypeAnnotation(...args) {
- return (0, _builder.default)("ArrayTypeAnnotation", ...args);
-}
-
-function BooleanTypeAnnotation(...args) {
- return (0, _builder.default)("BooleanTypeAnnotation", ...args);
-}
-
-function BooleanLiteralTypeAnnotation(...args) {
- return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args);
-}
-
-function NullLiteralTypeAnnotation(...args) {
- return (0, _builder.default)("NullLiteralTypeAnnotation", ...args);
-}
-
-function ClassImplements(...args) {
- return (0, _builder.default)("ClassImplements", ...args);
-}
-
-function DeclareClass(...args) {
- return (0, _builder.default)("DeclareClass", ...args);
-}
-
-function DeclareFunction(...args) {
- return (0, _builder.default)("DeclareFunction", ...args);
-}
-
-function DeclareInterface(...args) {
- return (0, _builder.default)("DeclareInterface", ...args);
-}
-
-function DeclareModule(...args) {
- return (0, _builder.default)("DeclareModule", ...args);
-}
-
-function DeclareModuleExports(...args) {
- return (0, _builder.default)("DeclareModuleExports", ...args);
-}
-
-function DeclareTypeAlias(...args) {
- return (0, _builder.default)("DeclareTypeAlias", ...args);
-}
-
-function DeclareOpaqueType(...args) {
- return (0, _builder.default)("DeclareOpaqueType", ...args);
-}
-
-function DeclareVariable(...args) {
- return (0, _builder.default)("DeclareVariable", ...args);
-}
-
-function DeclareExportDeclaration(...args) {
- return (0, _builder.default)("DeclareExportDeclaration", ...args);
-}
-
-function DeclareExportAllDeclaration(...args) {
- return (0, _builder.default)("DeclareExportAllDeclaration", ...args);
-}
-
-function DeclaredPredicate(...args) {
- return (0, _builder.default)("DeclaredPredicate", ...args);
-}
-
-function ExistsTypeAnnotation(...args) {
- return (0, _builder.default)("ExistsTypeAnnotation", ...args);
-}
-
-function FunctionTypeAnnotation(...args) {
- return (0, _builder.default)("FunctionTypeAnnotation", ...args);
-}
-
-function FunctionTypeParam(...args) {
- return (0, _builder.default)("FunctionTypeParam", ...args);
-}
-
-function GenericTypeAnnotation(...args) {
- return (0, _builder.default)("GenericTypeAnnotation", ...args);
-}
-
-function InferredPredicate(...args) {
- return (0, _builder.default)("InferredPredicate", ...args);
-}
-
-function InterfaceExtends(...args) {
- return (0, _builder.default)("InterfaceExtends", ...args);
-}
-
-function InterfaceDeclaration(...args) {
- return (0, _builder.default)("InterfaceDeclaration", ...args);
-}
-
-function InterfaceTypeAnnotation(...args) {
- return (0, _builder.default)("InterfaceTypeAnnotation", ...args);
-}
-
-function IntersectionTypeAnnotation(...args) {
- return (0, _builder.default)("IntersectionTypeAnnotation", ...args);
-}
-
-function MixedTypeAnnotation(...args) {
- return (0, _builder.default)("MixedTypeAnnotation", ...args);
-}
-
-function EmptyTypeAnnotation(...args) {
- return (0, _builder.default)("EmptyTypeAnnotation", ...args);
-}
-
-function NullableTypeAnnotation(...args) {
- return (0, _builder.default)("NullableTypeAnnotation", ...args);
-}
-
-function NumberLiteralTypeAnnotation(...args) {
- return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args);
-}
-
-function NumberTypeAnnotation(...args) {
- return (0, _builder.default)("NumberTypeAnnotation", ...args);
-}
-
-function ObjectTypeAnnotation(...args) {
- return (0, _builder.default)("ObjectTypeAnnotation", ...args);
-}
-
-function ObjectTypeInternalSlot(...args) {
- return (0, _builder.default)("ObjectTypeInternalSlot", ...args);
-}
-
-function ObjectTypeCallProperty(...args) {
- return (0, _builder.default)("ObjectTypeCallProperty", ...args);
-}
-
-function ObjectTypeIndexer(...args) {
- return (0, _builder.default)("ObjectTypeIndexer", ...args);
-}
-
-function ObjectTypeProperty(...args) {
- return (0, _builder.default)("ObjectTypeProperty", ...args);
-}
-
-function ObjectTypeSpreadProperty(...args) {
- return (0, _builder.default)("ObjectTypeSpreadProperty", ...args);
-}
-
-function OpaqueType(...args) {
- return (0, _builder.default)("OpaqueType", ...args);
-}
-
-function QualifiedTypeIdentifier(...args) {
- return (0, _builder.default)("QualifiedTypeIdentifier", ...args);
-}
-
-function StringLiteralTypeAnnotation(...args) {
- return (0, _builder.default)("StringLiteralTypeAnnotation", ...args);
-}
-
-function StringTypeAnnotation(...args) {
- return (0, _builder.default)("StringTypeAnnotation", ...args);
-}
-
-function ThisTypeAnnotation(...args) {
- return (0, _builder.default)("ThisTypeAnnotation", ...args);
-}
-
-function TupleTypeAnnotation(...args) {
- return (0, _builder.default)("TupleTypeAnnotation", ...args);
-}
-
-function TypeofTypeAnnotation(...args) {
- return (0, _builder.default)("TypeofTypeAnnotation", ...args);
-}
-
-function TypeAlias(...args) {
- return (0, _builder.default)("TypeAlias", ...args);
-}
-
-function TypeAnnotation(...args) {
- return (0, _builder.default)("TypeAnnotation", ...args);
-}
-
-function TypeCastExpression(...args) {
- return (0, _builder.default)("TypeCastExpression", ...args);
-}
-
-function TypeParameter(...args) {
- return (0, _builder.default)("TypeParameter", ...args);
-}
-
-function TypeParameterDeclaration(...args) {
- return (0, _builder.default)("TypeParameterDeclaration", ...args);
-}
-
-function TypeParameterInstantiation(...args) {
- return (0, _builder.default)("TypeParameterInstantiation", ...args);
-}
-
-function UnionTypeAnnotation(...args) {
- return (0, _builder.default)("UnionTypeAnnotation", ...args);
-}
-
-function Variance(...args) {
- return (0, _builder.default)("Variance", ...args);
-}
-
-function VoidTypeAnnotation(...args) {
- return (0, _builder.default)("VoidTypeAnnotation", ...args);
-}
-
-function JSXAttribute(...args) {
- return (0, _builder.default)("JSXAttribute", ...args);
-}
-
-function JSXClosingElement(...args) {
- return (0, _builder.default)("JSXClosingElement", ...args);
-}
-
-function JSXElement(...args) {
- return (0, _builder.default)("JSXElement", ...args);
-}
-
-function JSXEmptyExpression(...args) {
- return (0, _builder.default)("JSXEmptyExpression", ...args);
-}
-
-function JSXExpressionContainer(...args) {
- return (0, _builder.default)("JSXExpressionContainer", ...args);
-}
-
-function JSXSpreadChild(...args) {
- return (0, _builder.default)("JSXSpreadChild", ...args);
-}
-
-function JSXIdentifier(...args) {
- return (0, _builder.default)("JSXIdentifier", ...args);
-}
-
-function JSXMemberExpression(...args) {
- return (0, _builder.default)("JSXMemberExpression", ...args);
-}
-
-function JSXNamespacedName(...args) {
- return (0, _builder.default)("JSXNamespacedName", ...args);
-}
-
-function JSXOpeningElement(...args) {
- return (0, _builder.default)("JSXOpeningElement", ...args);
-}
-
-function JSXSpreadAttribute(...args) {
- return (0, _builder.default)("JSXSpreadAttribute", ...args);
-}
-
-function JSXText(...args) {
- return (0, _builder.default)("JSXText", ...args);
-}
-
-function JSXFragment(...args) {
- return (0, _builder.default)("JSXFragment", ...args);
-}
-
-function JSXOpeningFragment(...args) {
- return (0, _builder.default)("JSXOpeningFragment", ...args);
-}
-
-function JSXClosingFragment(...args) {
- return (0, _builder.default)("JSXClosingFragment", ...args);
-}
-
-function Noop(...args) {
- return (0, _builder.default)("Noop", ...args);
-}
-
-function Placeholder(...args) {
- return (0, _builder.default)("Placeholder", ...args);
-}
-
-function ArgumentPlaceholder(...args) {
- return (0, _builder.default)("ArgumentPlaceholder", ...args);
-}
-
-function AwaitExpression(...args) {
- return (0, _builder.default)("AwaitExpression", ...args);
-}
-
-function BindExpression(...args) {
- return (0, _builder.default)("BindExpression", ...args);
-}
-
-function ClassProperty(...args) {
- return (0, _builder.default)("ClassProperty", ...args);
-}
-
-function OptionalMemberExpression(...args) {
- return (0, _builder.default)("OptionalMemberExpression", ...args);
-}
-
-function PipelineTopicExpression(...args) {
- return (0, _builder.default)("PipelineTopicExpression", ...args);
-}
-
-function PipelineBareFunction(...args) {
- return (0, _builder.default)("PipelineBareFunction", ...args);
-}
-
-function PipelinePrimaryTopicReference(...args) {
- return (0, _builder.default)("PipelinePrimaryTopicReference", ...args);
-}
-
-function OptionalCallExpression(...args) {
- return (0, _builder.default)("OptionalCallExpression", ...args);
-}
-
-function ClassPrivateProperty(...args) {
- return (0, _builder.default)("ClassPrivateProperty", ...args);
-}
-
-function ClassPrivateMethod(...args) {
- return (0, _builder.default)("ClassPrivateMethod", ...args);
-}
-
-function Import(...args) {
- return (0, _builder.default)("Import", ...args);
-}
-
-function Decorator(...args) {
- return (0, _builder.default)("Decorator", ...args);
-}
-
-function DoExpression(...args) {
- return (0, _builder.default)("DoExpression", ...args);
-}
-
-function ExportDefaultSpecifier(...args) {
- return (0, _builder.default)("ExportDefaultSpecifier", ...args);
-}
-
-function ExportNamespaceSpecifier(...args) {
- return (0, _builder.default)("ExportNamespaceSpecifier", ...args);
-}
-
-function PrivateName(...args) {
- return (0, _builder.default)("PrivateName", ...args);
-}
-
-function BigIntLiteral(...args) {
- return (0, _builder.default)("BigIntLiteral", ...args);
-}
-
-function TSParameterProperty(...args) {
- return (0, _builder.default)("TSParameterProperty", ...args);
-}
-
-function TSDeclareFunction(...args) {
- return (0, _builder.default)("TSDeclareFunction", ...args);
-}
-
-function TSDeclareMethod(...args) {
- return (0, _builder.default)("TSDeclareMethod", ...args);
-}
-
-function TSQualifiedName(...args) {
- return (0, _builder.default)("TSQualifiedName", ...args);
-}
-
-function TSCallSignatureDeclaration(...args) {
- return (0, _builder.default)("TSCallSignatureDeclaration", ...args);
-}
-
-function TSConstructSignatureDeclaration(...args) {
- return (0, _builder.default)("TSConstructSignatureDeclaration", ...args);
-}
-
-function TSPropertySignature(...args) {
- return (0, _builder.default)("TSPropertySignature", ...args);
-}
-
-function TSMethodSignature(...args) {
- return (0, _builder.default)("TSMethodSignature", ...args);
-}
-
-function TSIndexSignature(...args) {
- return (0, _builder.default)("TSIndexSignature", ...args);
-}
-
-function TSAnyKeyword(...args) {
- return (0, _builder.default)("TSAnyKeyword", ...args);
-}
-
-function TSUnknownKeyword(...args) {
- return (0, _builder.default)("TSUnknownKeyword", ...args);
-}
-
-function TSNumberKeyword(...args) {
- return (0, _builder.default)("TSNumberKeyword", ...args);
-}
-
-function TSObjectKeyword(...args) {
- return (0, _builder.default)("TSObjectKeyword", ...args);
-}
-
-function TSBooleanKeyword(...args) {
- return (0, _builder.default)("TSBooleanKeyword", ...args);
-}
-
-function TSStringKeyword(...args) {
- return (0, _builder.default)("TSStringKeyword", ...args);
-}
-
-function TSSymbolKeyword(...args) {
- return (0, _builder.default)("TSSymbolKeyword", ...args);
-}
-
-function TSVoidKeyword(...args) {
- return (0, _builder.default)("TSVoidKeyword", ...args);
-}
-
-function TSUndefinedKeyword(...args) {
- return (0, _builder.default)("TSUndefinedKeyword", ...args);
-}
-
-function TSNullKeyword(...args) {
- return (0, _builder.default)("TSNullKeyword", ...args);
-}
-
-function TSNeverKeyword(...args) {
- return (0, _builder.default)("TSNeverKeyword", ...args);
-}
-
-function TSThisType(...args) {
- return (0, _builder.default)("TSThisType", ...args);
-}
-
-function TSFunctionType(...args) {
- return (0, _builder.default)("TSFunctionType", ...args);
-}
-
-function TSConstructorType(...args) {
- return (0, _builder.default)("TSConstructorType", ...args);
-}
-
-function TSTypeReference(...args) {
- return (0, _builder.default)("TSTypeReference", ...args);
-}
-
-function TSTypePredicate(...args) {
- return (0, _builder.default)("TSTypePredicate", ...args);
-}
-
-function TSTypeQuery(...args) {
- return (0, _builder.default)("TSTypeQuery", ...args);
-}
-
-function TSTypeLiteral(...args) {
- return (0, _builder.default)("TSTypeLiteral", ...args);
-}
-
-function TSArrayType(...args) {
- return (0, _builder.default)("TSArrayType", ...args);
-}
-
-function TSTupleType(...args) {
- return (0, _builder.default)("TSTupleType", ...args);
-}
-
-function TSOptionalType(...args) {
- return (0, _builder.default)("TSOptionalType", ...args);
-}
-
-function TSRestType(...args) {
- return (0, _builder.default)("TSRestType", ...args);
-}
-
-function TSUnionType(...args) {
- return (0, _builder.default)("TSUnionType", ...args);
-}
-
-function TSIntersectionType(...args) {
- return (0, _builder.default)("TSIntersectionType", ...args);
-}
-
-function TSConditionalType(...args) {
- return (0, _builder.default)("TSConditionalType", ...args);
-}
-
-function TSInferType(...args) {
- return (0, _builder.default)("TSInferType", ...args);
-}
-
-function TSParenthesizedType(...args) {
- return (0, _builder.default)("TSParenthesizedType", ...args);
-}
-
-function TSTypeOperator(...args) {
- return (0, _builder.default)("TSTypeOperator", ...args);
-}
-
-function TSIndexedAccessType(...args) {
- return (0, _builder.default)("TSIndexedAccessType", ...args);
-}
-
-function TSMappedType(...args) {
- return (0, _builder.default)("TSMappedType", ...args);
-}
-
-function TSLiteralType(...args) {
- return (0, _builder.default)("TSLiteralType", ...args);
-}
-
-function TSExpressionWithTypeArguments(...args) {
- return (0, _builder.default)("TSExpressionWithTypeArguments", ...args);
-}
-
-function TSInterfaceDeclaration(...args) {
- return (0, _builder.default)("TSInterfaceDeclaration", ...args);
-}
-
-function TSInterfaceBody(...args) {
- return (0, _builder.default)("TSInterfaceBody", ...args);
-}
-
-function TSTypeAliasDeclaration(...args) {
- return (0, _builder.default)("TSTypeAliasDeclaration", ...args);
-}
-
-function TSAsExpression(...args) {
- return (0, _builder.default)("TSAsExpression", ...args);
-}
-
-function TSTypeAssertion(...args) {
- return (0, _builder.default)("TSTypeAssertion", ...args);
-}
-
-function TSEnumDeclaration(...args) {
- return (0, _builder.default)("TSEnumDeclaration", ...args);
-}
-
-function TSEnumMember(...args) {
- return (0, _builder.default)("TSEnumMember", ...args);
-}
-
-function TSModuleDeclaration(...args) {
- return (0, _builder.default)("TSModuleDeclaration", ...args);
-}
-
-function TSModuleBlock(...args) {
- return (0, _builder.default)("TSModuleBlock", ...args);
-}
-
-function TSImportType(...args) {
- return (0, _builder.default)("TSImportType", ...args);
-}
-
-function TSImportEqualsDeclaration(...args) {
- return (0, _builder.default)("TSImportEqualsDeclaration", ...args);
-}
-
-function TSExternalModuleReference(...args) {
- return (0, _builder.default)("TSExternalModuleReference", ...args);
-}
-
-function TSNonNullExpression(...args) {
- return (0, _builder.default)("TSNonNullExpression", ...args);
-}
-
-function TSExportAssignment(...args) {
- return (0, _builder.default)("TSExportAssignment", ...args);
-}
-
-function TSNamespaceExportDeclaration(...args) {
- return (0, _builder.default)("TSNamespaceExportDeclaration", ...args);
-}
-
-function TSTypeAnnotation(...args) {
- return (0, _builder.default)("TSTypeAnnotation", ...args);
-}
-
-function TSTypeParameterInstantiation(...args) {
- return (0, _builder.default)("TSTypeParameterInstantiation", ...args);
-}
-
-function TSTypeParameterDeclaration(...args) {
- return (0, _builder.default)("TSTypeParameterDeclaration", ...args);
-}
-
-function TSTypeParameter(...args) {
- return (0, _builder.default)("TSTypeParameter", ...args);
-}
-
-function NumberLiteral(...args) {
- console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
- return NumberLiteral("NumberLiteral", ...args);
-}
-
-function RegexLiteral(...args) {
- console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
- return RegexLiteral("RegexLiteral", ...args);
-}
-
-function RestProperty(...args) {
- console.trace("The node type RestProperty has been renamed to RestElement");
- return RestProperty("RestProperty", ...args);
-}
-
-function SpreadProperty(...args) {
- console.trace("The node type SpreadProperty has been renamed to SpreadElement");
- return SpreadProperty("SpreadProperty", ...args);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js
deleted file mode 100644
index ce9cb8c1f32..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneNode.js
+++ /dev/null
@@ -1,78 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = cloneNode;
-
-var _definitions = require("../definitions");
-
-const has = Function.call.bind(Object.prototype.hasOwnProperty);
-
-function cloneIfNode(obj, deep) {
- if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") {
- return cloneNode(obj, deep);
- }
-
- return obj;
-}
-
-function cloneIfNodeOrArray(obj, deep) {
- if (Array.isArray(obj)) {
- return obj.map(node => cloneIfNode(node, deep));
- }
-
- return cloneIfNode(obj, deep);
-}
-
-function cloneNode(node, deep = true) {
- if (!node) return node;
- const {
- type
- } = node;
- const newNode = {
- type
- };
-
- if (type === "Identifier") {
- newNode.name = node.name;
-
- if (has(node, "optional") && typeof node.optional === "boolean") {
- newNode.optional = node.optional;
- }
-
- if (has(node, "typeAnnotation")) {
- newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation;
- }
- } else if (!has(_definitions.NODE_FIELDS, type)) {
- throw new Error(`Unknown node type: "${type}"`);
- } else {
- for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
- if (has(node, field)) {
- newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field];
- }
- }
- }
-
- if (has(node, "loc")) {
- newNode.loc = node.loc;
- }
-
- if (has(node, "leadingComments")) {
- newNode.leadingComments = node.leadingComments;
- }
-
- if (has(node, "innerComments")) {
- newNode.innerComments = node.innerComments;
- }
-
- if (has(node, "trailingComments")) {
- newNode.trailingComments = node.trailingComments;
- }
-
- if (has(node, "extra")) {
- newNode.extra = Object.assign({}, node.extra);
- }
-
- return newNode;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
deleted file mode 100644
index 5622af7b022..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = cloneWithoutLoc;
-
-var _clone = _interopRequireDefault(require("./clone"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function cloneWithoutLoc(node) {
- const newNode = (0, _clone.default)(node);
- newNode.loc = null;
- return newNode;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js
deleted file mode 100644
index 6072495e206..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/generated/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
-
-var _definitions = require("../../definitions");
-
-const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
-exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
-const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
-exports.BINARY_TYPES = BINARY_TYPES;
-const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
-exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
-const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
-exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
-const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
-exports.BLOCK_TYPES = BLOCK_TYPES;
-const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
-exports.STATEMENT_TYPES = STATEMENT_TYPES;
-const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
-exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
-const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
-exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
-const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
-exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
-const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
-exports.LOOP_TYPES = LOOP_TYPES;
-const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
-exports.WHILE_TYPES = WHILE_TYPES;
-const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
-exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
-const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
-exports.FOR_TYPES = FOR_TYPES;
-const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
-exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
-const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
-exports.FUNCTION_TYPES = FUNCTION_TYPES;
-const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
-exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
-const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
-exports.PUREISH_TYPES = PUREISH_TYPES;
-const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
-exports.DECLARATION_TYPES = DECLARATION_TYPES;
-const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
-exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
-const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
-exports.LVAL_TYPES = LVAL_TYPES;
-const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
-exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
-const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
-exports.LITERAL_TYPES = LITERAL_TYPES;
-const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
-exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
-const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
-exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
-const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
-exports.METHOD_TYPES = METHOD_TYPES;
-const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
-exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
-const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
-exports.PROPERTY_TYPES = PROPERTY_TYPES;
-const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
-exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
-const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
-exports.PATTERN_TYPES = PATTERN_TYPES;
-const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
-exports.CLASS_TYPES = CLASS_TYPES;
-const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
-exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
-const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
-exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
-const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
-exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
-const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
-exports.FLOW_TYPES = FLOW_TYPES;
-const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
-exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
-const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
-exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
-const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
-exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
-const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
-exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
-const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
-exports.JSX_TYPES = JSX_TYPES;
-const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
-exports.PRIVATE_TYPES = PRIVATE_TYPES;
-const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
-exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
-const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
-exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js
deleted file mode 100644
index a60b106fdad..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/constants/index.js
+++ /dev/null
@@ -1,47 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
-const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
-exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
-const FLATTENABLE_KEYS = ["body", "expressions"];
-exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
-const FOR_INIT_KEYS = ["left", "init"];
-exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
-const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
-exports.COMMENT_KEYS = COMMENT_KEYS;
-const LOGICAL_OPERATORS = ["||", "&&", "??"];
-exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
-const UPDATE_OPERATORS = ["++", "--"];
-exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
-const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
-exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
-const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
-exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
-const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
-exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
-const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
-exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
-const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
-exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
-const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
-exports.BINARY_OPERATORS = BINARY_OPERATORS;
-const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
-exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
-const NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
-exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
-const STRING_UNARY_OPERATORS = ["typeof"];
-exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
-const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
-exports.UNARY_OPERATORS = UNARY_OPERATORS;
-const INHERIT_KEYS = {
- optional: ["typeAnnotation", "typeParameters", "returnType"],
- force: ["start", "loc", "end"]
-};
-exports.INHERIT_KEYS = INHERIT_KEYS;
-const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
-exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
-const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
-exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
deleted file mode 100644
index fadd0f04be0..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
+++ /dev/null
@@ -1,73 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = gatherSequenceExpressions;
-
-var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers"));
-
-var _generated = require("../validators/generated");
-
-var _generated2 = require("../builders/generated");
-
-var _cloneNode = _interopRequireDefault(require("../clone/cloneNode"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function gatherSequenceExpressions(nodes, scope, declars) {
- const exprs = [];
- let ensureLastUndefined = true;
-
- for (const node of nodes) {
- ensureLastUndefined = false;
-
- if ((0, _generated.isExpression)(node)) {
- exprs.push(node);
- } else if ((0, _generated.isExpressionStatement)(node)) {
- exprs.push(node.expression);
- } else if ((0, _generated.isVariableDeclaration)(node)) {
- if (node.kind !== "var") return;
-
- for (const declar of node.declarations) {
- const bindings = (0, _getBindingIdentifiers.default)(declar);
-
- for (const key of Object.keys(bindings)) {
- declars.push({
- kind: node.kind,
- id: (0, _cloneNode.default)(bindings[key])
- });
- }
-
- if (declar.init) {
- exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
- }
- }
-
- ensureLastUndefined = true;
- } else if ((0, _generated.isIfStatement)(node)) {
- const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
- const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
- if (!consequent || !alternate) return;
- exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
- } else if ((0, _generated.isBlockStatement)(node)) {
- const body = gatherSequenceExpressions(node.body, scope, declars);
- if (!body) return;
- exprs.push(body);
- } else if ((0, _generated.isEmptyStatement)(node)) {
- ensureLastUndefined = true;
- } else {
- return;
- }
- }
-
- if (ensureLastUndefined) {
- exprs.push(scope.buildUndefinedNode());
- }
-
- if (exprs.length === 1) {
- return exprs[0];
- } else {
- return (0, _generated2.sequenceExpression)(exprs);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js
deleted file mode 100644
index 2e221db4e07..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js
+++ /dev/null
@@ -1,23 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = toSequenceExpression;
-
-var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function toSequenceExpression(nodes, scope) {
- if (!nodes || !nodes.length) return;
- const declars = [];
- const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
- if (!result) return;
-
- for (const declar of declars) {
- scope.push(declar);
- }
-
- return result;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/valueToNode.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/valueToNode.js
deleted file mode 100644
index 9e19dbfa76a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/converters/valueToNode.js
+++ /dev/null
@@ -1,104 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = valueToNode;
-
-function _isPlainObject() {
- const data = _interopRequireDefault(require("lodash/isPlainObject"));
-
- _isPlainObject = function () {
- return data;
- };
-
- return data;
-}
-
-function _isRegExp() {
- const data = _interopRequireDefault(require("lodash/isRegExp"));
-
- _isRegExp = function () {
- return data;
- };
-
- return data;
-}
-
-var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
-
-var _generated = require("../builders/generated");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function valueToNode(value) {
- if (value === undefined) {
- return (0, _generated.identifier)("undefined");
- }
-
- if (value === true || value === false) {
- return (0, _generated.booleanLiteral)(value);
- }
-
- if (value === null) {
- return (0, _generated.nullLiteral)();
- }
-
- if (typeof value === "string") {
- return (0, _generated.stringLiteral)(value);
- }
-
- if (typeof value === "number") {
- let result;
-
- if (Number.isFinite(value)) {
- result = (0, _generated.numericLiteral)(Math.abs(value));
- } else {
- let numerator;
-
- if (Number.isNaN(value)) {
- numerator = (0, _generated.numericLiteral)(0);
- } else {
- numerator = (0, _generated.numericLiteral)(1);
- }
-
- result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
- }
-
- if (value < 0 || Object.is(value, -0)) {
- result = (0, _generated.unaryExpression)("-", result);
- }
-
- return result;
- }
-
- if ((0, _isRegExp().default)(value)) {
- const pattern = value.source;
- const flags = value.toString().match(/\/([a-z]+|)$/)[1];
- return (0, _generated.regExpLiteral)(pattern, flags);
- }
-
- if (Array.isArray(value)) {
- return (0, _generated.arrayExpression)(value.map(valueToNode));
- }
-
- if ((0, _isPlainObject().default)(value)) {
- const props = [];
-
- for (const key of Object.keys(value)) {
- let nodeKey;
-
- if ((0, _isValidIdentifier.default)(key)) {
- nodeKey = (0, _generated.identifier)(key);
- } else {
- nodeKey = (0, _generated.stringLiteral)(key);
- }
-
- props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
- }
-
- return (0, _generated.objectExpression)(props);
- }
-
- throw new Error("don't know how to turn this value into a node");
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js
deleted file mode 100644
index d759890cf57..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/core.js
+++ /dev/null
@@ -1,725 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
-
-var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
-
-var _constants = require("../constants");
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-(0, _utils.default)("ArrayExpression", {
- fields: {
- elements: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
- default: []
- }
- },
- visitor: ["elements"],
- aliases: ["Expression"]
-});
-(0, _utils.default)("AssignmentExpression", {
- fields: {
- operator: {
- validate: (0, _utils.assertValueType)("string")
- },
- left: {
- validate: (0, _utils.assertNodeType)("LVal")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- },
- builder: ["operator", "left", "right"],
- visitor: ["left", "right"],
- aliases: ["Expression"]
-});
-(0, _utils.default)("BinaryExpression", {
- builder: ["operator", "left", "right"],
- fields: {
- operator: {
- validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
- },
- left: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- },
- visitor: ["left", "right"],
- aliases: ["Binary", "Expression"]
-});
-(0, _utils.default)("InterpreterDirective", {
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("string")
- }
- }
-});
-(0, _utils.default)("Directive", {
- visitor: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertNodeType)("DirectiveLiteral")
- }
- }
-});
-(0, _utils.default)("DirectiveLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("string")
- }
- }
-});
-(0, _utils.default)("BlockStatement", {
- builder: ["body", "directives"],
- visitor: ["directives", "body"],
- fields: {
- directives: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
- default: []
- },
- body: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
- }
- },
- aliases: ["Scopable", "BlockParent", "Block", "Statement"]
-});
-(0, _utils.default)("BreakStatement", {
- visitor: ["label"],
- fields: {
- label: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- }
- },
- aliases: ["Statement", "Terminatorless", "CompletionStatement"]
-});
-(0, _utils.default)("CallExpression", {
- visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
- builder: ["callee", "arguments"],
- aliases: ["Expression"],
- fields: {
- callee: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- arguments: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
- },
- optional: {
- validate: (0, _utils.assertOneOf)(true, false),
- optional: true
- },
- typeArguments: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
- optional: true
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
- optional: true
- }
- }
-});
-(0, _utils.default)("CatchClause", {
- visitor: ["param", "body"],
- fields: {
- param: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- },
- aliases: ["Scopable", "BlockParent"]
-});
-(0, _utils.default)("ConditionalExpression", {
- visitor: ["test", "consequent", "alternate"],
- fields: {
- test: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- consequent: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- alternate: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- },
- aliases: ["Expression", "Conditional"]
-});
-(0, _utils.default)("ContinueStatement", {
- visitor: ["label"],
- fields: {
- label: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- }
- },
- aliases: ["Statement", "Terminatorless", "CompletionStatement"]
-});
-(0, _utils.default)("DebuggerStatement", {
- aliases: ["Statement"]
-});
-(0, _utils.default)("DoWhileStatement", {
- visitor: ["test", "body"],
- fields: {
- test: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- body: {
- validate: (0, _utils.assertNodeType)("Statement")
- }
- },
- aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
-});
-(0, _utils.default)("EmptyStatement", {
- aliases: ["Statement"]
-});
-(0, _utils.default)("ExpressionStatement", {
- visitor: ["expression"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- },
- aliases: ["Statement", "ExpressionWrapper"]
-});
-(0, _utils.default)("File", {
- builder: ["program", "comments", "tokens"],
- visitor: ["program"],
- fields: {
- program: {
- validate: (0, _utils.assertNodeType)("Program")
- }
- }
-});
-(0, _utils.default)("ForInStatement", {
- visitor: ["left", "right", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
- fields: {
- left: {
- validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- body: {
- validate: (0, _utils.assertNodeType)("Statement")
- }
- }
-});
-(0, _utils.default)("ForStatement", {
- visitor: ["init", "test", "update", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
- fields: {
- init: {
- validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
- optional: true
- },
- test: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- },
- update: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- },
- body: {
- validate: (0, _utils.assertNodeType)("Statement")
- }
- }
-});
-const functionCommon = {
- params: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
- },
- generator: {
- default: false,
- validate: (0, _utils.assertValueType)("boolean")
- },
- async: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- }
-};
-exports.functionCommon = functionCommon;
-const functionTypeAnnotationCommon = {
- returnType: {
- validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
- optional: true
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
- optional: true
- }
-};
-exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
-const functionDeclarationCommon = Object.assign({}, functionCommon, {
- declare: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- id: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- }
-});
-exports.functionDeclarationCommon = functionDeclarationCommon;
-(0, _utils.default)("FunctionDeclaration", {
- builder: ["id", "params", "body", "generator", "async"],
- visitor: ["id", "params", "body", "returnType", "typeParameters"],
- fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- }),
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"]
-});
-(0, _utils.default)("FunctionExpression", {
- inherits: "FunctionDeclaration",
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
- fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
- id: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- })
-});
-const patternLikeCommon = {
- typeAnnotation: {
- validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
- optional: true
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
- }
-};
-exports.patternLikeCommon = patternLikeCommon;
-(0, _utils.default)("Identifier", {
- builder: ["name"],
- visitor: ["typeAnnotation", "decorators"],
- aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
- fields: Object.assign({}, patternLikeCommon, {
- name: {
- validate: (0, _utils.chain)(function (node, key, val) {
- if (!(0, _isValidIdentifier.default)(val)) {}
- }, (0, _utils.assertValueType)("string"))
- },
- optional: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- }
- })
-});
-(0, _utils.default)("IfStatement", {
- visitor: ["test", "consequent", "alternate"],
- aliases: ["Statement", "Conditional"],
- fields: {
- test: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- consequent: {
- validate: (0, _utils.assertNodeType)("Statement")
- },
- alternate: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Statement")
- }
- }
-});
-(0, _utils.default)("LabeledStatement", {
- visitor: ["label", "body"],
- aliases: ["Statement"],
- fields: {
- label: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- body: {
- validate: (0, _utils.assertNodeType)("Statement")
- }
- }
-});
-(0, _utils.default)("StringLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("string")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
-});
-(0, _utils.default)("NumericLiteral", {
- builder: ["value"],
- deprecatedAlias: "NumberLiteral",
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("number")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
-});
-(0, _utils.default)("NullLiteral", {
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
-});
-(0, _utils.default)("BooleanLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("boolean")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
-});
-(0, _utils.default)("RegExpLiteral", {
- builder: ["pattern", "flags"],
- deprecatedAlias: "RegexLiteral",
- aliases: ["Expression", "Literal"],
- fields: {
- pattern: {
- validate: (0, _utils.assertValueType)("string")
- },
- flags: {
- validate: (0, _utils.assertValueType)("string"),
- default: ""
- }
- }
-});
-(0, _utils.default)("LogicalExpression", {
- builder: ["operator", "left", "right"],
- visitor: ["left", "right"],
- aliases: ["Binary", "Expression"],
- fields: {
- operator: {
- validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
- },
- left: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("MemberExpression", {
- builder: ["object", "property", "computed", "optional"],
- visitor: ["object", "property"],
- aliases: ["Expression", "LVal"],
- fields: {
- object: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- property: {
- validate: function () {
- const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
- const computed = (0, _utils.assertNodeType)("Expression");
- return function (node, key, val) {
- const validator = node.computed ? computed : normal;
- validator(node, key, val);
- };
- }()
- },
- computed: {
- default: false
- },
- optional: {
- validate: (0, _utils.assertOneOf)(true, false),
- optional: true
- }
- }
-});
-(0, _utils.default)("NewExpression", {
- inherits: "CallExpression"
-});
-(0, _utils.default)("Program", {
- visitor: ["directives", "body"],
- builder: ["body", "directives", "sourceType", "interpreter"],
- fields: {
- sourceFile: {
- validate: (0, _utils.assertValueType)("string")
- },
- sourceType: {
- validate: (0, _utils.assertOneOf)("script", "module"),
- default: "script"
- },
- interpreter: {
- validate: (0, _utils.assertNodeType)("InterpreterDirective"),
- default: null,
- optional: true
- },
- directives: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
- default: []
- },
- body: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
- }
- },
- aliases: ["Scopable", "BlockParent", "Block"]
-});
-(0, _utils.default)("ObjectExpression", {
- visitor: ["properties"],
- aliases: ["Expression"],
- fields: {
- properties: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
- }
- }
-});
-(0, _utils.default)("ObjectMethod", {
- builder: ["kind", "key", "params", "body", "computed"],
- fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
- kind: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")),
- default: "method"
- },
- computed: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- },
- key: {
- validate: function () {
- const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- const computed = (0, _utils.assertNodeType)("Expression");
- return function (node, key, val) {
- const validator = node.computed ? computed : normal;
- validator(node, key, val);
- };
- }()
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- }),
- visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
- aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
-});
-(0, _utils.default)("ObjectProperty", {
- builder: ["key", "value", "computed", "shorthand", "decorators"],
- fields: {
- computed: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- },
- key: {
- validate: function () {
- const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- const computed = (0, _utils.assertNodeType)("Expression");
- return function (node, key, val) {
- const validator = node.computed ? computed : normal;
- validator(node, key, val);
- };
- }()
- },
- value: {
- validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
- },
- shorthand: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
- optional: true
- }
- },
- visitor: ["key", "value", "decorators"],
- aliases: ["UserWhitespacable", "Property", "ObjectMember"]
-});
-(0, _utils.default)("RestElement", {
- visitor: ["argument", "typeAnnotation"],
- builder: ["argument"],
- aliases: ["LVal", "PatternLike"],
- deprecatedAlias: "RestProperty",
- fields: Object.assign({}, patternLikeCommon, {
- argument: {
- validate: (0, _utils.assertNodeType)("LVal")
- }
- })
-});
-(0, _utils.default)("ReturnStatement", {
- visitor: ["argument"],
- aliases: ["Statement", "Terminatorless", "CompletionStatement"],
- fields: {
- argument: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- }
- }
-});
-(0, _utils.default)("SequenceExpression", {
- visitor: ["expressions"],
- fields: {
- expressions: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
- }
- },
- aliases: ["Expression"]
-});
-(0, _utils.default)("ParenthesizedExpression", {
- visitor: ["expression"],
- aliases: ["Expression", "ExpressionWrapper"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("SwitchCase", {
- visitor: ["test", "consequent"],
- fields: {
- test: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- },
- consequent: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
- }
- }
-});
-(0, _utils.default)("SwitchStatement", {
- visitor: ["discriminant", "cases"],
- aliases: ["Statement", "BlockParent", "Scopable"],
- fields: {
- discriminant: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- cases: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
- }
- }
-});
-(0, _utils.default)("ThisExpression", {
- aliases: ["Expression"]
-});
-(0, _utils.default)("ThrowStatement", {
- visitor: ["argument"],
- aliases: ["Statement", "Terminatorless", "CompletionStatement"],
- fields: {
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("TryStatement", {
- visitor: ["block", "handler", "finalizer"],
- aliases: ["Statement"],
- fields: {
- block: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- },
- handler: {
- optional: true,
- validate: (0, _utils.assertNodeType)("CatchClause")
- },
- finalizer: {
- optional: true,
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- }
-});
-(0, _utils.default)("UnaryExpression", {
- builder: ["operator", "argument", "prefix"],
- fields: {
- prefix: {
- default: true
- },
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- operator: {
- validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
- }
- },
- visitor: ["argument"],
- aliases: ["UnaryLike", "Expression"]
-});
-(0, _utils.default)("UpdateExpression", {
- builder: ["operator", "argument", "prefix"],
- fields: {
- prefix: {
- default: false
- },
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- operator: {
- validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
- }
- },
- visitor: ["argument"],
- aliases: ["Expression"]
-});
-(0, _utils.default)("VariableDeclaration", {
- builder: ["kind", "declarations"],
- visitor: ["declarations"],
- aliases: ["Statement", "Declaration"],
- fields: {
- declare: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- kind: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const"))
- },
- declarations: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
- }
- }
-});
-(0, _utils.default)("VariableDeclarator", {
- visitor: ["id", "init"],
- fields: {
- id: {
- validate: (0, _utils.assertNodeType)("LVal")
- },
- definite: {
- optional: true,
- validate: (0, _utils.assertValueType)("boolean")
- },
- init: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("WhileStatement", {
- visitor: ["test", "body"],
- aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
- fields: {
- test: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement", "Statement")
- }
- }
-});
-(0, _utils.default)("WithStatement", {
- visitor: ["object", "body"],
- aliases: ["Statement"],
- fields: {
- object: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement", "Statement")
- }
- }
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js
deleted file mode 100644
index 71e01365390..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/es2015.js
+++ /dev/null
@@ -1,401 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0;
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-var _core = require("./core");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-(0, _utils.default)("AssignmentPattern", {
- visitor: ["left", "right", "decorators"],
- builder: ["left", "right"],
- aliases: ["Pattern", "PatternLike", "LVal"],
- fields: Object.assign({}, _core.patternLikeCommon, {
- left: {
- validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
- }
- })
-});
-(0, _utils.default)("ArrayPattern", {
- visitor: ["elements", "typeAnnotation"],
- builder: ["elements"],
- aliases: ["Pattern", "PatternLike", "LVal"],
- fields: Object.assign({}, _core.patternLikeCommon, {
- elements: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("PatternLike")))
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
- }
- })
-});
-(0, _utils.default)("ArrowFunctionExpression", {
- builder: ["params", "body", "async"],
- visitor: ["params", "body", "returnType", "typeParameters"],
- aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
- fields: Object.assign({}, _core.functionCommon, _core.functionTypeAnnotationCommon, {
- expression: {
- validate: (0, _utils.assertValueType)("boolean")
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
- }
- })
-});
-(0, _utils.default)("ClassBody", {
- visitor: ["body"],
- fields: {
- body: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
- }
- }
-});
-const classCommon = {
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
- optional: true
- },
- body: {
- validate: (0, _utils.assertNodeType)("ClassBody")
- },
- superClass: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Expression")
- },
- superTypeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
- optional: true
- },
- implements: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
- optional: true
- }
-};
-(0, _utils.default)("ClassDeclaration", {
- builder: ["id", "superClass", "body", "decorators"],
- visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
- aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"],
- fields: Object.assign({}, classCommon, {
- declare: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- abstract: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- id: {
- validate: (0, _utils.assertNodeType)("Identifier"),
- optional: true
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
- optional: true
- }
- })
-});
-(0, _utils.default)("ClassExpression", {
- inherits: "ClassDeclaration",
- aliases: ["Scopable", "Class", "Expression", "Pureish"],
- fields: Object.assign({}, classCommon, {
- id: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- body: {
- validate: (0, _utils.assertNodeType)("ClassBody")
- },
- superClass: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Expression")
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
- optional: true
- }
- })
-});
-(0, _utils.default)("ExportAllDeclaration", {
- visitor: ["source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- source: {
- validate: (0, _utils.assertNodeType)("StringLiteral")
- }
- }
-});
-(0, _utils.default)("ExportDefaultDeclaration", {
- visitor: ["declaration"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- declaration: {
- validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
- }
- }
-});
-(0, _utils.default)("ExportNamedDeclaration", {
- visitor: ["declaration", "specifiers", "source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
- fields: {
- declaration: {
- validate: (0, _utils.assertNodeType)("Declaration"),
- optional: true
- },
- specifiers: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier")))
- },
- source: {
- validate: (0, _utils.assertNodeType)("StringLiteral"),
- optional: true
- },
- exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
- }
-});
-(0, _utils.default)("ExportSpecifier", {
- visitor: ["local", "exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- exported: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("ForOfStatement", {
- visitor: ["left", "right", "body"],
- aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
- fields: {
- left: {
- validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal")
- },
- right: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- body: {
- validate: (0, _utils.assertNodeType)("Statement")
- },
- await: {
- default: false,
- validate: (0, _utils.assertValueType)("boolean")
- }
- }
-});
-(0, _utils.default)("ImportDeclaration", {
- visitor: ["specifiers", "source"],
- aliases: ["Statement", "Declaration", "ModuleDeclaration"],
- fields: {
- specifiers: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
- },
- source: {
- validate: (0, _utils.assertNodeType)("StringLiteral")
- },
- importKind: {
- validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
- optional: true
- }
- }
-});
-(0, _utils.default)("ImportDefaultSpecifier", {
- visitor: ["local"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("ImportNamespaceSpecifier", {
- visitor: ["local"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("ImportSpecifier", {
- visitor: ["local", "imported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- local: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- imported: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- importKind: {
- validate: (0, _utils.assertOneOf)("type", "typeof"),
- optional: true
- }
- }
-});
-(0, _utils.default)("MetaProperty", {
- visitor: ["meta", "property"],
- aliases: ["Expression"],
- fields: {
- meta: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- property: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-const classMethodOrPropertyCommon = {
- abstract: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- accessibility: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
- optional: true
- },
- static: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- computed: {
- default: false,
- validate: (0, _utils.assertValueType)("boolean")
- },
- optional: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- key: {
- validate: (0, _utils.chain)(function () {
- const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
- const computed = (0, _utils.assertNodeType)("Expression");
- return function (node, key, val) {
- const validator = node.computed ? computed : normal;
- validator(node, key, val);
- };
- }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
- }
-};
-exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
-const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, classMethodOrPropertyCommon, {
- kind: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("get", "set", "method", "constructor")),
- default: "method"
- },
- access: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
- optional: true
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
- optional: true
- }
-});
-exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
-(0, _utils.default)("ClassMethod", {
- aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
- builder: ["kind", "key", "params", "body", "computed", "static"],
- visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
- fields: Object.assign({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, {
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- })
-});
-(0, _utils.default)("ObjectPattern", {
- visitor: ["properties", "typeAnnotation", "decorators"],
- builder: ["properties"],
- aliases: ["Pattern", "PatternLike", "LVal"],
- fields: Object.assign({}, _core.patternLikeCommon, {
- properties: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
- }
- })
-});
-(0, _utils.default)("SpreadElement", {
- visitor: ["argument"],
- aliases: ["UnaryLike"],
- deprecatedAlias: "SpreadProperty",
- fields: {
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("Super", {
- aliases: ["Expression"]
-});
-(0, _utils.default)("TaggedTemplateExpression", {
- visitor: ["tag", "quasi"],
- aliases: ["Expression"],
- fields: {
- tag: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- quasi: {
- validate: (0, _utils.assertNodeType)("TemplateLiteral")
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
- optional: true
- }
- }
-});
-(0, _utils.default)("TemplateElement", {
- builder: ["value", "tail"],
- fields: {
- value: {
- validate: (0, _utils.assertShape)({
- raw: {
- validate: (0, _utils.assertValueType)("string")
- },
- cooked: {
- validate: (0, _utils.assertValueType)("string"),
- optional: true
- }
- })
- },
- tail: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- }
- }
-});
-(0, _utils.default)("TemplateLiteral", {
- visitor: ["quasis", "expressions"],
- aliases: ["Expression", "Literal"],
- fields: {
- quasis: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
- },
- expressions: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
- }
- }
-});
-(0, _utils.default)("YieldExpression", {
- builder: ["argument", "delegate"],
- visitor: ["argument"],
- aliases: ["Expression", "Terminatorless"],
- fields: {
- delegate: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- },
- argument: {
- optional: true,
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js
deleted file mode 100644
index 3332a600733..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/experimental.js
+++ /dev/null
@@ -1,205 +0,0 @@
-"use strict";
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-var _es = require("./es2015");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-(0, _utils.default)("ArgumentPlaceholder", {});
-(0, _utils.default)("AwaitExpression", {
- builder: ["argument"],
- visitor: ["argument"],
- aliases: ["Expression", "Terminatorless"],
- fields: {
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("BindExpression", {
- visitor: ["object", "callee"],
- aliases: ["Expression"],
- fields: {}
-});
-(0, _utils.default)("ClassProperty", {
- visitor: ["key", "value", "typeAnnotation", "decorators"],
- builder: ["key", "value", "typeAnnotation", "decorators", "computed"],
- aliases: ["Property"],
- fields: Object.assign({}, _es.classMethodOrPropertyCommon, {
- value: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- },
- definite: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- typeAnnotation: {
- validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
- optional: true
- },
- decorators: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
- optional: true
- },
- readonly: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- }
- })
-});
-(0, _utils.default)("OptionalMemberExpression", {
- builder: ["object", "property", "computed", "optional"],
- visitor: ["object", "property"],
- aliases: ["Expression"],
- fields: {
- object: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- property: {
- validate: function () {
- const normal = (0, _utils.assertNodeType)("Identifier");
- const computed = (0, _utils.assertNodeType)("Expression");
- return function (node, key, val) {
- const validator = node.computed ? computed : normal;
- validator(node, key, val);
- };
- }()
- },
- computed: {
- default: false
- },
- optional: {
- validate: (0, _utils.assertValueType)("boolean")
- }
- }
-});
-(0, _utils.default)("PipelineTopicExpression", {
- builder: ["expression"],
- visitor: ["expression"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("PipelineBareFunction", {
- builder: ["callee"],
- visitor: ["callee"],
- fields: {
- callee: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("PipelinePrimaryTopicReference", {
- aliases: ["Expression"]
-});
-(0, _utils.default)("OptionalCallExpression", {
- visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
- builder: ["callee", "arguments", "optional"],
- aliases: ["Expression"],
- fields: {
- callee: {
- validate: (0, _utils.assertNodeType)("Expression")
- },
- arguments: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName")))
- },
- optional: {
- validate: (0, _utils.assertValueType)("boolean")
- },
- typeArguments: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
- optional: true
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
- optional: true
- }
- }
-});
-(0, _utils.default)("ClassPrivateProperty", {
- visitor: ["key", "value"],
- builder: ["key", "value"],
- aliases: ["Property", "Private"],
- fields: {
- key: {
- validate: (0, _utils.assertNodeType)("PrivateName")
- },
- value: {
- validate: (0, _utils.assertNodeType)("Expression"),
- optional: true
- }
- }
-});
-(0, _utils.default)("ClassPrivateMethod", {
- builder: ["kind", "key", "params", "body", "static"],
- visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
- aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
- fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, {
- key: {
- validate: (0, _utils.assertNodeType)("PrivateName")
- },
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- })
-});
-(0, _utils.default)("Import", {
- aliases: ["Expression"]
-});
-(0, _utils.default)("Decorator", {
- visitor: ["expression"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("DoExpression", {
- visitor: ["body"],
- aliases: ["Expression"],
- fields: {
- body: {
- validate: (0, _utils.assertNodeType)("BlockStatement")
- }
- }
-});
-(0, _utils.default)("ExportDefaultSpecifier", {
- visitor: ["exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- exported: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("ExportNamespaceSpecifier", {
- visitor: ["exported"],
- aliases: ["ModuleSpecifier"],
- fields: {
- exported: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("PrivateName", {
- visitor: ["id"],
- aliases: ["Private"],
- fields: {
- id: {
- validate: (0, _utils.assertNodeType)("Identifier")
- }
- }
-});
-(0, _utils.default)("BigIntLiteral", {
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("string")
- }
- },
- aliases: ["Expression", "Pureish", "Literal", "Immutable"]
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js
deleted file mode 100644
index 07db5e38323..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/flow.js
+++ /dev/null
@@ -1,386 +0,0 @@
-"use strict";
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => {
- (0, _utils.default)(name, {
- builder: ["id", "typeParameters", "extends", "body"],
- visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
- extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
- mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
- implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
- body: (0, _utils.validateType)("ObjectTypeAnnotation")
- }
- });
-};
-
-(0, _utils.default)("AnyTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("ArrayTypeAnnotation", {
- visitor: ["elementType"],
- aliases: ["Flow", "FlowType"],
- fields: {
- elementType: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("BooleanTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("BooleanLiteralTypeAnnotation", {
- builder: ["value"],
- aliases: ["Flow", "FlowType"],
- fields: {
- value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("NullLiteralTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("ClassImplements", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
- }
-});
-defineInterfaceishType("DeclareClass");
-(0, _utils.default)("DeclareFunction", {
- visitor: ["id"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
- }
-});
-defineInterfaceishType("DeclareInterface");
-(0, _utils.default)("DeclareModule", {
- builder: ["id", "body", "kind"],
- visitor: ["id", "body"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
- body: (0, _utils.validateType)("BlockStatement"),
- kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
- }
-});
-(0, _utils.default)("DeclareModuleExports", {
- visitor: ["typeAnnotation"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
- }
-});
-(0, _utils.default)("DeclareTypeAlias", {
- visitor: ["id", "typeParameters", "right"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
- right: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("DeclareOpaqueType", {
- visitor: ["id", "typeParameters", "supertype"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
- supertype: (0, _utils.validateOptionalType)("FlowType")
- }
-});
-(0, _utils.default)("DeclareVariable", {
- visitor: ["id"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier")
- }
-});
-(0, _utils.default)("DeclareExportDeclaration", {
- visitor: ["declaration", "specifiers", "source"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- declaration: (0, _utils.validateOptionalType)("Flow"),
- specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
- source: (0, _utils.validateOptionalType)("StringLiteral"),
- default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("DeclareExportAllDeclaration", {
- visitor: ["source"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- source: (0, _utils.validateType)("StringLiteral"),
- exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
- }
-});
-(0, _utils.default)("DeclaredPredicate", {
- visitor: ["value"],
- aliases: ["Flow", "FlowPredicate"],
- fields: {
- value: (0, _utils.validateType)("Flow")
- }
-});
-(0, _utils.default)("ExistsTypeAnnotation", {
- aliases: ["Flow", "FlowType"]
-});
-(0, _utils.default)("FunctionTypeAnnotation", {
- visitor: ["typeParameters", "params", "rest", "returnType"],
- aliases: ["Flow", "FlowType"],
- fields: {
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
- params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
- rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
- returnType: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("FunctionTypeParam", {
- visitor: ["name", "typeAnnotation"],
- aliases: ["Flow"],
- fields: {
- name: (0, _utils.validateOptionalType)("Identifier"),
- typeAnnotation: (0, _utils.validateType)("FlowType"),
- optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("GenericTypeAnnotation", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow", "FlowType"],
- fields: {
- id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
- }
-});
-(0, _utils.default)("InferredPredicate", {
- aliases: ["Flow", "FlowPredicate"]
-});
-(0, _utils.default)("InterfaceExtends", {
- visitor: ["id", "typeParameters"],
- aliases: ["Flow"],
- fields: {
- id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
- }
-});
-defineInterfaceishType("InterfaceDeclaration");
-(0, _utils.default)("InterfaceTypeAnnotation", {
- visitor: ["extends", "body"],
- aliases: ["Flow", "FlowType"],
- fields: {
- extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
- body: (0, _utils.validateType)("ObjectTypeAnnotation")
- }
-});
-(0, _utils.default)("IntersectionTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow", "FlowType"],
- fields: {
- types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
- }
-});
-(0, _utils.default)("MixedTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("EmptyTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("NullableTypeAnnotation", {
- visitor: ["typeAnnotation"],
- aliases: ["Flow", "FlowType"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("NumberLiteralTypeAnnotation", {
- builder: ["value"],
- aliases: ["Flow", "FlowType"],
- fields: {
- value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
- }
-});
-(0, _utils.default)("NumberTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("ObjectTypeAnnotation", {
- visitor: ["properties", "indexers", "callProperties", "internalSlots"],
- aliases: ["Flow", "FlowType"],
- builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
- fields: {
- properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
- indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
- callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
- internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
- exact: {
- validate: (0, _utils.assertValueType)("boolean"),
- default: false
- },
- inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("ObjectTypeInternalSlot", {
- visitor: ["id", "value", "optional", "static", "method"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- value: (0, _utils.validateType)("FlowType"),
- optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("ObjectTypeCallProperty", {
- visitor: ["value"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- value: (0, _utils.validateType)("FlowType"),
- static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
- }
-});
-(0, _utils.default)("ObjectTypeIndexer", {
- visitor: ["id", "key", "value", "variance"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- id: (0, _utils.validateOptionalType)("Identifier"),
- key: (0, _utils.validateType)("FlowType"),
- value: (0, _utils.validateType)("FlowType"),
- static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- variance: (0, _utils.validateOptionalType)("Variance")
- }
-});
-(0, _utils.default)("ObjectTypeProperty", {
- visitor: ["key", "value", "variance"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
- value: (0, _utils.validateType)("FlowType"),
- kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
- static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
- variance: (0, _utils.validateOptionalType)("Variance")
- }
-});
-(0, _utils.default)("ObjectTypeSpreadProperty", {
- visitor: ["argument"],
- aliases: ["Flow", "UserWhitespacable"],
- fields: {
- argument: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("OpaqueType", {
- visitor: ["id", "typeParameters", "supertype", "impltype"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
- supertype: (0, _utils.validateOptionalType)("FlowType"),
- impltype: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("QualifiedTypeIdentifier", {
- visitor: ["id", "qualification"],
- aliases: ["Flow"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
- }
-});
-(0, _utils.default)("StringLiteralTypeAnnotation", {
- builder: ["value"],
- aliases: ["Flow", "FlowType"],
- fields: {
- value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
- }
-});
-(0, _utils.default)("StringTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("ThisTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-});
-(0, _utils.default)("TupleTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow", "FlowType"],
- fields: {
- types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
- }
-});
-(0, _utils.default)("TypeofTypeAnnotation", {
- visitor: ["argument"],
- aliases: ["Flow", "FlowType"],
- fields: {
- argument: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("TypeAlias", {
- visitor: ["id", "typeParameters", "right"],
- aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
- fields: {
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
- right: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("TypeAnnotation", {
- aliases: ["Flow"],
- visitor: ["typeAnnotation"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("FlowType")
- }
-});
-(0, _utils.default)("TypeCastExpression", {
- visitor: ["expression", "typeAnnotation"],
- aliases: ["Flow", "ExpressionWrapper", "Expression"],
- fields: {
- expression: (0, _utils.validateType)("Expression"),
- typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
- }
-});
-(0, _utils.default)("TypeParameter", {
- aliases: ["Flow"],
- visitor: ["bound", "default", "variance"],
- fields: {
- name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
- bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
- default: (0, _utils.validateOptionalType)("FlowType"),
- variance: (0, _utils.validateOptionalType)("Variance")
- }
-});
-(0, _utils.default)("TypeParameterDeclaration", {
- aliases: ["Flow"],
- visitor: ["params"],
- fields: {
- params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
- }
-});
-(0, _utils.default)("TypeParameterInstantiation", {
- aliases: ["Flow"],
- visitor: ["params"],
- fields: {
- params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
- }
-});
-(0, _utils.default)("UnionTypeAnnotation", {
- visitor: ["types"],
- aliases: ["Flow", "FlowType"],
- fields: {
- types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
- }
-});
-(0, _utils.default)("Variance", {
- aliases: ["Flow"],
- builder: ["kind"],
- fields: {
- kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
- }
-});
-(0, _utils.default)("VoidTypeAnnotation", {
- aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js
deleted file mode 100644
index 7f28569f508..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/index.js
+++ /dev/null
@@ -1,101 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-Object.defineProperty(exports, "VISITOR_KEYS", {
- enumerable: true,
- get: function () {
- return _utils.VISITOR_KEYS;
- }
-});
-Object.defineProperty(exports, "ALIAS_KEYS", {
- enumerable: true,
- get: function () {
- return _utils.ALIAS_KEYS;
- }
-});
-Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
- enumerable: true,
- get: function () {
- return _utils.FLIPPED_ALIAS_KEYS;
- }
-});
-Object.defineProperty(exports, "NODE_FIELDS", {
- enumerable: true,
- get: function () {
- return _utils.NODE_FIELDS;
- }
-});
-Object.defineProperty(exports, "BUILDER_KEYS", {
- enumerable: true,
- get: function () {
- return _utils.BUILDER_KEYS;
- }
-});
-Object.defineProperty(exports, "DEPRECATED_KEYS", {
- enumerable: true,
- get: function () {
- return _utils.DEPRECATED_KEYS;
- }
-});
-Object.defineProperty(exports, "PLACEHOLDERS", {
- enumerable: true,
- get: function () {
- return _placeholders.PLACEHOLDERS;
- }
-});
-Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
- enumerable: true,
- get: function () {
- return _placeholders.PLACEHOLDERS_ALIAS;
- }
-});
-Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
- enumerable: true,
- get: function () {
- return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
- }
-});
-exports.TYPES = void 0;
-
-function _toFastProperties() {
- const data = _interopRequireDefault(require("to-fast-properties"));
-
- _toFastProperties = function () {
- return data;
- };
-
- return data;
-}
-
-require("./core");
-
-require("./es2015");
-
-require("./flow");
-
-require("./jsx");
-
-require("./misc");
-
-require("./experimental");
-
-require("./typescript");
-
-var _utils = require("./utils");
-
-var _placeholders = require("./placeholders");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-(0, _toFastProperties().default)(_utils.VISITOR_KEYS);
-(0, _toFastProperties().default)(_utils.ALIAS_KEYS);
-(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS);
-(0, _toFastProperties().default)(_utils.NODE_FIELDS);
-(0, _toFastProperties().default)(_utils.BUILDER_KEYS);
-(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS);
-(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_ALIAS);
-(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
-const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
-exports.TYPES = TYPES; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/jsx.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/jsx.js
deleted file mode 100644
index 60d37e98ca1..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/jsx.js
+++ /dev/null
@@ -1,160 +0,0 @@
-"use strict";
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-(0, _utils.default)("JSXAttribute", {
- visitor: ["name", "value"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
- },
- value: {
- optional: true,
- validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
- }
- }
-});
-(0, _utils.default)("JSXClosingElement", {
- visitor: ["name"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
- }
- }
-});
-(0, _utils.default)("JSXElement", {
- builder: ["openingElement", "closingElement", "children", "selfClosing"],
- visitor: ["openingElement", "children", "closingElement"],
- aliases: ["JSX", "Immutable", "Expression"],
- fields: {
- openingElement: {
- validate: (0, _utils.assertNodeType)("JSXOpeningElement")
- },
- closingElement: {
- optional: true,
- validate: (0, _utils.assertNodeType)("JSXClosingElement")
- },
- children: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
- }
- }
-});
-(0, _utils.default)("JSXEmptyExpression", {
- aliases: ["JSX"]
-});
-(0, _utils.default)("JSXExpressionContainer", {
- visitor: ["expression"],
- aliases: ["JSX", "Immutable"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
- }
- }
-});
-(0, _utils.default)("JSXSpreadChild", {
- visitor: ["expression"],
- aliases: ["JSX", "Immutable"],
- fields: {
- expression: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("JSXIdentifier", {
- builder: ["name"],
- aliases: ["JSX"],
- fields: {
- name: {
- validate: (0, _utils.assertValueType)("string")
- }
- }
-});
-(0, _utils.default)("JSXMemberExpression", {
- visitor: ["object", "property"],
- aliases: ["JSX"],
- fields: {
- object: {
- validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
- },
- property: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier")
- }
- }
-});
-(0, _utils.default)("JSXNamespacedName", {
- visitor: ["namespace", "name"],
- aliases: ["JSX"],
- fields: {
- namespace: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier")
- },
- name: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier")
- }
- }
-});
-(0, _utils.default)("JSXOpeningElement", {
- builder: ["name", "attributes", "selfClosing"],
- visitor: ["name", "attributes"],
- aliases: ["JSX", "Immutable"],
- fields: {
- name: {
- validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression")
- },
- selfClosing: {
- default: false,
- validate: (0, _utils.assertValueType)("boolean")
- },
- attributes: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
- optional: true
- }
- }
-});
-(0, _utils.default)("JSXSpreadAttribute", {
- visitor: ["argument"],
- aliases: ["JSX"],
- fields: {
- argument: {
- validate: (0, _utils.assertNodeType)("Expression")
- }
- }
-});
-(0, _utils.default)("JSXText", {
- aliases: ["JSX", "Immutable"],
- builder: ["value"],
- fields: {
- value: {
- validate: (0, _utils.assertValueType)("string")
- }
- }
-});
-(0, _utils.default)("JSXFragment", {
- builder: ["openingFragment", "closingFragment", "children"],
- visitor: ["openingFragment", "children", "closingFragment"],
- aliases: ["JSX", "Immutable", "Expression"],
- fields: {
- openingFragment: {
- validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
- },
- closingFragment: {
- validate: (0, _utils.assertNodeType)("JSXClosingFragment")
- },
- children: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
- }
- }
-});
-(0, _utils.default)("JSXOpeningFragment", {
- aliases: ["JSX", "Immutable"]
-});
-(0, _utils.default)("JSXClosingFragment", {
- aliases: ["JSX", "Immutable"]
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js
deleted file mode 100644
index ecc4db67ff1..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/misc.js
+++ /dev/null
@@ -1,23 +0,0 @@
-"use strict";
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-var _placeholders = require("./placeholders");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-(0, _utils.default)("Noop", {
- visitor: []
-});
-(0, _utils.default)("Placeholder", {
- visitor: [],
- builder: ["expectedNode", "name"],
- fields: {
- name: {
- validate: (0, _utils.assertNodeType)("Identifier")
- },
- expectedNode: {
- validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
- }
- }
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/placeholders.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/placeholders.js
deleted file mode 100644
index 0edf7b2e809..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/placeholders.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
-
-var _utils = require("./utils");
-
-const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
-exports.PLACEHOLDERS = PLACEHOLDERS;
-const PLACEHOLDERS_ALIAS = {
- Declaration: ["Statement"],
- Pattern: ["PatternLike", "LVal"]
-};
-exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
-
-for (const type of PLACEHOLDERS) {
- const alias = _utils.ALIAS_KEYS[type];
- if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias;
-}
-
-const PLACEHOLDERS_FLIPPED_ALIAS = {};
-exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
-Object.keys(PLACEHOLDERS_ALIAS).forEach(type => {
- PLACEHOLDERS_ALIAS[type].forEach(alias => {
- if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
- PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
- }
-
- PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
- });
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js
deleted file mode 100644
index 4d9be114a5d..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/typescript.js
+++ /dev/null
@@ -1,412 +0,0 @@
-"use strict";
-
-var _utils = _interopRequireWildcard(require("./utils"));
-
-var _core = require("./core");
-
-var _es = require("./es2015");
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const bool = (0, _utils.assertValueType)("boolean");
-const tSFunctionTypeAnnotationCommon = {
- returnType: {
- validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
- optional: true
- },
- typeParameters: {
- validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
- optional: true
- }
-};
-(0, _utils.default)("TSParameterProperty", {
- aliases: ["LVal"],
- visitor: ["parameter"],
- fields: {
- accessibility: {
- validate: (0, _utils.assertOneOf)("public", "private", "protected"),
- optional: true
- },
- readonly: {
- validate: (0, _utils.assertValueType)("boolean"),
- optional: true
- },
- parameter: {
- validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
- }
- }
-});
-(0, _utils.default)("TSDeclareFunction", {
- aliases: ["Statement", "Declaration"],
- visitor: ["id", "typeParameters", "params", "returnType"],
- fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
-});
-(0, _utils.default)("TSDeclareMethod", {
- visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
- fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
-});
-(0, _utils.default)("TSQualifiedName", {
- aliases: ["TSEntityName"],
- visitor: ["left", "right"],
- fields: {
- left: (0, _utils.validateType)("TSEntityName"),
- right: (0, _utils.validateType)("Identifier")
- }
-});
-const signatureDeclarationCommon = {
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
- parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
- typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
-};
-const callConstructSignatureDeclaration = {
- aliases: ["TSTypeElement"],
- visitor: ["typeParameters", "parameters", "typeAnnotation"],
- fields: signatureDeclarationCommon
-};
-(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
-(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
-const namedTypeElementCommon = {
- key: (0, _utils.validateType)("Expression"),
- computed: (0, _utils.validate)(bool),
- optional: (0, _utils.validateOptional)(bool)
-};
-(0, _utils.default)("TSPropertySignature", {
- aliases: ["TSTypeElement"],
- visitor: ["key", "typeAnnotation", "initializer"],
- fields: Object.assign({}, namedTypeElementCommon, {
- readonly: (0, _utils.validateOptional)(bool),
- typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
- initializer: (0, _utils.validateOptionalType)("Expression")
- })
-});
-(0, _utils.default)("TSMethodSignature", {
- aliases: ["TSTypeElement"],
- visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
- fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon)
-});
-(0, _utils.default)("TSIndexSignature", {
- aliases: ["TSTypeElement"],
- visitor: ["parameters", "typeAnnotation"],
- fields: {
- readonly: (0, _utils.validateOptional)(bool),
- parameters: (0, _utils.validateArrayOfType)("Identifier"),
- typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
- }
-});
-const tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"];
-
-for (const type of tsKeywordTypes) {
- (0, _utils.default)(type, {
- aliases: ["TSType"],
- visitor: [],
- fields: {}
- });
-}
-
-(0, _utils.default)("TSThisType", {
- aliases: ["TSType"],
- visitor: [],
- fields: {}
-});
-const fnOrCtr = {
- aliases: ["TSType"],
- visitor: ["typeParameters", "parameters", "typeAnnotation"],
- fields: signatureDeclarationCommon
-};
-(0, _utils.default)("TSFunctionType", fnOrCtr);
-(0, _utils.default)("TSConstructorType", fnOrCtr);
-(0, _utils.default)("TSTypeReference", {
- aliases: ["TSType"],
- visitor: ["typeName", "typeParameters"],
- fields: {
- typeName: (0, _utils.validateType)("TSEntityName"),
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
- }
-});
-(0, _utils.default)("TSTypePredicate", {
- aliases: ["TSType"],
- visitor: ["parameterName", "typeAnnotation"],
- fields: {
- parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
- typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation")
- }
-});
-(0, _utils.default)("TSTypeQuery", {
- aliases: ["TSType"],
- visitor: ["exprName"],
- fields: {
- exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
- }
-});
-(0, _utils.default)("TSTypeLiteral", {
- aliases: ["TSType"],
- visitor: ["members"],
- fields: {
- members: (0, _utils.validateArrayOfType)("TSTypeElement")
- }
-});
-(0, _utils.default)("TSArrayType", {
- aliases: ["TSType"],
- visitor: ["elementType"],
- fields: {
- elementType: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSTupleType", {
- aliases: ["TSType"],
- visitor: ["elementTypes"],
- fields: {
- elementTypes: (0, _utils.validateArrayOfType)("TSType")
- }
-});
-(0, _utils.default)("TSOptionalType", {
- aliases: ["TSType"],
- visitor: ["typeAnnotation"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSRestType", {
- aliases: ["TSType"],
- visitor: ["typeAnnotation"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-const unionOrIntersection = {
- aliases: ["TSType"],
- visitor: ["types"],
- fields: {
- types: (0, _utils.validateArrayOfType)("TSType")
- }
-};
-(0, _utils.default)("TSUnionType", unionOrIntersection);
-(0, _utils.default)("TSIntersectionType", unionOrIntersection);
-(0, _utils.default)("TSConditionalType", {
- aliases: ["TSType"],
- visitor: ["checkType", "extendsType", "trueType", "falseType"],
- fields: {
- checkType: (0, _utils.validateType)("TSType"),
- extendsType: (0, _utils.validateType)("TSType"),
- trueType: (0, _utils.validateType)("TSType"),
- falseType: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSInferType", {
- aliases: ["TSType"],
- visitor: ["typeParameter"],
- fields: {
- typeParameter: (0, _utils.validateType)("TSTypeParameter")
- }
-});
-(0, _utils.default)("TSParenthesizedType", {
- aliases: ["TSType"],
- visitor: ["typeAnnotation"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSTypeOperator", {
- aliases: ["TSType"],
- visitor: ["typeAnnotation"],
- fields: {
- operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSIndexedAccessType", {
- aliases: ["TSType"],
- visitor: ["objectType", "indexType"],
- fields: {
- objectType: (0, _utils.validateType)("TSType"),
- indexType: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSMappedType", {
- aliases: ["TSType"],
- visitor: ["typeParameter", "typeAnnotation"],
- fields: {
- readonly: (0, _utils.validateOptional)(bool),
- typeParameter: (0, _utils.validateType)("TSTypeParameter"),
- optional: (0, _utils.validateOptional)(bool),
- typeAnnotation: (0, _utils.validateOptionalType)("TSType")
- }
-});
-(0, _utils.default)("TSLiteralType", {
- aliases: ["TSType"],
- visitor: ["literal"],
- fields: {
- literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"])
- }
-});
-(0, _utils.default)("TSExpressionWithTypeArguments", {
- aliases: ["TSType"],
- visitor: ["expression", "typeParameters"],
- fields: {
- expression: (0, _utils.validateType)("TSEntityName"),
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
- }
-});
-(0, _utils.default)("TSInterfaceDeclaration", {
- aliases: ["Statement", "Declaration"],
- visitor: ["id", "typeParameters", "extends", "body"],
- fields: {
- declare: (0, _utils.validateOptional)(bool),
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
- extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
- body: (0, _utils.validateType)("TSInterfaceBody")
- }
-});
-(0, _utils.default)("TSInterfaceBody", {
- visitor: ["body"],
- fields: {
- body: (0, _utils.validateArrayOfType)("TSTypeElement")
- }
-});
-(0, _utils.default)("TSTypeAliasDeclaration", {
- aliases: ["Statement", "Declaration"],
- visitor: ["id", "typeParameters", "typeAnnotation"],
- fields: {
- declare: (0, _utils.validateOptional)(bool),
- id: (0, _utils.validateType)("Identifier"),
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSAsExpression", {
- aliases: ["Expression"],
- visitor: ["expression", "typeAnnotation"],
- fields: {
- expression: (0, _utils.validateType)("Expression"),
- typeAnnotation: (0, _utils.validateType)("TSType")
- }
-});
-(0, _utils.default)("TSTypeAssertion", {
- aliases: ["Expression"],
- visitor: ["typeAnnotation", "expression"],
- fields: {
- typeAnnotation: (0, _utils.validateType)("TSType"),
- expression: (0, _utils.validateType)("Expression")
- }
-});
-(0, _utils.default)("TSEnumDeclaration", {
- aliases: ["Statement", "Declaration"],
- visitor: ["id", "members"],
- fields: {
- declare: (0, _utils.validateOptional)(bool),
- const: (0, _utils.validateOptional)(bool),
- id: (0, _utils.validateType)("Identifier"),
- members: (0, _utils.validateArrayOfType)("TSEnumMember"),
- initializer: (0, _utils.validateOptionalType)("Expression")
- }
-});
-(0, _utils.default)("TSEnumMember", {
- visitor: ["id", "initializer"],
- fields: {
- id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
- initializer: (0, _utils.validateOptionalType)("Expression")
- }
-});
-(0, _utils.default)("TSModuleDeclaration", {
- aliases: ["Statement", "Declaration"],
- visitor: ["id", "body"],
- fields: {
- declare: (0, _utils.validateOptional)(bool),
- global: (0, _utils.validateOptional)(bool),
- id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
- body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
- }
-});
-(0, _utils.default)("TSModuleBlock", {
- aliases: ["Scopable", "Block", "BlockParent"],
- visitor: ["body"],
- fields: {
- body: (0, _utils.validateArrayOfType)("Statement")
- }
-});
-(0, _utils.default)("TSImportType", {
- aliases: ["TSType"],
- visitor: ["argument", "qualifier", "typeParameters"],
- fields: {
- argument: (0, _utils.validateType)("StringLiteral"),
- qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
- typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
- }
-});
-(0, _utils.default)("TSImportEqualsDeclaration", {
- aliases: ["Statement"],
- visitor: ["id", "moduleReference"],
- fields: {
- isExport: (0, _utils.validate)(bool),
- id: (0, _utils.validateType)("Identifier"),
- moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
- }
-});
-(0, _utils.default)("TSExternalModuleReference", {
- visitor: ["expression"],
- fields: {
- expression: (0, _utils.validateType)("StringLiteral")
- }
-});
-(0, _utils.default)("TSNonNullExpression", {
- aliases: ["Expression"],
- visitor: ["expression"],
- fields: {
- expression: (0, _utils.validateType)("Expression")
- }
-});
-(0, _utils.default)("TSExportAssignment", {
- aliases: ["Statement"],
- visitor: ["expression"],
- fields: {
- expression: (0, _utils.validateType)("Expression")
- }
-});
-(0, _utils.default)("TSNamespaceExportDeclaration", {
- aliases: ["Statement"],
- visitor: ["id"],
- fields: {
- id: (0, _utils.validateType)("Identifier")
- }
-});
-(0, _utils.default)("TSTypeAnnotation", {
- visitor: ["typeAnnotation"],
- fields: {
- typeAnnotation: {
- validate: (0, _utils.assertNodeType)("TSType")
- }
- }
-});
-(0, _utils.default)("TSTypeParameterInstantiation", {
- visitor: ["params"],
- fields: {
- params: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
- }
- }
-});
-(0, _utils.default)("TSTypeParameterDeclaration", {
- visitor: ["params"],
- fields: {
- params: {
- validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
- }
- }
-});
-(0, _utils.default)("TSTypeParameter", {
- visitor: ["constraint", "default"],
- fields: {
- name: {
- validate: (0, _utils.assertValueType)("string")
- },
- constraint: {
- validate: (0, _utils.assertNodeType)("TSType"),
- optional: true
- },
- default: {
- validate: (0, _utils.assertNodeType)("TSType"),
- optional: true
- }
- }
-}); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js
deleted file mode 100644
index 95ba9740c49..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/definitions/utils.js
+++ /dev/null
@@ -1,249 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.validate = validate;
-exports.typeIs = typeIs;
-exports.validateType = validateType;
-exports.validateOptional = validateOptional;
-exports.validateOptionalType = validateOptionalType;
-exports.arrayOf = arrayOf;
-exports.arrayOfType = arrayOfType;
-exports.validateArrayOfType = validateArrayOfType;
-exports.assertEach = assertEach;
-exports.assertOneOf = assertOneOf;
-exports.assertNodeType = assertNodeType;
-exports.assertNodeOrValueType = assertNodeOrValueType;
-exports.assertValueType = assertValueType;
-exports.assertShape = assertShape;
-exports.chain = chain;
-exports.default = defineType;
-exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
-
-var _is = _interopRequireDefault(require("../validators/is"));
-
-var _validate = require("../validators/validate");
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const VISITOR_KEYS = {};
-exports.VISITOR_KEYS = VISITOR_KEYS;
-const ALIAS_KEYS = {};
-exports.ALIAS_KEYS = ALIAS_KEYS;
-const FLIPPED_ALIAS_KEYS = {};
-exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
-const NODE_FIELDS = {};
-exports.NODE_FIELDS = NODE_FIELDS;
-const BUILDER_KEYS = {};
-exports.BUILDER_KEYS = BUILDER_KEYS;
-const DEPRECATED_KEYS = {};
-exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
-
-function getType(val) {
- if (Array.isArray(val)) {
- return "array";
- } else if (val === null) {
- return "null";
- } else if (val === undefined) {
- return "undefined";
- } else {
- return typeof val;
- }
-}
-
-function validate(validate) {
- return {
- validate
- };
-}
-
-function typeIs(typeName) {
- return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
-}
-
-function validateType(typeName) {
- return validate(typeIs(typeName));
-}
-
-function validateOptional(validate) {
- return {
- validate,
- optional: true
- };
-}
-
-function validateOptionalType(typeName) {
- return {
- validate: typeIs(typeName),
- optional: true
- };
-}
-
-function arrayOf(elementType) {
- return chain(assertValueType("array"), assertEach(elementType));
-}
-
-function arrayOfType(typeName) {
- return arrayOf(typeIs(typeName));
-}
-
-function validateArrayOfType(typeName) {
- return validate(arrayOfType(typeName));
-}
-
-function assertEach(callback) {
- function validator(node, key, val) {
- if (!Array.isArray(val)) return;
-
- for (let i = 0; i < val.length; i++) {
- callback(node, `${key}[${i}]`, val[i]);
- }
- }
-
- validator.each = callback;
- return validator;
-}
-
-function assertOneOf(...values) {
- function validate(node, key, val) {
- if (values.indexOf(val) < 0) {
- throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
- }
- }
-
- validate.oneOf = values;
- return validate;
-}
-
-function assertNodeType(...types) {
- function validate(node, key, val) {
- let valid = false;
-
- for (const type of types) {
- if ((0, _is.default)(type, val)) {
- valid = true;
- break;
- }
- }
-
- if (!valid) {
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`);
- }
- }
-
- validate.oneOfNodeTypes = types;
- return validate;
-}
-
-function assertNodeOrValueType(...types) {
- function validate(node, key, val) {
- let valid = false;
-
- for (const type of types) {
- if (getType(val) === type || (0, _is.default)(type, val)) {
- valid = true;
- break;
- }
- }
-
- if (!valid) {
- throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`);
- }
- }
-
- validate.oneOfNodeOrValueTypes = types;
- return validate;
-}
-
-function assertValueType(type) {
- function validate(node, key, val) {
- const valid = getType(val) === type;
-
- if (!valid) {
- throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
- }
- }
-
- validate.type = type;
- return validate;
-}
-
-function assertShape(shape) {
- function validate(node, key, val) {
- const errors = [];
-
- for (const property of Object.keys(shape)) {
- try {
- (0, _validate.validateField)(node, property, val[property], shape[property]);
- } catch (error) {
- if (error instanceof TypeError) {
- errors.push(error.message);
- continue;
- }
-
- throw error;
- }
- }
-
- if (errors.length) {
- throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`);
- }
- }
-
- validate.shapeOf = shape;
- return validate;
-}
-
-function chain(...fns) {
- function validate(...args) {
- for (const fn of fns) {
- fn(...args);
- }
- }
-
- validate.chainOf = fns;
- return validate;
-}
-
-function defineType(type, opts = {}) {
- const inherits = opts.inherits && store[opts.inherits] || {};
- const fields = opts.fields || inherits.fields || {};
- const visitor = opts.visitor || inherits.visitor || [];
- const aliases = opts.aliases || inherits.aliases || [];
- const builder = opts.builder || inherits.builder || opts.visitor || [];
-
- if (opts.deprecatedAlias) {
- DEPRECATED_KEYS[opts.deprecatedAlias] = type;
- }
-
- for (const key of visitor.concat(builder)) {
- fields[key] = fields[key] || {};
- }
-
- for (const key of Object.keys(fields)) {
- const field = fields[key];
-
- if (builder.indexOf(key) === -1) {
- field.optional = true;
- }
-
- if (field.default === undefined) {
- field.default = null;
- } else if (!field.validate) {
- field.validate = assertValueType(getType(field.default));
- }
- }
-
- VISITOR_KEYS[type] = opts.visitor = visitor;
- BUILDER_KEYS[type] = opts.builder = builder;
- NODE_FIELDS[type] = opts.fields = fields;
- ALIAS_KEYS[type] = opts.aliases = aliases;
- aliases.forEach(alias => {
- FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
- FLIPPED_ALIAS_KEYS[alias].push(type);
- });
- store[type] = opts;
-}
-
-const store = {}; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js
deleted file mode 100644
index f5bb66b0aaa..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js
+++ /dev/null
@@ -1,579 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var _exportNames = {
- react: true,
- assertNode: true,
- createTypeAnnotationBasedOnTypeof: true,
- createUnionTypeAnnotation: true,
- cloneNode: true,
- clone: true,
- cloneDeep: true,
- cloneWithoutLoc: true,
- addComment: true,
- addComments: true,
- inheritInnerComments: true,
- inheritLeadingComments: true,
- inheritsComments: true,
- inheritTrailingComments: true,
- removeComments: true,
- ensureBlock: true,
- toBindingIdentifierName: true,
- toBlock: true,
- toComputedKey: true,
- toExpression: true,
- toIdentifier: true,
- toKeyAlias: true,
- toSequenceExpression: true,
- toStatement: true,
- valueToNode: true,
- appendToMemberExpression: true,
- inherits: true,
- prependToMemberExpression: true,
- removeProperties: true,
- removePropertiesDeep: true,
- removeTypeDuplicates: true,
- getBindingIdentifiers: true,
- getOuterBindingIdentifiers: true,
- traverse: true,
- traverseFast: true,
- shallowEqual: true,
- is: true,
- isBinding: true,
- isBlockScoped: true,
- isImmutable: true,
- isLet: true,
- isNode: true,
- isNodesEquivalent: true,
- isPlaceholderType: true,
- isReferenced: true,
- isScope: true,
- isSpecifierDefault: true,
- isType: true,
- isValidES3Identifier: true,
- isValidIdentifier: true,
- isVar: true,
- matchesPattern: true,
- validate: true,
- buildMatchMemberExpression: true
-};
-Object.defineProperty(exports, "assertNode", {
- enumerable: true,
- get: function () {
- return _assertNode.default;
- }
-});
-Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
- enumerable: true,
- get: function () {
- return _createTypeAnnotationBasedOnTypeof.default;
- }
-});
-Object.defineProperty(exports, "createUnionTypeAnnotation", {
- enumerable: true,
- get: function () {
- return _createUnionTypeAnnotation.default;
- }
-});
-Object.defineProperty(exports, "cloneNode", {
- enumerable: true,
- get: function () {
- return _cloneNode.default;
- }
-});
-Object.defineProperty(exports, "clone", {
- enumerable: true,
- get: function () {
- return _clone.default;
- }
-});
-Object.defineProperty(exports, "cloneDeep", {
- enumerable: true,
- get: function () {
- return _cloneDeep.default;
- }
-});
-Object.defineProperty(exports, "cloneWithoutLoc", {
- enumerable: true,
- get: function () {
- return _cloneWithoutLoc.default;
- }
-});
-Object.defineProperty(exports, "addComment", {
- enumerable: true,
- get: function () {
- return _addComment.default;
- }
-});
-Object.defineProperty(exports, "addComments", {
- enumerable: true,
- get: function () {
- return _addComments.default;
- }
-});
-Object.defineProperty(exports, "inheritInnerComments", {
- enumerable: true,
- get: function () {
- return _inheritInnerComments.default;
- }
-});
-Object.defineProperty(exports, "inheritLeadingComments", {
- enumerable: true,
- get: function () {
- return _inheritLeadingComments.default;
- }
-});
-Object.defineProperty(exports, "inheritsComments", {
- enumerable: true,
- get: function () {
- return _inheritsComments.default;
- }
-});
-Object.defineProperty(exports, "inheritTrailingComments", {
- enumerable: true,
- get: function () {
- return _inheritTrailingComments.default;
- }
-});
-Object.defineProperty(exports, "removeComments", {
- enumerable: true,
- get: function () {
- return _removeComments.default;
- }
-});
-Object.defineProperty(exports, "ensureBlock", {
- enumerable: true,
- get: function () {
- return _ensureBlock.default;
- }
-});
-Object.defineProperty(exports, "toBindingIdentifierName", {
- enumerable: true,
- get: function () {
- return _toBindingIdentifierName.default;
- }
-});
-Object.defineProperty(exports, "toBlock", {
- enumerable: true,
- get: function () {
- return _toBlock.default;
- }
-});
-Object.defineProperty(exports, "toComputedKey", {
- enumerable: true,
- get: function () {
- return _toComputedKey.default;
- }
-});
-Object.defineProperty(exports, "toExpression", {
- enumerable: true,
- get: function () {
- return _toExpression.default;
- }
-});
-Object.defineProperty(exports, "toIdentifier", {
- enumerable: true,
- get: function () {
- return _toIdentifier.default;
- }
-});
-Object.defineProperty(exports, "toKeyAlias", {
- enumerable: true,
- get: function () {
- return _toKeyAlias.default;
- }
-});
-Object.defineProperty(exports, "toSequenceExpression", {
- enumerable: true,
- get: function () {
- return _toSequenceExpression.default;
- }
-});
-Object.defineProperty(exports, "toStatement", {
- enumerable: true,
- get: function () {
- return _toStatement.default;
- }
-});
-Object.defineProperty(exports, "valueToNode", {
- enumerable: true,
- get: function () {
- return _valueToNode.default;
- }
-});
-Object.defineProperty(exports, "appendToMemberExpression", {
- enumerable: true,
- get: function () {
- return _appendToMemberExpression.default;
- }
-});
-Object.defineProperty(exports, "inherits", {
- enumerable: true,
- get: function () {
- return _inherits.default;
- }
-});
-Object.defineProperty(exports, "prependToMemberExpression", {
- enumerable: true,
- get: function () {
- return _prependToMemberExpression.default;
- }
-});
-Object.defineProperty(exports, "removeProperties", {
- enumerable: true,
- get: function () {
- return _removeProperties.default;
- }
-});
-Object.defineProperty(exports, "removePropertiesDeep", {
- enumerable: true,
- get: function () {
- return _removePropertiesDeep.default;
- }
-});
-Object.defineProperty(exports, "removeTypeDuplicates", {
- enumerable: true,
- get: function () {
- return _removeTypeDuplicates.default;
- }
-});
-Object.defineProperty(exports, "getBindingIdentifiers", {
- enumerable: true,
- get: function () {
- return _getBindingIdentifiers.default;
- }
-});
-Object.defineProperty(exports, "getOuterBindingIdentifiers", {
- enumerable: true,
- get: function () {
- return _getOuterBindingIdentifiers.default;
- }
-});
-Object.defineProperty(exports, "traverse", {
- enumerable: true,
- get: function () {
- return _traverse.default;
- }
-});
-Object.defineProperty(exports, "traverseFast", {
- enumerable: true,
- get: function () {
- return _traverseFast.default;
- }
-});
-Object.defineProperty(exports, "shallowEqual", {
- enumerable: true,
- get: function () {
- return _shallowEqual.default;
- }
-});
-Object.defineProperty(exports, "is", {
- enumerable: true,
- get: function () {
- return _is.default;
- }
-});
-Object.defineProperty(exports, "isBinding", {
- enumerable: true,
- get: function () {
- return _isBinding.default;
- }
-});
-Object.defineProperty(exports, "isBlockScoped", {
- enumerable: true,
- get: function () {
- return _isBlockScoped.default;
- }
-});
-Object.defineProperty(exports, "isImmutable", {
- enumerable: true,
- get: function () {
- return _isImmutable.default;
- }
-});
-Object.defineProperty(exports, "isLet", {
- enumerable: true,
- get: function () {
- return _isLet.default;
- }
-});
-Object.defineProperty(exports, "isNode", {
- enumerable: true,
- get: function () {
- return _isNode.default;
- }
-});
-Object.defineProperty(exports, "isNodesEquivalent", {
- enumerable: true,
- get: function () {
- return _isNodesEquivalent.default;
- }
-});
-Object.defineProperty(exports, "isPlaceholderType", {
- enumerable: true,
- get: function () {
- return _isPlaceholderType.default;
- }
-});
-Object.defineProperty(exports, "isReferenced", {
- enumerable: true,
- get: function () {
- return _isReferenced.default;
- }
-});
-Object.defineProperty(exports, "isScope", {
- enumerable: true,
- get: function () {
- return _isScope.default;
- }
-});
-Object.defineProperty(exports, "isSpecifierDefault", {
- enumerable: true,
- get: function () {
- return _isSpecifierDefault.default;
- }
-});
-Object.defineProperty(exports, "isType", {
- enumerable: true,
- get: function () {
- return _isType.default;
- }
-});
-Object.defineProperty(exports, "isValidES3Identifier", {
- enumerable: true,
- get: function () {
- return _isValidES3Identifier.default;
- }
-});
-Object.defineProperty(exports, "isValidIdentifier", {
- enumerable: true,
- get: function () {
- return _isValidIdentifier.default;
- }
-});
-Object.defineProperty(exports, "isVar", {
- enumerable: true,
- get: function () {
- return _isVar.default;
- }
-});
-Object.defineProperty(exports, "matchesPattern", {
- enumerable: true,
- get: function () {
- return _matchesPattern.default;
- }
-});
-Object.defineProperty(exports, "validate", {
- enumerable: true,
- get: function () {
- return _validate.default;
- }
-});
-Object.defineProperty(exports, "buildMatchMemberExpression", {
- enumerable: true,
- get: function () {
- return _buildMatchMemberExpression.default;
- }
-});
-exports.react = void 0;
-
-var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent"));
-
-var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag"));
-
-var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren"));
-
-var _assertNode = _interopRequireDefault(require("./asserts/assertNode"));
-
-var _generated = require("./asserts/generated");
-
-Object.keys(_generated).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _generated[key];
- }
- });
-});
-
-var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof"));
-
-var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation"));
-
-var _generated2 = require("./builders/generated");
-
-Object.keys(_generated2).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _generated2[key];
- }
- });
-});
-
-var _cloneNode = _interopRequireDefault(require("./clone/cloneNode"));
-
-var _clone = _interopRequireDefault(require("./clone/clone"));
-
-var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep"));
-
-var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc"));
-
-var _addComment = _interopRequireDefault(require("./comments/addComment"));
-
-var _addComments = _interopRequireDefault(require("./comments/addComments"));
-
-var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments"));
-
-var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments"));
-
-var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments"));
-
-var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments"));
-
-var _removeComments = _interopRequireDefault(require("./comments/removeComments"));
-
-var _generated3 = require("./constants/generated");
-
-Object.keys(_generated3).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _generated3[key];
- }
- });
-});
-
-var _constants = require("./constants");
-
-Object.keys(_constants).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _constants[key];
- }
- });
-});
-
-var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock"));
-
-var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName"));
-
-var _toBlock = _interopRequireDefault(require("./converters/toBlock"));
-
-var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey"));
-
-var _toExpression = _interopRequireDefault(require("./converters/toExpression"));
-
-var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier"));
-
-var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias"));
-
-var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression"));
-
-var _toStatement = _interopRequireDefault(require("./converters/toStatement"));
-
-var _valueToNode = _interopRequireDefault(require("./converters/valueToNode"));
-
-var _definitions = require("./definitions");
-
-Object.keys(_definitions).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _definitions[key];
- }
- });
-});
-
-var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression"));
-
-var _inherits = _interopRequireDefault(require("./modifications/inherits"));
-
-var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression"));
-
-var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties"));
-
-var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep"));
-
-var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates"));
-
-var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers"));
-
-var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers"));
-
-var _traverse = _interopRequireDefault(require("./traverse/traverse"));
-
-var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast"));
-
-var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual"));
-
-var _is = _interopRequireDefault(require("./validators/is"));
-
-var _isBinding = _interopRequireDefault(require("./validators/isBinding"));
-
-var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped"));
-
-var _isImmutable = _interopRequireDefault(require("./validators/isImmutable"));
-
-var _isLet = _interopRequireDefault(require("./validators/isLet"));
-
-var _isNode = _interopRequireDefault(require("./validators/isNode"));
-
-var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent"));
-
-var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType"));
-
-var _isReferenced = _interopRequireDefault(require("./validators/isReferenced"));
-
-var _isScope = _interopRequireDefault(require("./validators/isScope"));
-
-var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault"));
-
-var _isType = _interopRequireDefault(require("./validators/isType"));
-
-var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier"));
-
-var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier"));
-
-var _isVar = _interopRequireDefault(require("./validators/isVar"));
-
-var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern"));
-
-var _validate = _interopRequireDefault(require("./validators/validate"));
-
-var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression"));
-
-var _generated4 = require("./validators/generated");
-
-Object.keys(_generated4).forEach(function (key) {
- if (key === "default" || key === "__esModule") return;
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
- Object.defineProperty(exports, key, {
- enumerable: true,
- get: function () {
- return _generated4[key];
- }
- });
-});
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const react = {
- isReactComponent: _isReactComponent.default,
- isCompatTag: _isCompatTag.default,
- buildChildren: _buildChildren.default
-};
-exports.react = react; \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow
deleted file mode 100644
index c7e80a15fdb..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/index.js.flow
+++ /dev/null
@@ -1,1975 +0,0 @@
-// NOTE: This file is autogenerated. Do not modify.
-// See packages/babel-types/scripts/generators/flow.js for script used.
-
-declare class BabelNodeComment {
- value: string;
- start: number;
- end: number;
- loc: BabelNodeSourceLocation;
-}
-
-declare class BabelNodeCommentBlock extends BabelNodeComment {
- type: "CommentBlock";
-}
-
-declare class BabelNodeCommentLine extends BabelNodeComment {
- type: "CommentLine";
-}
-
-declare class BabelNodeSourceLocation {
- start: {
- line: number;
- column: number;
- };
-
- end: {
- line: number;
- column: number;
- };
-}
-
-declare class BabelNode {
- leadingComments?: Array<BabelNodeComment>;
- innerComments?: Array<BabelNodeComment>;
- trailingComments?: Array<BabelNodeComment>;
- start: ?number;
- end: ?number;
- loc: ?BabelNodeSourceLocation;
-}
-
-declare class BabelNodeArrayExpression extends BabelNode {
- type: "ArrayExpression";
- elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>;
-}
-
-declare class BabelNodeAssignmentExpression extends BabelNode {
- type: "AssignmentExpression";
- operator: string;
- left: BabelNodeLVal;
- right: BabelNodeExpression;
-}
-
-declare class BabelNodeBinaryExpression extends BabelNode {
- type: "BinaryExpression";
- operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
- left: BabelNodeExpression;
- right: BabelNodeExpression;
-}
-
-declare class BabelNodeInterpreterDirective extends BabelNode {
- type: "InterpreterDirective";
- value: string;
-}
-
-declare class BabelNodeDirective extends BabelNode {
- type: "Directive";
- value: BabelNodeDirectiveLiteral;
-}
-
-declare class BabelNodeDirectiveLiteral extends BabelNode {
- type: "DirectiveLiteral";
- value: string;
-}
-
-declare class BabelNodeBlockStatement extends BabelNode {
- type: "BlockStatement";
- body: Array<BabelNodeStatement>;
- directives?: Array<BabelNodeDirective>;
-}
-
-declare class BabelNodeBreakStatement extends BabelNode {
- type: "BreakStatement";
- label?: BabelNodeIdentifier;
-}
-
-declare class BabelNodeCallExpression extends BabelNode {
- type: "CallExpression";
- callee: BabelNodeExpression;
- arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
- optional?: true | false;
- typeArguments?: BabelNodeTypeParameterInstantiation;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeCatchClause extends BabelNode {
- type: "CatchClause";
- param?: BabelNodeIdentifier;
- body: BabelNodeBlockStatement;
-}
-
-declare class BabelNodeConditionalExpression extends BabelNode {
- type: "ConditionalExpression";
- test: BabelNodeExpression;
- consequent: BabelNodeExpression;
- alternate: BabelNodeExpression;
-}
-
-declare class BabelNodeContinueStatement extends BabelNode {
- type: "ContinueStatement";
- label?: BabelNodeIdentifier;
-}
-
-declare class BabelNodeDebuggerStatement extends BabelNode {
- type: "DebuggerStatement";
-}
-
-declare class BabelNodeDoWhileStatement extends BabelNode {
- type: "DoWhileStatement";
- test: BabelNodeExpression;
- body: BabelNodeStatement;
-}
-
-declare class BabelNodeEmptyStatement extends BabelNode {
- type: "EmptyStatement";
-}
-
-declare class BabelNodeExpressionStatement extends BabelNode {
- type: "ExpressionStatement";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeFile extends BabelNode {
- type: "File";
- program: BabelNodeProgram;
- comments: any;
- tokens: any;
-}
-
-declare class BabelNodeForInStatement extends BabelNode {
- type: "ForInStatement";
- left: BabelNodeVariableDeclaration | BabelNodeLVal;
- right: BabelNodeExpression;
- body: BabelNodeStatement;
-}
-
-declare class BabelNodeForStatement extends BabelNode {
- type: "ForStatement";
- init?: BabelNodeVariableDeclaration | BabelNodeExpression;
- test?: BabelNodeExpression;
- update?: BabelNodeExpression;
- body: BabelNodeStatement;
-}
-
-declare class BabelNodeFunctionDeclaration extends BabelNode {
- type: "FunctionDeclaration";
- id?: BabelNodeIdentifier;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement;
- generator?: boolean;
- async?: boolean;
- declare?: boolean;
- returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeFunctionExpression extends BabelNode {
- type: "FunctionExpression";
- id?: BabelNodeIdentifier;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement;
- generator?: boolean;
- async?: boolean;
- returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeIdentifier extends BabelNode {
- type: "Identifier";
- name: string;
- decorators?: Array<BabelNodeDecorator>;
- optional?: boolean;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
-}
-
-declare class BabelNodeIfStatement extends BabelNode {
- type: "IfStatement";
- test: BabelNodeExpression;
- consequent: BabelNodeStatement;
- alternate?: BabelNodeStatement;
-}
-
-declare class BabelNodeLabeledStatement extends BabelNode {
- type: "LabeledStatement";
- label: BabelNodeIdentifier;
- body: BabelNodeStatement;
-}
-
-declare class BabelNodeStringLiteral extends BabelNode {
- type: "StringLiteral";
- value: string;
-}
-
-declare class BabelNodeNumericLiteral extends BabelNode {
- type: "NumericLiteral";
- value: number;
-}
-
-declare class BabelNodeNullLiteral extends BabelNode {
- type: "NullLiteral";
-}
-
-declare class BabelNodeBooleanLiteral extends BabelNode {
- type: "BooleanLiteral";
- value: boolean;
-}
-
-declare class BabelNodeRegExpLiteral extends BabelNode {
- type: "RegExpLiteral";
- pattern: string;
- flags?: string;
-}
-
-declare class BabelNodeLogicalExpression extends BabelNode {
- type: "LogicalExpression";
- operator: "||" | "&&" | "??";
- left: BabelNodeExpression;
- right: BabelNodeExpression;
-}
-
-declare class BabelNodeMemberExpression extends BabelNode {
- type: "MemberExpression";
- object: BabelNodeExpression;
- property: any;
- computed?: boolean;
- optional?: true | false;
-}
-
-declare class BabelNodeNewExpression extends BabelNode {
- type: "NewExpression";
- callee: BabelNodeExpression;
- arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
- optional?: true | false;
- typeArguments?: BabelNodeTypeParameterInstantiation;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeProgram extends BabelNode {
- type: "Program";
- body: Array<BabelNodeStatement>;
- directives?: Array<BabelNodeDirective>;
- sourceType?: "script" | "module";
- interpreter?: BabelNodeInterpreterDirective;
- sourceFile?: string;
-}
-
-declare class BabelNodeObjectExpression extends BabelNode {
- type: "ObjectExpression";
- properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>;
-}
-
-declare class BabelNodeObjectMethod extends BabelNode {
- type: "ObjectMethod";
- kind?: "method" | "get" | "set";
- key: any;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement;
- computed?: boolean;
- async?: boolean;
- decorators?: Array<BabelNodeDecorator>;
- generator?: boolean;
- returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeObjectProperty extends BabelNode {
- type: "ObjectProperty";
- key: any;
- value: BabelNodeExpression | BabelNodePatternLike;
- computed?: boolean;
- shorthand?: boolean;
- decorators?: Array<BabelNodeDecorator>;
-}
-
-declare class BabelNodeRestElement extends BabelNode {
- type: "RestElement";
- argument: BabelNodeLVal;
- decorators?: Array<BabelNodeDecorator>;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
-}
-
-declare class BabelNodeReturnStatement extends BabelNode {
- type: "ReturnStatement";
- argument?: BabelNodeExpression;
-}
-
-declare class BabelNodeSequenceExpression extends BabelNode {
- type: "SequenceExpression";
- expressions: Array<BabelNodeExpression>;
-}
-
-declare class BabelNodeParenthesizedExpression extends BabelNode {
- type: "ParenthesizedExpression";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeSwitchCase extends BabelNode {
- type: "SwitchCase";
- test?: BabelNodeExpression;
- consequent: Array<BabelNodeStatement>;
-}
-
-declare class BabelNodeSwitchStatement extends BabelNode {
- type: "SwitchStatement";
- discriminant: BabelNodeExpression;
- cases: Array<BabelNodeSwitchCase>;
-}
-
-declare class BabelNodeThisExpression extends BabelNode {
- type: "ThisExpression";
-}
-
-declare class BabelNodeThrowStatement extends BabelNode {
- type: "ThrowStatement";
- argument: BabelNodeExpression;
-}
-
-declare class BabelNodeTryStatement extends BabelNode {
- type: "TryStatement";
- block: BabelNodeBlockStatement;
- handler?: BabelNodeCatchClause;
- finalizer?: BabelNodeBlockStatement;
-}
-
-declare class BabelNodeUnaryExpression extends BabelNode {
- type: "UnaryExpression";
- operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
- argument: BabelNodeExpression;
- prefix?: boolean;
-}
-
-declare class BabelNodeUpdateExpression extends BabelNode {
- type: "UpdateExpression";
- operator: "++" | "--";
- argument: BabelNodeExpression;
- prefix?: boolean;
-}
-
-declare class BabelNodeVariableDeclaration extends BabelNode {
- type: "VariableDeclaration";
- kind: "var" | "let" | "const";
- declarations: Array<BabelNodeVariableDeclarator>;
- declare?: boolean;
-}
-
-declare class BabelNodeVariableDeclarator extends BabelNode {
- type: "VariableDeclarator";
- id: BabelNodeLVal;
- init?: BabelNodeExpression;
- definite?: boolean;
-}
-
-declare class BabelNodeWhileStatement extends BabelNode {
- type: "WhileStatement";
- test: BabelNodeExpression;
- body: BabelNodeBlockStatement | BabelNodeStatement;
-}
-
-declare class BabelNodeWithStatement extends BabelNode {
- type: "WithStatement";
- object: BabelNodeExpression;
- body: BabelNodeBlockStatement | BabelNodeStatement;
-}
-
-declare class BabelNodeAssignmentPattern extends BabelNode {
- type: "AssignmentPattern";
- left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression;
- right: BabelNodeExpression;
- decorators?: Array<BabelNodeDecorator>;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
-}
-
-declare class BabelNodeArrayPattern extends BabelNode {
- type: "ArrayPattern";
- elements: Array<BabelNodePatternLike>;
- decorators?: Array<BabelNodeDecorator>;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
-}
-
-declare class BabelNodeArrowFunctionExpression extends BabelNode {
- type: "ArrowFunctionExpression";
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement | BabelNodeExpression;
- async?: boolean;
- expression?: boolean;
- generator?: boolean;
- returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeClassBody extends BabelNode {
- type: "ClassBody";
- body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>;
-}
-
-declare class BabelNodeClassDeclaration extends BabelNode {
- type: "ClassDeclaration";
- id?: BabelNodeIdentifier;
- superClass?: BabelNodeExpression;
- body: BabelNodeClassBody;
- decorators?: Array<BabelNodeDecorator>;
- abstract?: boolean;
- declare?: boolean;
- mixins?: any;
- superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeClassExpression extends BabelNode {
- type: "ClassExpression";
- id?: BabelNodeIdentifier;
- superClass?: BabelNodeExpression;
- body: BabelNodeClassBody;
- decorators?: Array<BabelNodeDecorator>;
- mixins?: any;
- superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeExportAllDeclaration extends BabelNode {
- type: "ExportAllDeclaration";
- source: BabelNodeStringLiteral;
-}
-
-declare class BabelNodeExportDefaultDeclaration extends BabelNode {
- type: "ExportDefaultDeclaration";
- declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression;
-}
-
-declare class BabelNodeExportNamedDeclaration extends BabelNode {
- type: "ExportNamedDeclaration";
- declaration?: BabelNodeDeclaration;
- specifiers: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>;
- source?: BabelNodeStringLiteral;
- exportKind?: "type" | "value";
-}
-
-declare class BabelNodeExportSpecifier extends BabelNode {
- type: "ExportSpecifier";
- local: BabelNodeIdentifier;
- exported: BabelNodeIdentifier;
-}
-
-declare class BabelNodeForOfStatement extends BabelNode {
- type: "ForOfStatement";
- left: BabelNodeVariableDeclaration | BabelNodeLVal;
- right: BabelNodeExpression;
- body: BabelNodeStatement;
-}
-
-declare class BabelNodeImportDeclaration extends BabelNode {
- type: "ImportDeclaration";
- specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>;
- source: BabelNodeStringLiteral;
- importKind?: "type" | "typeof" | "value";
-}
-
-declare class BabelNodeImportDefaultSpecifier extends BabelNode {
- type: "ImportDefaultSpecifier";
- local: BabelNodeIdentifier;
-}
-
-declare class BabelNodeImportNamespaceSpecifier extends BabelNode {
- type: "ImportNamespaceSpecifier";
- local: BabelNodeIdentifier;
-}
-
-declare class BabelNodeImportSpecifier extends BabelNode {
- type: "ImportSpecifier";
- local: BabelNodeIdentifier;
- imported: BabelNodeIdentifier;
- importKind?: "type" | "typeof";
-}
-
-declare class BabelNodeMetaProperty extends BabelNode {
- type: "MetaProperty";
- meta: BabelNodeIdentifier;
- property: BabelNodeIdentifier;
-}
-
-declare class BabelNodeClassMethod extends BabelNode {
- type: "ClassMethod";
- kind?: "get" | "set" | "method" | "constructor";
- key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement;
- computed?: boolean;
- abstract?: boolean;
- access?: "public" | "private" | "protected";
- accessibility?: "public" | "private" | "protected";
- async?: boolean;
- decorators?: Array<BabelNodeDecorator>;
- generator?: boolean;
- optional?: boolean;
- returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
-}
-
-declare class BabelNodeObjectPattern extends BabelNode {
- type: "ObjectPattern";
- properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>;
- decorators?: Array<BabelNodeDecorator>;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
-}
-
-declare class BabelNodeSpreadElement extends BabelNode {
- type: "SpreadElement";
- argument: BabelNodeExpression;
-}
-
-declare class BabelNodeSuper extends BabelNode {
- type: "Super";
-}
-
-declare class BabelNodeTaggedTemplateExpression extends BabelNode {
- type: "TaggedTemplateExpression";
- tag: BabelNodeExpression;
- quasi: BabelNodeTemplateLiteral;
- typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeTemplateElement extends BabelNode {
- type: "TemplateElement";
- value: { raw: string, cooked?: string };
- tail?: boolean;
-}
-
-declare class BabelNodeTemplateLiteral extends BabelNode {
- type: "TemplateLiteral";
- quasis: Array<BabelNodeTemplateElement>;
- expressions: Array<BabelNodeExpression>;
-}
-
-declare class BabelNodeYieldExpression extends BabelNode {
- type: "YieldExpression";
- argument?: BabelNodeExpression;
- delegate?: boolean;
-}
-
-declare class BabelNodeAnyTypeAnnotation extends BabelNode {
- type: "AnyTypeAnnotation";
-}
-
-declare class BabelNodeArrayTypeAnnotation extends BabelNode {
- type: "ArrayTypeAnnotation";
- elementType: BabelNodeFlowType;
-}
-
-declare class BabelNodeBooleanTypeAnnotation extends BabelNode {
- type: "BooleanTypeAnnotation";
-}
-
-declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode {
- type: "BooleanLiteralTypeAnnotation";
- value: boolean;
-}
-
-declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode {
- type: "NullLiteralTypeAnnotation";
-}
-
-declare class BabelNodeClassImplements extends BabelNode {
- type: "ClassImplements";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterInstantiation;
-}
-
-declare class BabelNodeDeclareClass extends BabelNode {
- type: "DeclareClass";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- body: BabelNodeObjectTypeAnnotation;
- mixins?: Array<BabelNodeInterfaceExtends>;
-}
-
-declare class BabelNodeDeclareFunction extends BabelNode {
- type: "DeclareFunction";
- id: BabelNodeIdentifier;
- predicate?: BabelNodeDeclaredPredicate;
-}
-
-declare class BabelNodeDeclareInterface extends BabelNode {
- type: "DeclareInterface";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- body: BabelNodeObjectTypeAnnotation;
- mixins?: Array<BabelNodeInterfaceExtends>;
-}
-
-declare class BabelNodeDeclareModule extends BabelNode {
- type: "DeclareModule";
- id: BabelNodeIdentifier | BabelNodeStringLiteral;
- body: BabelNodeBlockStatement;
- kind?: "CommonJS" | "ES";
-}
-
-declare class BabelNodeDeclareModuleExports extends BabelNode {
- type: "DeclareModuleExports";
- typeAnnotation: BabelNodeTypeAnnotation;
-}
-
-declare class BabelNodeDeclareTypeAlias extends BabelNode {
- type: "DeclareTypeAlias";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- right: BabelNodeFlowType;
-}
-
-declare class BabelNodeDeclareOpaqueType extends BabelNode {
- type: "DeclareOpaqueType";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- supertype?: BabelNodeFlowType;
-}
-
-declare class BabelNodeDeclareVariable extends BabelNode {
- type: "DeclareVariable";
- id: BabelNodeIdentifier;
-}
-
-declare class BabelNodeDeclareExportDeclaration extends BabelNode {
- type: "DeclareExportDeclaration";
- declaration?: BabelNodeFlow;
- specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>;
- source?: BabelNodeStringLiteral;
-}
-
-declare class BabelNodeDeclareExportAllDeclaration extends BabelNode {
- type: "DeclareExportAllDeclaration";
- source: BabelNodeStringLiteral;
- exportKind?: "type" | "value";
-}
-
-declare class BabelNodeDeclaredPredicate extends BabelNode {
- type: "DeclaredPredicate";
- value: BabelNodeFlow;
-}
-
-declare class BabelNodeExistsTypeAnnotation extends BabelNode {
- type: "ExistsTypeAnnotation";
-}
-
-declare class BabelNodeFunctionTypeAnnotation extends BabelNode {
- type: "FunctionTypeAnnotation";
- typeParameters?: BabelNodeTypeParameterDeclaration;
- params: Array<BabelNodeFunctionTypeParam>;
- rest?: BabelNodeFunctionTypeParam;
- returnType: BabelNodeFlowType;
-}
-
-declare class BabelNodeFunctionTypeParam extends BabelNode {
- type: "FunctionTypeParam";
- name?: BabelNodeIdentifier;
- typeAnnotation: BabelNodeFlowType;
- optional?: boolean;
-}
-
-declare class BabelNodeGenericTypeAnnotation extends BabelNode {
- type: "GenericTypeAnnotation";
- id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
- typeParameters?: BabelNodeTypeParameterInstantiation;
-}
-
-declare class BabelNodeInferredPredicate extends BabelNode {
- type: "InferredPredicate";
-}
-
-declare class BabelNodeInterfaceExtends extends BabelNode {
- type: "InterfaceExtends";
- id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
- typeParameters?: BabelNodeTypeParameterInstantiation;
-}
-
-declare class BabelNodeInterfaceDeclaration extends BabelNode {
- type: "InterfaceDeclaration";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- body: BabelNodeObjectTypeAnnotation;
- mixins?: Array<BabelNodeInterfaceExtends>;
-}
-
-declare class BabelNodeInterfaceTypeAnnotation extends BabelNode {
- type: "InterfaceTypeAnnotation";
- body: BabelNodeObjectTypeAnnotation;
-}
-
-declare class BabelNodeIntersectionTypeAnnotation extends BabelNode {
- type: "IntersectionTypeAnnotation";
- types: Array<BabelNodeFlowType>;
-}
-
-declare class BabelNodeMixedTypeAnnotation extends BabelNode {
- type: "MixedTypeAnnotation";
-}
-
-declare class BabelNodeEmptyTypeAnnotation extends BabelNode {
- type: "EmptyTypeAnnotation";
-}
-
-declare class BabelNodeNullableTypeAnnotation extends BabelNode {
- type: "NullableTypeAnnotation";
- typeAnnotation: BabelNodeFlowType;
-}
-
-declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode {
- type: "NumberLiteralTypeAnnotation";
- value: number;
-}
-
-declare class BabelNodeNumberTypeAnnotation extends BabelNode {
- type: "NumberTypeAnnotation";
-}
-
-declare class BabelNodeObjectTypeAnnotation extends BabelNode {
- type: "ObjectTypeAnnotation";
- properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>;
- indexers?: Array<BabelNodeObjectTypeIndexer>;
- callProperties?: Array<BabelNodeObjectTypeCallProperty>;
- internalSlots?: Array<BabelNodeObjectTypeInternalSlot>;
- exact?: boolean;
- inexact?: boolean;
-}
-
-declare class BabelNodeObjectTypeInternalSlot extends BabelNode {
- type: "ObjectTypeInternalSlot";
- id: BabelNodeIdentifier;
- value: BabelNodeFlowType;
- optional: boolean;
- method: boolean;
-}
-
-declare class BabelNodeObjectTypeCallProperty extends BabelNode {
- type: "ObjectTypeCallProperty";
- value: BabelNodeFlowType;
-}
-
-declare class BabelNodeObjectTypeIndexer extends BabelNode {
- type: "ObjectTypeIndexer";
- id?: BabelNodeIdentifier;
- key: BabelNodeFlowType;
- value: BabelNodeFlowType;
- variance?: BabelNodeVariance;
-}
-
-declare class BabelNodeObjectTypeProperty extends BabelNode {
- type: "ObjectTypeProperty";
- key: BabelNodeIdentifier | BabelNodeStringLiteral;
- value: BabelNodeFlowType;
- variance?: BabelNodeVariance;
- kind?: "init" | "get" | "set";
- optional?: boolean;
- proto?: boolean;
-}
-
-declare class BabelNodeObjectTypeSpreadProperty extends BabelNode {
- type: "ObjectTypeSpreadProperty";
- argument: BabelNodeFlowType;
-}
-
-declare class BabelNodeOpaqueType extends BabelNode {
- type: "OpaqueType";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- supertype?: BabelNodeFlowType;
- impltype: BabelNodeFlowType;
-}
-
-declare class BabelNodeQualifiedTypeIdentifier extends BabelNode {
- type: "QualifiedTypeIdentifier";
- id: BabelNodeIdentifier;
- qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
-}
-
-declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode {
- type: "StringLiteralTypeAnnotation";
- value: string;
-}
-
-declare class BabelNodeStringTypeAnnotation extends BabelNode {
- type: "StringTypeAnnotation";
-}
-
-declare class BabelNodeThisTypeAnnotation extends BabelNode {
- type: "ThisTypeAnnotation";
-}
-
-declare class BabelNodeTupleTypeAnnotation extends BabelNode {
- type: "TupleTypeAnnotation";
- types: Array<BabelNodeFlowType>;
-}
-
-declare class BabelNodeTypeofTypeAnnotation extends BabelNode {
- type: "TypeofTypeAnnotation";
- argument: BabelNodeFlowType;
-}
-
-declare class BabelNodeTypeAlias extends BabelNode {
- type: "TypeAlias";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTypeParameterDeclaration;
- right: BabelNodeFlowType;
-}
-
-declare class BabelNodeTypeAnnotation extends BabelNode {
- type: "TypeAnnotation";
- typeAnnotation: BabelNodeFlowType;
-}
-
-declare class BabelNodeTypeCastExpression extends BabelNode {
- type: "TypeCastExpression";
- expression: BabelNodeExpression;
- typeAnnotation: BabelNodeTypeAnnotation;
-}
-
-declare class BabelNodeTypeParameter extends BabelNode {
- type: "TypeParameter";
- bound?: BabelNodeTypeAnnotation;
- variance?: BabelNodeVariance;
- name?: string;
-}
-
-declare class BabelNodeTypeParameterDeclaration extends BabelNode {
- type: "TypeParameterDeclaration";
- params: Array<BabelNodeTypeParameter>;
-}
-
-declare class BabelNodeTypeParameterInstantiation extends BabelNode {
- type: "TypeParameterInstantiation";
- params: Array<BabelNodeFlowType>;
-}
-
-declare class BabelNodeUnionTypeAnnotation extends BabelNode {
- type: "UnionTypeAnnotation";
- types: Array<BabelNodeFlowType>;
-}
-
-declare class BabelNodeVariance extends BabelNode {
- type: "Variance";
- kind: "minus" | "plus";
-}
-
-declare class BabelNodeVoidTypeAnnotation extends BabelNode {
- type: "VoidTypeAnnotation";
-}
-
-declare class BabelNodeJSXAttribute extends BabelNode {
- type: "JSXAttribute";
- name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName;
- value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer;
-}
-
-declare class BabelNodeJSXClosingElement extends BabelNode {
- type: "JSXClosingElement";
- name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression;
-}
-
-declare class BabelNodeJSXElement extends BabelNode {
- type: "JSXElement";
- openingElement: BabelNodeJSXOpeningElement;
- closingElement?: BabelNodeJSXClosingElement;
- children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
- selfClosing: any;
-}
-
-declare class BabelNodeJSXEmptyExpression extends BabelNode {
- type: "JSXEmptyExpression";
-}
-
-declare class BabelNodeJSXExpressionContainer extends BabelNode {
- type: "JSXExpressionContainer";
- expression: BabelNodeExpression | BabelNodeJSXEmptyExpression;
-}
-
-declare class BabelNodeJSXSpreadChild extends BabelNode {
- type: "JSXSpreadChild";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeJSXIdentifier extends BabelNode {
- type: "JSXIdentifier";
- name: string;
-}
-
-declare class BabelNodeJSXMemberExpression extends BabelNode {
- type: "JSXMemberExpression";
- object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier;
- property: BabelNodeJSXIdentifier;
-}
-
-declare class BabelNodeJSXNamespacedName extends BabelNode {
- type: "JSXNamespacedName";
- namespace: BabelNodeJSXIdentifier;
- name: BabelNodeJSXIdentifier;
-}
-
-declare class BabelNodeJSXOpeningElement extends BabelNode {
- type: "JSXOpeningElement";
- name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression;
- attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>;
- selfClosing?: boolean;
- typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeJSXSpreadAttribute extends BabelNode {
- type: "JSXSpreadAttribute";
- argument: BabelNodeExpression;
-}
-
-declare class BabelNodeJSXText extends BabelNode {
- type: "JSXText";
- value: string;
-}
-
-declare class BabelNodeJSXFragment extends BabelNode {
- type: "JSXFragment";
- openingFragment: BabelNodeJSXOpeningFragment;
- closingFragment: BabelNodeJSXClosingFragment;
- children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
-}
-
-declare class BabelNodeJSXOpeningFragment extends BabelNode {
- type: "JSXOpeningFragment";
-}
-
-declare class BabelNodeJSXClosingFragment extends BabelNode {
- type: "JSXClosingFragment";
-}
-
-declare class BabelNodeNoop extends BabelNode {
- type: "Noop";
-}
-
-declare class BabelNodePlaceholder extends BabelNode {
- type: "Placeholder";
- expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
- name: BabelNodeIdentifier;
-}
-
-declare class BabelNodeArgumentPlaceholder extends BabelNode {
- type: "ArgumentPlaceholder";
-}
-
-declare class BabelNodeAwaitExpression extends BabelNode {
- type: "AwaitExpression";
- argument: BabelNodeExpression;
-}
-
-declare class BabelNodeBindExpression extends BabelNode {
- type: "BindExpression";
- object: any;
- callee: any;
-}
-
-declare class BabelNodeClassProperty extends BabelNode {
- type: "ClassProperty";
- key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
- value?: BabelNodeExpression;
- typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
- decorators?: Array<BabelNodeDecorator>;
- computed?: boolean;
- abstract?: boolean;
- accessibility?: "public" | "private" | "protected";
- definite?: boolean;
- optional?: boolean;
- readonly?: boolean;
-}
-
-declare class BabelNodeOptionalMemberExpression extends BabelNode {
- type: "OptionalMemberExpression";
- object: BabelNodeExpression;
- property: any;
- computed?: boolean;
- optional: boolean;
-}
-
-declare class BabelNodePipelineTopicExpression extends BabelNode {
- type: "PipelineTopicExpression";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodePipelineBareFunction extends BabelNode {
- type: "PipelineBareFunction";
- callee: BabelNodeExpression;
-}
-
-declare class BabelNodePipelinePrimaryTopicReference extends BabelNode {
- type: "PipelinePrimaryTopicReference";
-}
-
-declare class BabelNodeOptionalCallExpression extends BabelNode {
- type: "OptionalCallExpression";
- callee: BabelNodeExpression;
- arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>;
- optional: boolean;
- typeArguments?: BabelNodeTypeParameterInstantiation;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeClassPrivateProperty extends BabelNode {
- type: "ClassPrivateProperty";
- key: BabelNodePrivateName;
- value?: BabelNodeExpression;
-}
-
-declare class BabelNodeClassPrivateMethod extends BabelNode {
- type: "ClassPrivateMethod";
- kind?: "get" | "set" | "method" | "constructor";
- key: BabelNodePrivateName;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- body: BabelNodeBlockStatement;
- abstract?: boolean;
- access?: "public" | "private" | "protected";
- accessibility?: "public" | "private" | "protected";
- async?: boolean;
- computed?: boolean;
- decorators?: Array<BabelNodeDecorator>;
- generator?: boolean;
- optional?: boolean;
- returnType?: any;
- typeParameters?: any;
-}
-
-declare class BabelNodeImport extends BabelNode {
- type: "Import";
-}
-
-declare class BabelNodeDecorator extends BabelNode {
- type: "Decorator";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeDoExpression extends BabelNode {
- type: "DoExpression";
- body: BabelNodeBlockStatement;
-}
-
-declare class BabelNodeExportDefaultSpecifier extends BabelNode {
- type: "ExportDefaultSpecifier";
- exported: BabelNodeIdentifier;
-}
-
-declare class BabelNodeExportNamespaceSpecifier extends BabelNode {
- type: "ExportNamespaceSpecifier";
- exported: BabelNodeIdentifier;
-}
-
-declare class BabelNodePrivateName extends BabelNode {
- type: "PrivateName";
- id: BabelNodeIdentifier;
-}
-
-declare class BabelNodeBigIntLiteral extends BabelNode {
- type: "BigIntLiteral";
- value: string;
-}
-
-declare class BabelNodeTSParameterProperty extends BabelNode {
- type: "TSParameterProperty";
- parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern;
- accessibility?: "public" | "private" | "protected";
- readonly?: boolean;
-}
-
-declare class BabelNodeTSDeclareFunction extends BabelNode {
- type: "TSDeclareFunction";
- id?: BabelNodeIdentifier;
- typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
- async?: boolean;
- declare?: boolean;
- generator?: boolean;
-}
-
-declare class BabelNodeTSDeclareMethod extends BabelNode {
- type: "TSDeclareMethod";
- decorators?: Array<BabelNodeDecorator>;
- key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
- typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
- params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
- returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
- abstract?: boolean;
- access?: "public" | "private" | "protected";
- accessibility?: "public" | "private" | "protected";
- async?: boolean;
- computed?: boolean;
- generator?: boolean;
- kind?: "get" | "set" | "method" | "constructor";
- optional?: boolean;
-}
-
-declare class BabelNodeTSQualifiedName extends BabelNode {
- type: "TSQualifiedName";
- left: BabelNodeTSEntityName;
- right: BabelNodeIdentifier;
-}
-
-declare class BabelNodeTSCallSignatureDeclaration extends BabelNode {
- type: "TSCallSignatureDeclaration";
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
-}
-
-declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode {
- type: "TSConstructSignatureDeclaration";
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
-}
-
-declare class BabelNodeTSPropertySignature extends BabelNode {
- type: "TSPropertySignature";
- key: BabelNodeExpression;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
- initializer?: BabelNodeExpression;
- computed?: boolean;
- optional?: boolean;
- readonly?: boolean;
-}
-
-declare class BabelNodeTSMethodSignature extends BabelNode {
- type: "TSMethodSignature";
- key: BabelNodeExpression;
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
- computed?: boolean;
- optional?: boolean;
-}
-
-declare class BabelNodeTSIndexSignature extends BabelNode {
- type: "TSIndexSignature";
- parameters: Array<BabelNodeIdentifier>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
- readonly?: boolean;
-}
-
-declare class BabelNodeTSAnyKeyword extends BabelNode {
- type: "TSAnyKeyword";
-}
-
-declare class BabelNodeTSUnknownKeyword extends BabelNode {
- type: "TSUnknownKeyword";
-}
-
-declare class BabelNodeTSNumberKeyword extends BabelNode {
- type: "TSNumberKeyword";
-}
-
-declare class BabelNodeTSObjectKeyword extends BabelNode {
- type: "TSObjectKeyword";
-}
-
-declare class BabelNodeTSBooleanKeyword extends BabelNode {
- type: "TSBooleanKeyword";
-}
-
-declare class BabelNodeTSStringKeyword extends BabelNode {
- type: "TSStringKeyword";
-}
-
-declare class BabelNodeTSSymbolKeyword extends BabelNode {
- type: "TSSymbolKeyword";
-}
-
-declare class BabelNodeTSVoidKeyword extends BabelNode {
- type: "TSVoidKeyword";
-}
-
-declare class BabelNodeTSUndefinedKeyword extends BabelNode {
- type: "TSUndefinedKeyword";
-}
-
-declare class BabelNodeTSNullKeyword extends BabelNode {
- type: "TSNullKeyword";
-}
-
-declare class BabelNodeTSNeverKeyword extends BabelNode {
- type: "TSNeverKeyword";
-}
-
-declare class BabelNodeTSThisType extends BabelNode {
- type: "TSThisType";
-}
-
-declare class BabelNodeTSFunctionType extends BabelNode {
- type: "TSFunctionType";
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
-}
-
-declare class BabelNodeTSConstructorType extends BabelNode {
- type: "TSConstructorType";
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
- typeAnnotation?: BabelNodeTSTypeAnnotation;
-}
-
-declare class BabelNodeTSTypeReference extends BabelNode {
- type: "TSTypeReference";
- typeName: BabelNodeTSEntityName;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeTSTypePredicate extends BabelNode {
- type: "TSTypePredicate";
- parameterName: BabelNodeIdentifier | BabelNodeTSThisType;
- typeAnnotation: BabelNodeTSTypeAnnotation;
-}
-
-declare class BabelNodeTSTypeQuery extends BabelNode {
- type: "TSTypeQuery";
- exprName: BabelNodeTSEntityName | BabelNodeTSImportType;
-}
-
-declare class BabelNodeTSTypeLiteral extends BabelNode {
- type: "TSTypeLiteral";
- members: Array<BabelNodeTSTypeElement>;
-}
-
-declare class BabelNodeTSArrayType extends BabelNode {
- type: "TSArrayType";
- elementType: BabelNodeTSType;
-}
-
-declare class BabelNodeTSTupleType extends BabelNode {
- type: "TSTupleType";
- elementTypes: Array<BabelNodeTSType>;
-}
-
-declare class BabelNodeTSOptionalType extends BabelNode {
- type: "TSOptionalType";
- typeAnnotation: BabelNodeTSType;
-}
-
-declare class BabelNodeTSRestType extends BabelNode {
- type: "TSRestType";
- typeAnnotation: BabelNodeTSType;
-}
-
-declare class BabelNodeTSUnionType extends BabelNode {
- type: "TSUnionType";
- types: Array<BabelNodeTSType>;
-}
-
-declare class BabelNodeTSIntersectionType extends BabelNode {
- type: "TSIntersectionType";
- types: Array<BabelNodeTSType>;
-}
-
-declare class BabelNodeTSConditionalType extends BabelNode {
- type: "TSConditionalType";
- checkType: BabelNodeTSType;
- extendsType: BabelNodeTSType;
- trueType: BabelNodeTSType;
- falseType: BabelNodeTSType;
-}
-
-declare class BabelNodeTSInferType extends BabelNode {
- type: "TSInferType";
- typeParameter: BabelNodeTSTypeParameter;
-}
-
-declare class BabelNodeTSParenthesizedType extends BabelNode {
- type: "TSParenthesizedType";
- typeAnnotation: BabelNodeTSType;
-}
-
-declare class BabelNodeTSTypeOperator extends BabelNode {
- type: "TSTypeOperator";
- typeAnnotation: BabelNodeTSType;
- operator?: string;
-}
-
-declare class BabelNodeTSIndexedAccessType extends BabelNode {
- type: "TSIndexedAccessType";
- objectType: BabelNodeTSType;
- indexType: BabelNodeTSType;
-}
-
-declare class BabelNodeTSMappedType extends BabelNode {
- type: "TSMappedType";
- typeParameter: BabelNodeTSTypeParameter;
- typeAnnotation?: BabelNodeTSType;
- optional?: boolean;
- readonly?: boolean;
-}
-
-declare class BabelNodeTSLiteralType extends BabelNode {
- type: "TSLiteralType";
- literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral;
-}
-
-declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode {
- type: "TSExpressionWithTypeArguments";
- expression: BabelNodeTSEntityName;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeTSInterfaceDeclaration extends BabelNode {
- type: "TSInterfaceDeclaration";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- body: BabelNodeTSInterfaceBody;
- declare?: boolean;
-}
-
-declare class BabelNodeTSInterfaceBody extends BabelNode {
- type: "TSInterfaceBody";
- body: Array<BabelNodeTSTypeElement>;
-}
-
-declare class BabelNodeTSTypeAliasDeclaration extends BabelNode {
- type: "TSTypeAliasDeclaration";
- id: BabelNodeIdentifier;
- typeParameters?: BabelNodeTSTypeParameterDeclaration;
- typeAnnotation: BabelNodeTSType;
- declare?: boolean;
-}
-
-declare class BabelNodeTSAsExpression extends BabelNode {
- type: "TSAsExpression";
- expression: BabelNodeExpression;
- typeAnnotation: BabelNodeTSType;
-}
-
-declare class BabelNodeTSTypeAssertion extends BabelNode {
- type: "TSTypeAssertion";
- typeAnnotation: BabelNodeTSType;
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeTSEnumDeclaration extends BabelNode {
- type: "TSEnumDeclaration";
- id: BabelNodeIdentifier;
- members: Array<BabelNodeTSEnumMember>;
- declare?: boolean;
- initializer?: BabelNodeExpression;
-}
-
-declare class BabelNodeTSEnumMember extends BabelNode {
- type: "TSEnumMember";
- id: BabelNodeIdentifier | BabelNodeStringLiteral;
- initializer?: BabelNodeExpression;
-}
-
-declare class BabelNodeTSModuleDeclaration extends BabelNode {
- type: "TSModuleDeclaration";
- id: BabelNodeIdentifier | BabelNodeStringLiteral;
- body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration;
- declare?: boolean;
- global?: boolean;
-}
-
-declare class BabelNodeTSModuleBlock extends BabelNode {
- type: "TSModuleBlock";
- body: Array<BabelNodeStatement>;
-}
-
-declare class BabelNodeTSImportType extends BabelNode {
- type: "TSImportType";
- argument: BabelNodeStringLiteral;
- qualifier?: BabelNodeTSEntityName;
- typeParameters?: BabelNodeTSTypeParameterInstantiation;
-}
-
-declare class BabelNodeTSImportEqualsDeclaration extends BabelNode {
- type: "TSImportEqualsDeclaration";
- id: BabelNodeIdentifier;
- moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference;
- isExport?: boolean;
-}
-
-declare class BabelNodeTSExternalModuleReference extends BabelNode {
- type: "TSExternalModuleReference";
- expression: BabelNodeStringLiteral;
-}
-
-declare class BabelNodeTSNonNullExpression extends BabelNode {
- type: "TSNonNullExpression";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeTSExportAssignment extends BabelNode {
- type: "TSExportAssignment";
- expression: BabelNodeExpression;
-}
-
-declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode {
- type: "TSNamespaceExportDeclaration";
- id: BabelNodeIdentifier;
-}
-
-declare class BabelNodeTSTypeAnnotation extends BabelNode {
- type: "TSTypeAnnotation";
- typeAnnotation: BabelNodeTSType;
-}
-
-declare class BabelNodeTSTypeParameterInstantiation extends BabelNode {
- type: "TSTypeParameterInstantiation";
- params: Array<BabelNodeTSType>;
-}
-
-declare class BabelNodeTSTypeParameterDeclaration extends BabelNode {
- type: "TSTypeParameterDeclaration";
- params: Array<BabelNodeTSTypeParameter>;
-}
-
-declare class BabelNodeTSTypeParameter extends BabelNode {
- type: "TSTypeParameter";
- constraint?: BabelNodeTSType;
- name?: string;
-}
-
-type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression;
-type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression;
-type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;
-type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock;
-type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock;
-type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration;
-type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression;
-type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement;
-type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement;
-type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement;
-type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement;
-type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression;
-type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement;
-type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement;
-type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
-type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
-type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeBigIntLiteral;
-type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration;
-type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
-type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty;
-type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName;
-type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral;
-type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral;
-type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty;
-type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
-type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty;
-type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty;
-type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement;
-type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
-type BabelNodeClass = BabelNodeClassDeclaration | BabelNodeClassExpression;
-type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration;
-type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration;
-type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier;
-type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation;
-type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation;
-type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation;
-type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias;
-type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate;
-type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment;
-type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;
-type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;
-type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSVoidKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSNullKeyword | BabelNodeTSNeverKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;
-
-declare module "@babel/types" {
- declare function arrayExpression(elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression;
- declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression;
- declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression;
- declare function interpreterDirective(value: string): BabelNodeInterpreterDirective;
- declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective;
- declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral;
- declare function blockStatement(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>): BabelNodeBlockStatement;
- declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement;
- declare function callExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeCallExpression;
- declare function catchClause(param?: BabelNodeIdentifier, body: BabelNodeBlockStatement): BabelNodeCatchClause;
- declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression;
- declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement;
- declare function debuggerStatement(): BabelNodeDebuggerStatement;
- declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement;
- declare function emptyStatement(): BabelNodeEmptyStatement;
- declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement;
- declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile;
- declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement;
- declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement;
- declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, declare?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionDeclaration;
- declare function functionExpression(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionExpression;
- declare function identifier(name: string, decorators?: Array<BabelNodeDecorator>, optional?: boolean, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeIdentifier;
- declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement;
- declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement;
- declare function stringLiteral(value: string): BabelNodeStringLiteral;
- declare function numericLiteral(value: number): BabelNodeNumericLiteral;
- declare function nullLiteral(): BabelNodeNullLiteral;
- declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral;
- declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral;
- declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression;
- declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression;
- declare function newExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeNewExpression;
- declare function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective, sourceFile?: string): BabelNodeProgram;
- declare function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression;
- declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, async?: boolean, decorators?: Array<BabelNodeDecorator>, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeObjectMethod;
- declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<BabelNodeDecorator>): BabelNodeObjectProperty;
- declare function restElement(argument: BabelNodeLVal, decorators?: Array<BabelNodeDecorator>, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeRestElement;
- declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement;
- declare function sequenceExpression(expressions: Array<BabelNodeExpression>): BabelNodeSequenceExpression;
- declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression;
- declare function switchCase(test?: BabelNodeExpression, consequent: Array<BabelNodeStatement>): BabelNodeSwitchCase;
- declare function switchStatement(discriminant: BabelNodeExpression, cases: Array<BabelNodeSwitchCase>): BabelNodeSwitchStatement;
- declare function thisExpression(): BabelNodeThisExpression;
- declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement;
- declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement;
- declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression;
- declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression;
- declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<BabelNodeVariableDeclarator>, declare?: boolean): BabelNodeVariableDeclaration;
- declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression, definite?: boolean): BabelNodeVariableDeclarator;
- declare function whileStatement(test: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWhileStatement;
- declare function withStatement(object: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWithStatement;
- declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression, decorators?: Array<BabelNodeDecorator>, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeAssignmentPattern;
- declare function arrayPattern(elements: Array<BabelNodePatternLike>, decorators?: Array<BabelNodeDecorator>, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeArrayPattern;
- declare function arrowFunctionExpression(params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean, expression?: boolean, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeArrowFunctionExpression;
- declare function classBody(body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature>): BabelNodeClassBody;
- declare function classDeclaration(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>, abstract?: boolean, declare?: boolean, _implements?: Array<BabelNodeTSExpressionWithTypeArguments | BabelNodeClassImplements>, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassDeclaration;
- declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>, _implements?: Array<BabelNodeTSExpressionWithTypeArguments | BabelNodeClassImplements>, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassExpression;
- declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration;
- declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration;
- declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeExportNamedDeclaration;
- declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier;
- declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement;
- declare function importDeclaration(specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>, source: BabelNodeStringLiteral, importKind?: "type" | "typeof" | "value"): BabelNodeImportDeclaration;
- declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier;
- declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier;
- declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier, importKind?: "type" | "typeof"): BabelNodeImportSpecifier;
- declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty;
- declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, decorators?: Array<BabelNodeDecorator>, generator?: boolean, optional?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassMethod;
- declare function objectPattern(properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>, decorators?: Array<BabelNodeDecorator>, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeObjectPattern;
- declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement;
- declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeTaggedTemplateExpression;
- declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement;
- declare function templateLiteral(quasis: Array<BabelNodeTemplateElement>, expressions: Array<BabelNodeExpression>): BabelNodeTemplateLiteral;
- declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression;
- declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation;
- declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation;
- declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation;
- declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation;
- declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation;
- declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements;
- declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation, _implements?: Array<BabelNodeClassImplements>, mixins?: Array<BabelNodeInterfaceExtends>): BabelNodeDeclareClass;
- declare function declareFunction(id: BabelNodeIdentifier, predicate?: BabelNodeDeclaredPredicate): BabelNodeDeclareFunction;
- declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation, _implements?: Array<BabelNodeClassImplements>, mixins?: Array<BabelNodeInterfaceExtends>): BabelNodeDeclareInterface;
- declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule;
- declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports;
- declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias;
- declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType;
- declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable;
- declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral, _default?: boolean): BabelNodeDeclareExportDeclaration;
- declare function declareExportAllDeclaration(source: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeDeclareExportAllDeclaration;
- declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate;
- declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation;
- declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation;
- declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType, optional?: boolean): BabelNodeFunctionTypeParam;
- declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation;
- declare function inferredPredicate(): BabelNodeInferredPredicate;
- declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends;
- declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation, _implements?: Array<BabelNodeClassImplements>, mixins?: Array<BabelNodeInterfaceExtends>): BabelNodeInterfaceDeclaration;
- declare function interfaceTypeAnnotation(_extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation;
- declare function intersectionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeIntersectionTypeAnnotation;
- declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation;
- declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation;
- declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation;
- declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation;
- declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation;
- declare function objectTypeAnnotation(properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>, indexers?: Array<BabelNodeObjectTypeIndexer>, callProperties?: Array<BabelNodeObjectTypeCallProperty>, internalSlots?: Array<BabelNodeObjectTypeInternalSlot>, exact?: boolean, inexact?: boolean): BabelNodeObjectTypeAnnotation;
- declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot;
- declare function objectTypeCallProperty(value: BabelNodeFlowType, _static?: boolean): BabelNodeObjectTypeCallProperty;
- declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance, _static?: boolean): BabelNodeObjectTypeIndexer;
- declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance, kind?: "init" | "get" | "set", optional?: boolean, proto?: boolean, _static?: boolean): BabelNodeObjectTypeProperty;
- declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty;
- declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType;
- declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier;
- declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation;
- declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation;
- declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation;
- declare function tupleTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeTupleTypeAnnotation;
- declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation;
- declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias;
- declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation;
- declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression;
- declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance, name?: string): BabelNodeTypeParameter;
- declare function typeParameterDeclaration(params: Array<BabelNodeTypeParameter>): BabelNodeTypeParameterDeclaration;
- declare function typeParameterInstantiation(params: Array<BabelNodeFlowType>): BabelNodeTypeParameterInstantiation;
- declare function unionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation;
- declare function variance(kind: "minus" | "plus"): BabelNodeVariance;
- declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation;
- declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute;
- declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression): BabelNodeJSXClosingElement;
- declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>, selfClosing: any): BabelNodeJSXElement;
- declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression;
- declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer;
- declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild;
- declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier;
- declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression;
- declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName;
- declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression, attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>, selfClosing?: boolean, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeJSXOpeningElement;
- declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute;
- declare function jsxText(value: string): BabelNodeJSXText;
- declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>): BabelNodeJSXFragment;
- declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment;
- declare function jsxClosingFragment(): BabelNodeJSXClosingFragment;
- declare function noop(): BabelNodeNoop;
- declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder;
- declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder;
- declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression;
- declare function bindExpression(object: any, callee: any): BabelNodeBindExpression;
- declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, abstract?: boolean, accessibility?: "public" | "private" | "protected", definite?: boolean, optional?: boolean, readonly?: boolean, _static?: boolean): BabelNodeClassProperty;
- declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression;
- declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression;
- declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction;
- declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference;
- declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName>, optional: boolean, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeOptionalCallExpression;
- declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression): BabelNodeClassPrivateProperty;
- declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, decorators?: Array<BabelNodeDecorator>, generator?: boolean, optional?: boolean, returnType?: any, typeParameters?: any): BabelNodeClassPrivateMethod;
- declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator;
- declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression;
- declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier;
- declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier;
- declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName;
- declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral;
- declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern, accessibility?: "public" | "private" | "protected", readonly?: boolean): BabelNodeTSParameterProperty;
- declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, async?: boolean, declare?: boolean, generator?: boolean): BabelNodeTSDeclareFunction;
- declare function tsDeclareMethod(decorators?: Array<BabelNodeDecorator>, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean, _static?: boolean): BabelNodeTSDeclareMethod;
- declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName;
- declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration;
- declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration;
- declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression, computed?: boolean, optional?: boolean, readonly?: boolean): BabelNodeTSPropertySignature;
- declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation, computed?: boolean, optional?: boolean): BabelNodeTSMethodSignature;
- declare function tsIndexSignature(parameters: Array<BabelNodeIdentifier>, typeAnnotation?: BabelNodeTSTypeAnnotation, readonly?: boolean): BabelNodeTSIndexSignature;
- declare function tsAnyKeyword(): BabelNodeTSAnyKeyword;
- declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword;
- declare function tsNumberKeyword(): BabelNodeTSNumberKeyword;
- declare function tsObjectKeyword(): BabelNodeTSObjectKeyword;
- declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword;
- declare function tsStringKeyword(): BabelNodeTSStringKeyword;
- declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword;
- declare function tsVoidKeyword(): BabelNodeTSVoidKeyword;
- declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword;
- declare function tsNullKeyword(): BabelNodeTSNullKeyword;
- declare function tsNeverKeyword(): BabelNodeTSNeverKeyword;
- declare function tsThisType(): BabelNodeTSThisType;
- declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType;
- declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType;
- declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference;
- declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation: BabelNodeTSTypeAnnotation): BabelNodeTSTypePredicate;
- declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery;
- declare function tsTypeLiteral(members: Array<BabelNodeTSTypeElement>): BabelNodeTSTypeLiteral;
- declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType;
- declare function tsTupleType(elementTypes: Array<BabelNodeTSType>): BabelNodeTSTupleType;
- declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType;
- declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType;
- declare function tsUnionType(types: Array<BabelNodeTSType>): BabelNodeTSUnionType;
- declare function tsIntersectionType(types: Array<BabelNodeTSType>): BabelNodeTSIntersectionType;
- declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType;
- declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType;
- declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType;
- declare function tsTypeOperator(typeAnnotation: BabelNodeTSType, operator?: string): BabelNodeTSTypeOperator;
- declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType;
- declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, optional?: boolean, readonly?: boolean): BabelNodeTSMappedType;
- declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType;
- declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments;
- declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody, declare?: boolean): BabelNodeTSInterfaceDeclaration;
- declare function tsInterfaceBody(body: Array<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody;
- declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType, declare?: boolean): BabelNodeTSTypeAliasDeclaration;
- declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression;
- declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion;
- declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array<BabelNodeTSEnumMember>, _const?: boolean, declare?: boolean, initializer?: BabelNodeExpression): BabelNodeTSEnumDeclaration;
- declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember;
- declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration, declare?: boolean, global?: boolean): BabelNodeTSModuleDeclaration;
- declare function tsModuleBlock(body: Array<BabelNodeStatement>): BabelNodeTSModuleBlock;
- declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType;
- declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference, isExport?: boolean): BabelNodeTSImportEqualsDeclaration;
- declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference;
- declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression;
- declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment;
- declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration;
- declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation;
- declare function tsTypeParameterInstantiation(params: Array<BabelNodeTSType>): BabelNodeTSTypeParameterInstantiation;
- declare function tsTypeParameterDeclaration(params: Array<BabelNodeTSTypeParameter>): BabelNodeTSTypeParameterDeclaration;
- declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name?: string): BabelNodeTSTypeParameter;
- declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression)
- declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression)
- declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression)
- declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective)
- declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective)
- declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral)
- declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement)
- declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement)
- declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression)
- declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause)
- declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression)
- declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement)
- declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement)
- declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement)
- declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement)
- declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement)
- declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile)
- declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement)
- declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement)
- declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration)
- declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression)
- declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier)
- declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement)
- declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement)
- declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral)
- declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)
- declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral)
- declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral)
- declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)
- declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression)
- declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression)
- declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression)
- declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram)
- declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression)
- declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod)
- declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty)
- declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)
- declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement)
- declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression)
- declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression)
- declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase)
- declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement)
- declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression)
- declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement)
- declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement)
- declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression)
- declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression)
- declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration)
- declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator)
- declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement)
- declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement)
- declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern)
- declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern)
- declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression)
- declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody)
- declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration)
- declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression)
- declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration)
- declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration)
- declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration)
- declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier)
- declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement)
- declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration)
- declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier)
- declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier)
- declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier)
- declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty)
- declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod)
- declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern)
- declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)
- declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper)
- declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression)
- declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement)
- declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral)
- declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression)
- declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation)
- declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation)
- declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation)
- declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation)
- declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation)
- declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements)
- declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass)
- declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction)
- declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface)
- declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule)
- declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports)
- declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias)
- declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType)
- declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable)
- declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration)
- declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration)
- declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate)
- declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation)
- declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation)
- declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam)
- declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation)
- declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate)
- declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends)
- declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration)
- declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation)
- declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation)
- declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation)
- declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation)
- declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation)
- declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation)
- declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation)
- declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation)
- declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot)
- declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty)
- declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer)
- declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty)
- declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty)
- declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType)
- declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier)
- declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation)
- declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation)
- declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation)
- declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation)
- declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation)
- declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias)
- declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation)
- declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression)
- declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter)
- declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration)
- declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation)
- declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation)
- declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance)
- declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation)
- declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute)
- declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement)
- declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement)
- declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression)
- declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer)
- declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild)
- declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier)
- declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression)
- declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName)
- declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement)
- declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute)
- declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText)
- declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment)
- declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment)
- declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment)
- declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop)
- declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder)
- declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder)
- declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression)
- declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression)
- declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty)
- declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression)
- declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression)
- declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction)
- declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference)
- declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression)
- declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty)
- declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod)
- declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport)
- declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator)
- declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression)
- declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier)
- declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier)
- declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName)
- declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral)
- declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty)
- declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction)
- declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod)
- declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName)
- declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration)
- declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration)
- declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature)
- declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature)
- declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature)
- declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword)
- declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword)
- declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword)
- declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword)
- declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword)
- declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword)
- declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword)
- declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword)
- declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword)
- declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword)
- declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword)
- declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType)
- declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType)
- declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType)
- declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference)
- declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate)
- declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery)
- declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral)
- declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType)
- declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType)
- declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType)
- declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType)
- declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType)
- declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType)
- declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType)
- declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType)
- declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType)
- declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator)
- declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType)
- declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType)
- declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType)
- declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments)
- declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration)
- declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody)
- declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration)
- declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression)
- declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion)
- declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration)
- declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember)
- declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration)
- declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock)
- declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType)
- declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration)
- declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference)
- declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression)
- declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment)
- declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration)
- declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation)
- declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation)
- declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration)
- declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter)
- declare function isExpression(node: ?Object, opts?: ?Object): boolean
- declare function isBinary(node: ?Object, opts?: ?Object): boolean
- declare function isScopable(node: ?Object, opts?: ?Object): boolean
- declare function isBlockParent(node: ?Object, opts?: ?Object): boolean
- declare function isBlock(node: ?Object, opts?: ?Object): boolean
- declare function isStatement(node: ?Object, opts?: ?Object): boolean
- declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean
- declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean
- declare function isConditional(node: ?Object, opts?: ?Object): boolean
- declare function isLoop(node: ?Object, opts?: ?Object): boolean
- declare function isWhile(node: ?Object, opts?: ?Object): boolean
- declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean
- declare function isFor(node: ?Object, opts?: ?Object): boolean
- declare function isForXStatement(node: ?Object, opts?: ?Object): boolean
- declare function isFunction(node: ?Object, opts?: ?Object): boolean
- declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean
- declare function isPureish(node: ?Object, opts?: ?Object): boolean
- declare function isDeclaration(node: ?Object, opts?: ?Object): boolean
- declare function isPatternLike(node: ?Object, opts?: ?Object): boolean
- declare function isLVal(node: ?Object, opts?: ?Object): boolean
- declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean
- declare function isLiteral(node: ?Object, opts?: ?Object): boolean
- declare function isImmutable(node: ?Object, opts?: ?Object): boolean
- declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean
- declare function isMethod(node: ?Object, opts?: ?Object): boolean
- declare function isObjectMember(node: ?Object, opts?: ?Object): boolean
- declare function isProperty(node: ?Object, opts?: ?Object): boolean
- declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean
- declare function isPattern(node: ?Object, opts?: ?Object): boolean
- declare function isClass(node: ?Object, opts?: ?Object): boolean
- declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean
- declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean
- declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean
- declare function isFlow(node: ?Object, opts?: ?Object): boolean
- declare function isFlowType(node: ?Object, opts?: ?Object): boolean
- declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean
- declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean
- declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean
- declare function isJSX(node: ?Object, opts?: ?Object): boolean
- declare function isPrivate(node: ?Object, opts?: ?Object): boolean
- declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean
- declare function isTSType(node: ?Object, opts?: ?Object): boolean
- declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean
- declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean
- declare function isRestProperty(node: ?Object, opts?: ?Object): boolean
- declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean
- declare function validate(n: BabelNode, key: string, value: mixed): void;
- declare function clone<T>(n: T): T;
- declare function cloneDeep<T>(n: T): T;
- declare function removeProperties<T>(n: T, opts: ?{}): void;
- declare function removePropertiesDeep<T>(n: T, opts: ?{}): T;
- declare type TraversalAncestors = Array<{
- node: BabelNode,
- key: string,
- index?: number,
- }>;
- declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
- declare type TraversalHandlers<T> = {
- enter?: TraversalHandler<T>,
- exit?: TraversalHandler<T>,
- };
- declare function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js
deleted file mode 100644
index 46b32efe8a5..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/utils/inherit.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = inherit;
-
-function _uniq() {
- const data = _interopRequireDefault(require("lodash/uniq"));
-
- _uniq = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function inherit(key, child, parent) {
- if (child && parent) {
- child[key] = (0, _uniq().default)([].concat(child[key], parent[key]).filter(Boolean));
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js
deleted file mode 100644
index 24ffceb446e..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/generated/index.js
+++ /dev/null
@@ -1,4317 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.isArrayExpression = isArrayExpression;
-exports.isAssignmentExpression = isAssignmentExpression;
-exports.isBinaryExpression = isBinaryExpression;
-exports.isInterpreterDirective = isInterpreterDirective;
-exports.isDirective = isDirective;
-exports.isDirectiveLiteral = isDirectiveLiteral;
-exports.isBlockStatement = isBlockStatement;
-exports.isBreakStatement = isBreakStatement;
-exports.isCallExpression = isCallExpression;
-exports.isCatchClause = isCatchClause;
-exports.isConditionalExpression = isConditionalExpression;
-exports.isContinueStatement = isContinueStatement;
-exports.isDebuggerStatement = isDebuggerStatement;
-exports.isDoWhileStatement = isDoWhileStatement;
-exports.isEmptyStatement = isEmptyStatement;
-exports.isExpressionStatement = isExpressionStatement;
-exports.isFile = isFile;
-exports.isForInStatement = isForInStatement;
-exports.isForStatement = isForStatement;
-exports.isFunctionDeclaration = isFunctionDeclaration;
-exports.isFunctionExpression = isFunctionExpression;
-exports.isIdentifier = isIdentifier;
-exports.isIfStatement = isIfStatement;
-exports.isLabeledStatement = isLabeledStatement;
-exports.isStringLiteral = isStringLiteral;
-exports.isNumericLiteral = isNumericLiteral;
-exports.isNullLiteral = isNullLiteral;
-exports.isBooleanLiteral = isBooleanLiteral;
-exports.isRegExpLiteral = isRegExpLiteral;
-exports.isLogicalExpression = isLogicalExpression;
-exports.isMemberExpression = isMemberExpression;
-exports.isNewExpression = isNewExpression;
-exports.isProgram = isProgram;
-exports.isObjectExpression = isObjectExpression;
-exports.isObjectMethod = isObjectMethod;
-exports.isObjectProperty = isObjectProperty;
-exports.isRestElement = isRestElement;
-exports.isReturnStatement = isReturnStatement;
-exports.isSequenceExpression = isSequenceExpression;
-exports.isParenthesizedExpression = isParenthesizedExpression;
-exports.isSwitchCase = isSwitchCase;
-exports.isSwitchStatement = isSwitchStatement;
-exports.isThisExpression = isThisExpression;
-exports.isThrowStatement = isThrowStatement;
-exports.isTryStatement = isTryStatement;
-exports.isUnaryExpression = isUnaryExpression;
-exports.isUpdateExpression = isUpdateExpression;
-exports.isVariableDeclaration = isVariableDeclaration;
-exports.isVariableDeclarator = isVariableDeclarator;
-exports.isWhileStatement = isWhileStatement;
-exports.isWithStatement = isWithStatement;
-exports.isAssignmentPattern = isAssignmentPattern;
-exports.isArrayPattern = isArrayPattern;
-exports.isArrowFunctionExpression = isArrowFunctionExpression;
-exports.isClassBody = isClassBody;
-exports.isClassDeclaration = isClassDeclaration;
-exports.isClassExpression = isClassExpression;
-exports.isExportAllDeclaration = isExportAllDeclaration;
-exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
-exports.isExportNamedDeclaration = isExportNamedDeclaration;
-exports.isExportSpecifier = isExportSpecifier;
-exports.isForOfStatement = isForOfStatement;
-exports.isImportDeclaration = isImportDeclaration;
-exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
-exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
-exports.isImportSpecifier = isImportSpecifier;
-exports.isMetaProperty = isMetaProperty;
-exports.isClassMethod = isClassMethod;
-exports.isObjectPattern = isObjectPattern;
-exports.isSpreadElement = isSpreadElement;
-exports.isSuper = isSuper;
-exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
-exports.isTemplateElement = isTemplateElement;
-exports.isTemplateLiteral = isTemplateLiteral;
-exports.isYieldExpression = isYieldExpression;
-exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
-exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
-exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
-exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
-exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
-exports.isClassImplements = isClassImplements;
-exports.isDeclareClass = isDeclareClass;
-exports.isDeclareFunction = isDeclareFunction;
-exports.isDeclareInterface = isDeclareInterface;
-exports.isDeclareModule = isDeclareModule;
-exports.isDeclareModuleExports = isDeclareModuleExports;
-exports.isDeclareTypeAlias = isDeclareTypeAlias;
-exports.isDeclareOpaqueType = isDeclareOpaqueType;
-exports.isDeclareVariable = isDeclareVariable;
-exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
-exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
-exports.isDeclaredPredicate = isDeclaredPredicate;
-exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
-exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
-exports.isFunctionTypeParam = isFunctionTypeParam;
-exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
-exports.isInferredPredicate = isInferredPredicate;
-exports.isInterfaceExtends = isInterfaceExtends;
-exports.isInterfaceDeclaration = isInterfaceDeclaration;
-exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
-exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
-exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
-exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
-exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
-exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
-exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
-exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
-exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
-exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
-exports.isObjectTypeIndexer = isObjectTypeIndexer;
-exports.isObjectTypeProperty = isObjectTypeProperty;
-exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
-exports.isOpaqueType = isOpaqueType;
-exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
-exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
-exports.isStringTypeAnnotation = isStringTypeAnnotation;
-exports.isThisTypeAnnotation = isThisTypeAnnotation;
-exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
-exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
-exports.isTypeAlias = isTypeAlias;
-exports.isTypeAnnotation = isTypeAnnotation;
-exports.isTypeCastExpression = isTypeCastExpression;
-exports.isTypeParameter = isTypeParameter;
-exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
-exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
-exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
-exports.isVariance = isVariance;
-exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
-exports.isJSXAttribute = isJSXAttribute;
-exports.isJSXClosingElement = isJSXClosingElement;
-exports.isJSXElement = isJSXElement;
-exports.isJSXEmptyExpression = isJSXEmptyExpression;
-exports.isJSXExpressionContainer = isJSXExpressionContainer;
-exports.isJSXSpreadChild = isJSXSpreadChild;
-exports.isJSXIdentifier = isJSXIdentifier;
-exports.isJSXMemberExpression = isJSXMemberExpression;
-exports.isJSXNamespacedName = isJSXNamespacedName;
-exports.isJSXOpeningElement = isJSXOpeningElement;
-exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
-exports.isJSXText = isJSXText;
-exports.isJSXFragment = isJSXFragment;
-exports.isJSXOpeningFragment = isJSXOpeningFragment;
-exports.isJSXClosingFragment = isJSXClosingFragment;
-exports.isNoop = isNoop;
-exports.isPlaceholder = isPlaceholder;
-exports.isArgumentPlaceholder = isArgumentPlaceholder;
-exports.isAwaitExpression = isAwaitExpression;
-exports.isBindExpression = isBindExpression;
-exports.isClassProperty = isClassProperty;
-exports.isOptionalMemberExpression = isOptionalMemberExpression;
-exports.isPipelineTopicExpression = isPipelineTopicExpression;
-exports.isPipelineBareFunction = isPipelineBareFunction;
-exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
-exports.isOptionalCallExpression = isOptionalCallExpression;
-exports.isClassPrivateProperty = isClassPrivateProperty;
-exports.isClassPrivateMethod = isClassPrivateMethod;
-exports.isImport = isImport;
-exports.isDecorator = isDecorator;
-exports.isDoExpression = isDoExpression;
-exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
-exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
-exports.isPrivateName = isPrivateName;
-exports.isBigIntLiteral = isBigIntLiteral;
-exports.isTSParameterProperty = isTSParameterProperty;
-exports.isTSDeclareFunction = isTSDeclareFunction;
-exports.isTSDeclareMethod = isTSDeclareMethod;
-exports.isTSQualifiedName = isTSQualifiedName;
-exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
-exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
-exports.isTSPropertySignature = isTSPropertySignature;
-exports.isTSMethodSignature = isTSMethodSignature;
-exports.isTSIndexSignature = isTSIndexSignature;
-exports.isTSAnyKeyword = isTSAnyKeyword;
-exports.isTSUnknownKeyword = isTSUnknownKeyword;
-exports.isTSNumberKeyword = isTSNumberKeyword;
-exports.isTSObjectKeyword = isTSObjectKeyword;
-exports.isTSBooleanKeyword = isTSBooleanKeyword;
-exports.isTSStringKeyword = isTSStringKeyword;
-exports.isTSSymbolKeyword = isTSSymbolKeyword;
-exports.isTSVoidKeyword = isTSVoidKeyword;
-exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
-exports.isTSNullKeyword = isTSNullKeyword;
-exports.isTSNeverKeyword = isTSNeverKeyword;
-exports.isTSThisType = isTSThisType;
-exports.isTSFunctionType = isTSFunctionType;
-exports.isTSConstructorType = isTSConstructorType;
-exports.isTSTypeReference = isTSTypeReference;
-exports.isTSTypePredicate = isTSTypePredicate;
-exports.isTSTypeQuery = isTSTypeQuery;
-exports.isTSTypeLiteral = isTSTypeLiteral;
-exports.isTSArrayType = isTSArrayType;
-exports.isTSTupleType = isTSTupleType;
-exports.isTSOptionalType = isTSOptionalType;
-exports.isTSRestType = isTSRestType;
-exports.isTSUnionType = isTSUnionType;
-exports.isTSIntersectionType = isTSIntersectionType;
-exports.isTSConditionalType = isTSConditionalType;
-exports.isTSInferType = isTSInferType;
-exports.isTSParenthesizedType = isTSParenthesizedType;
-exports.isTSTypeOperator = isTSTypeOperator;
-exports.isTSIndexedAccessType = isTSIndexedAccessType;
-exports.isTSMappedType = isTSMappedType;
-exports.isTSLiteralType = isTSLiteralType;
-exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
-exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
-exports.isTSInterfaceBody = isTSInterfaceBody;
-exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
-exports.isTSAsExpression = isTSAsExpression;
-exports.isTSTypeAssertion = isTSTypeAssertion;
-exports.isTSEnumDeclaration = isTSEnumDeclaration;
-exports.isTSEnumMember = isTSEnumMember;
-exports.isTSModuleDeclaration = isTSModuleDeclaration;
-exports.isTSModuleBlock = isTSModuleBlock;
-exports.isTSImportType = isTSImportType;
-exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
-exports.isTSExternalModuleReference = isTSExternalModuleReference;
-exports.isTSNonNullExpression = isTSNonNullExpression;
-exports.isTSExportAssignment = isTSExportAssignment;
-exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
-exports.isTSTypeAnnotation = isTSTypeAnnotation;
-exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
-exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
-exports.isTSTypeParameter = isTSTypeParameter;
-exports.isExpression = isExpression;
-exports.isBinary = isBinary;
-exports.isScopable = isScopable;
-exports.isBlockParent = isBlockParent;
-exports.isBlock = isBlock;
-exports.isStatement = isStatement;
-exports.isTerminatorless = isTerminatorless;
-exports.isCompletionStatement = isCompletionStatement;
-exports.isConditional = isConditional;
-exports.isLoop = isLoop;
-exports.isWhile = isWhile;
-exports.isExpressionWrapper = isExpressionWrapper;
-exports.isFor = isFor;
-exports.isForXStatement = isForXStatement;
-exports.isFunction = isFunction;
-exports.isFunctionParent = isFunctionParent;
-exports.isPureish = isPureish;
-exports.isDeclaration = isDeclaration;
-exports.isPatternLike = isPatternLike;
-exports.isLVal = isLVal;
-exports.isTSEntityName = isTSEntityName;
-exports.isLiteral = isLiteral;
-exports.isImmutable = isImmutable;
-exports.isUserWhitespacable = isUserWhitespacable;
-exports.isMethod = isMethod;
-exports.isObjectMember = isObjectMember;
-exports.isProperty = isProperty;
-exports.isUnaryLike = isUnaryLike;
-exports.isPattern = isPattern;
-exports.isClass = isClass;
-exports.isModuleDeclaration = isModuleDeclaration;
-exports.isExportDeclaration = isExportDeclaration;
-exports.isModuleSpecifier = isModuleSpecifier;
-exports.isFlow = isFlow;
-exports.isFlowType = isFlowType;
-exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
-exports.isFlowDeclaration = isFlowDeclaration;
-exports.isFlowPredicate = isFlowPredicate;
-exports.isJSX = isJSX;
-exports.isPrivate = isPrivate;
-exports.isTSTypeElement = isTSTypeElement;
-exports.isTSType = isTSType;
-exports.isNumberLiteral = isNumberLiteral;
-exports.isRegexLiteral = isRegexLiteral;
-exports.isRestProperty = isRestProperty;
-exports.isSpreadProperty = isSpreadProperty;
-
-var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual"));
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function isArrayExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ArrayExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isAssignmentExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "AssignmentExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBinaryExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BinaryExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isInterpreterDirective(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "InterpreterDirective") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDirective(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Directive") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDirectiveLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DirectiveLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBlockStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BlockStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBreakStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BreakStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isCallExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "CallExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isCatchClause(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "CatchClause") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isConditionalExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ConditionalExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isContinueStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ContinueStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDebuggerStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DebuggerStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDoWhileStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DoWhileStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isEmptyStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "EmptyStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExpressionStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExpressionStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFile(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "File") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isForInStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ForInStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isForStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ForStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunctionDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FunctionDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunctionExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FunctionExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isIdentifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Identifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isIfStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "IfStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isLabeledStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "LabeledStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isStringLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "StringLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNumericLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NumericLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNullLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NullLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBooleanLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BooleanLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isRegExpLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "RegExpLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isLogicalExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "LogicalExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isMemberExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "MemberExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNewExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NewExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isProgram(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Program") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectMethod(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectMethod") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isRestElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "RestElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isReturnStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ReturnStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSequenceExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "SequenceExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isParenthesizedExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ParenthesizedExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSwitchCase(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "SwitchCase") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSwitchStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "SwitchStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isThisExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ThisExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isThrowStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ThrowStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTryStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TryStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isUnaryExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "UnaryExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isUpdateExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "UpdateExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isVariableDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "VariableDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isVariableDeclarator(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "VariableDeclarator") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isWhileStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "WhileStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isWithStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "WithStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isAssignmentPattern(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "AssignmentPattern") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isArrayPattern(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ArrayPattern") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isArrowFunctionExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ArrowFunctionExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassBody(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassBody") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportAllDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportAllDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportDefaultDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportDefaultDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportNamedDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportNamedDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isForOfStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ForOfStatement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImportDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ImportDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImportDefaultSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ImportDefaultSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImportNamespaceSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ImportNamespaceSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImportSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ImportSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isMetaProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "MetaProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassMethod(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassMethod") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectPattern(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectPattern") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSpreadElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "SpreadElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSuper(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Super") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTaggedTemplateExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TaggedTemplateExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTemplateElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TemplateElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTemplateLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TemplateLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isYieldExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "YieldExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isAnyTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "AnyTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isArrayTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ArrayTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBooleanTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BooleanTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBooleanLiteralTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BooleanLiteralTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNullLiteralTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NullLiteralTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassImplements(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassImplements") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareClass(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareClass") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareFunction(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareFunction") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareInterface(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareInterface") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareModule(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareModule") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareModuleExports(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareModuleExports") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareTypeAlias(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareTypeAlias") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareOpaqueType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareOpaqueType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareVariable(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareVariable") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareExportDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareExportDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclareExportAllDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclareExportAllDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclaredPredicate(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DeclaredPredicate") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExistsTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExistsTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunctionTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FunctionTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunctionTypeParam(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FunctionTypeParam") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isGenericTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "GenericTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isInferredPredicate(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "InferredPredicate") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isInterfaceExtends(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "InterfaceExtends") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isInterfaceDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "InterfaceDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isInterfaceTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "InterfaceTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isIntersectionTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "IntersectionTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isMixedTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "MixedTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isEmptyTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "EmptyTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNullableTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NullableTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNumberLiteralTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NumberLiteralTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNumberTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NumberTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeInternalSlot(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeInternalSlot") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeCallProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeCallProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeIndexer(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeIndexer") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectTypeSpreadProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectTypeSpreadProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isOpaqueType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "OpaqueType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isQualifiedTypeIdentifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "QualifiedTypeIdentifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isStringLiteralTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "StringLiteralTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isStringTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "StringTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isThisTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ThisTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTupleTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TupleTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeofTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeofTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeAlias(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeAlias") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeCastExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeCastExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeParameter(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeParameter") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeParameterDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeParameterDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTypeParameterInstantiation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TypeParameterInstantiation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isUnionTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "UnionTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isVariance(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Variance") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isVoidTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "VoidTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXAttribute(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXAttribute") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXClosingElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXClosingElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXEmptyExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXEmptyExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXExpressionContainer(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXExpressionContainer") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXSpreadChild(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXSpreadChild") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXIdentifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXIdentifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXMemberExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXMemberExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXNamespacedName(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXNamespacedName") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXOpeningElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXOpeningElement") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXSpreadAttribute(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXSpreadAttribute") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXText(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXText") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXFragment(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXFragment") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXOpeningFragment(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXOpeningFragment") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSXClosingFragment(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSXClosingFragment") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNoop(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Noop") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPlaceholder(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Placeholder") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isArgumentPlaceholder(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ArgumentPlaceholder") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isAwaitExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "AwaitExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBindExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BindExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isOptionalMemberExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "OptionalMemberExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPipelineTopicExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "PipelineTopicExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPipelineBareFunction(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "PipelineBareFunction") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPipelinePrimaryTopicReference(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "PipelinePrimaryTopicReference") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isOptionalCallExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "OptionalCallExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassPrivateProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassPrivateProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClassPrivateMethod(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ClassPrivateMethod") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImport(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Import") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDecorator(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Decorator") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDoExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "DoExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportDefaultSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportDefaultSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportNamespaceSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportNamespaceSpecifier") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPrivateName(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "PrivateName") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBigIntLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BigIntLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSParameterProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSParameterProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSDeclareFunction(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSDeclareFunction") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSDeclareMethod(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSDeclareMethod") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSQualifiedName(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSQualifiedName") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSCallSignatureDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSCallSignatureDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSConstructSignatureDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSConstructSignatureDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSPropertySignature(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSPropertySignature") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSMethodSignature(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSMethodSignature") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSIndexSignature(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSIndexSignature") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSAnyKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSAnyKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSUnknownKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSUnknownKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSNumberKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSNumberKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSObjectKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSObjectKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSBooleanKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSBooleanKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSStringKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSStringKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSSymbolKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSSymbolKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSVoidKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSVoidKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSUndefinedKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSUndefinedKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSNullKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSNullKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSNeverKeyword(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSNeverKeyword") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSThisType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSThisType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSFunctionType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSFunctionType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSConstructorType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSConstructorType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeReference(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeReference") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypePredicate(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypePredicate") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeQuery(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeQuery") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSArrayType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSArrayType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTupleType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTupleType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSOptionalType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSOptionalType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSRestType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSRestType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSUnionType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSUnionType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSIntersectionType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSIntersectionType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSConditionalType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSConditionalType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSInferType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSInferType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSParenthesizedType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSParenthesizedType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeOperator(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeOperator") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSIndexedAccessType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSIndexedAccessType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSMappedType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSMappedType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSLiteralType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSLiteralType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSExpressionWithTypeArguments(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSExpressionWithTypeArguments") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSInterfaceDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSInterfaceDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSInterfaceBody(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSInterfaceBody") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeAliasDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeAliasDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSAsExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSAsExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeAssertion(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeAssertion") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSEnumDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSEnumDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSEnumMember(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSEnumMember") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSModuleDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSModuleDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSModuleBlock(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSModuleBlock") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSImportType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSImportType") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSImportEqualsDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSImportEqualsDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSExternalModuleReference(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSExternalModuleReference") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSNonNullExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSNonNullExpression") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSExportAssignment(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSExportAssignment") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSNamespaceExportDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSNamespaceExportDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeAnnotation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeParameterInstantiation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeParameterInstantiation") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeParameterDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeParameterDeclaration") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeParameter(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeParameter") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExpression(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBinary(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isScopable(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBlockParent(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isBlock(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTerminatorless(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isCompletionStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isConditional(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isLoop(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isWhile(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExpressionWrapper(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFor(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isForXStatement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunction(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFunctionParent(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPureish(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPatternLike(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isLVal(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSEntityName(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isLiteral(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isImmutable(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isUserWhitespacable(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isMethod(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isObjectMember(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isProperty(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isUnaryLike(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPattern(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isClass(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isModuleDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isExportDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isModuleSpecifier(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFlow(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFlowType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFlowBaseAnnotation(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFlowDeclaration(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isFlowPredicate(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isJSX(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isPrivate(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSTypeElement(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isTSType(node, opts) {
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isNumberLiteral(node, opts) {
- console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "NumberLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isRegexLiteral(node, opts) {
- console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "RegexLiteral") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isRestProperty(node, opts) {
- console.trace("The node type RestProperty has been renamed to RestElement");
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "RestProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-}
-
-function isSpreadProperty(node, opts) {
- console.trace("The node type SpreadProperty has been renamed to SpreadElement");
- if (!node) return false;
- const nodeType = node.type;
-
- if (nodeType === "SpreadProperty") {
- if (typeof opts === "undefined") {
- return true;
- } else {
- return (0, _shallowEqual.default)(node, opts);
- }
- }
-
- return false;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
deleted file mode 100644
index 0c3b8ac4379..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = isNodesEquivalent;
-
-var _definitions = require("../definitions");
-
-function isNodesEquivalent(a, b) {
- if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
- return a === b;
- }
-
- if (a.type !== b.type) {
- return false;
- }
-
- const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
- const visitorKeys = _definitions.VISITOR_KEYS[a.type];
-
- for (const field of fields) {
- if (typeof a[field] !== typeof b[field]) {
- return false;
- }
-
- if (a[field] == null && b[field] == null) {
- continue;
- } else if (a[field] == null || b[field] == null) {
- return false;
- }
-
- if (Array.isArray(a[field])) {
- if (!Array.isArray(b[field])) {
- return false;
- }
-
- if (a[field].length !== b[field].length) {
- return false;
- }
-
- for (let i = 0; i < a[field].length; i++) {
- if (!isNodesEquivalent(a[field][i], b[field][i])) {
- return false;
- }
- }
-
- continue;
- }
-
- if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) {
- for (const key of Object.keys(a[field])) {
- if (a[field][key] !== b[field][key]) {
- return false;
- }
- }
-
- continue;
- }
-
- if (!isNodesEquivalent(a[field], b[field])) {
- return false;
- }
- }
-
- return true;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isReferenced.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isReferenced.js
deleted file mode 100644
index 46598dd1c87..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isReferenced.js
+++ /dev/null
@@ -1,112 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = isReferenced;
-
-function isReferenced(node, parent, grandparent) {
- switch (parent.type) {
- case "MemberExpression":
- case "JSXMemberExpression":
- case "OptionalMemberExpression":
- if (parent.property === node) {
- return !!parent.computed;
- }
-
- return parent.object === node;
-
- case "VariableDeclarator":
- return parent.init === node;
-
- case "ArrowFunctionExpression":
- return parent.body === node;
-
- case "ExportSpecifier":
- if (parent.source) {
- return false;
- }
-
- return parent.local === node;
-
- case "PrivateName":
- return false;
-
- case "ObjectProperty":
- case "ClassProperty":
- case "ClassPrivateProperty":
- case "ClassMethod":
- case "ClassPrivateMethod":
- case "ObjectMethod":
- if (parent.key === node) {
- return !!parent.computed;
- }
-
- if (parent.value === node) {
- return !grandparent || grandparent.type !== "ObjectPattern";
- }
-
- return true;
-
- case "ClassDeclaration":
- case "ClassExpression":
- return parent.superClass === node;
-
- case "AssignmentExpression":
- return parent.right === node;
-
- case "AssignmentPattern":
- return parent.right === node;
-
- case "LabeledStatement":
- return false;
-
- case "CatchClause":
- return false;
-
- case "RestElement":
- return false;
-
- case "BreakStatement":
- case "ContinueStatement":
- return false;
-
- case "FunctionDeclaration":
- case "FunctionExpression":
- return false;
-
- case "ExportNamespaceSpecifier":
- case "ExportDefaultSpecifier":
- return false;
-
- case "ImportDefaultSpecifier":
- case "ImportNamespaceSpecifier":
- case "ImportSpecifier":
- return false;
-
- case "JSXAttribute":
- return false;
-
- case "ObjectPattern":
- case "ArrayPattern":
- return false;
-
- case "MetaProperty":
- return false;
-
- case "ObjectTypeProperty":
- return parent.key !== node;
-
- case "TSEnumMember":
- return parent.id !== node;
-
- case "TSPropertySignature":
- if (parent.key === node) {
- return !!parent.computed;
- }
-
- return true;
- }
-
- return true;
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js
deleted file mode 100644
index c808631faf2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isScope.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = isScope;
-
-var _generated = require("./generated");
-
-function isScope(node, parent) {
- if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, {
- body: node
- })) {
- return false;
- }
-
- if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, {
- body: node
- })) {
- return false;
- }
-
- return (0, _generated.isScopable)(node);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js
deleted file mode 100644
index 8c54b7ac868..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/isValidIdentifier.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = isValidIdentifier;
-
-function _esutils() {
- const data = _interopRequireDefault(require("esutils"));
-
- _esutils = function () {
- return data;
- };
-
- return data;
-}
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function isValidIdentifier(name) {
- if (typeof name !== "string" || _esutils().default.keyword.isReservedWordES6(name, true)) {
- return false;
- } else if (name === "await") {
- return false;
- } else {
- return _esutils().default.keyword.isIdentifierNameES6(name);
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js
deleted file mode 100644
index 092da9913d9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/lib/validators/validate.js
+++ /dev/null
@@ -1,23 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = validate;
-exports.validateField = validateField;
-
-var _definitions = require("../definitions");
-
-function validate(node, key, val) {
- if (!node) return;
- const fields = _definitions.NODE_FIELDS[node.type];
- if (!fields) return;
- const field = fields[key];
- validateField(node, key, val, field);
-}
-
-function validateField(node, key, val, field) {
- if (!field || !field.validate) return;
- if (field.optional && val == null) return;
- field.validate(node, key, val);
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json b/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json
deleted file mode 100644
index e13eb11bd5a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bundleDependencies": false,
- "dependencies": {
- "esutils": "^2.0.2",
- "lodash": "^4.17.13",
- "to-fast-properties": "^2.0.0"
- },
- "deprecated": false,
- "description": "Babel Types is a Lodash-esque utility library for AST nodes",
- "devDependencies": {
- "@babel/generator": "^7.5.5",
- "@babel/parser": "^7.5.5"
- },
- "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
- "homepage": "https://babeljs.io/",
- "license": "MIT",
- "main": "lib/index.js",
- "name": "@babel/types",
- "repository": {
- "type": "git",
- "url": "https://github.com/babel/babel/tree/master/packages/babel-types"
- },
- "types": "lib/index.d.ts",
- "version": "7.5.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/docs.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/docs.js
deleted file mode 100644
index 3bbb5236240..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/docs.js
+++ /dev/null
@@ -1,117 +0,0 @@
-"use strict";
-
-const util = require("util");
-const stringifyValidator = require("../utils/stringifyValidator");
-const toFunctionName = require("../utils/toFunctionName");
-
-const types = require("../../");
-
-const readme = [
- `# @babel/types
-
-> This module contains methods for building ASTs manually and for checking the types of AST nodes.
-
-## Install
-
-\`\`\`sh
-npm install --save-dev @babel/types
-\`\`\`
-
-## API`,
-];
-
-const customTypes = {
- ClassMethod: {
- key: "if computed then `Expression` else `Identifier | Literal`",
- },
- Identifier: {
- name: "`string`",
- },
- MemberExpression: {
- property: "if computed then `Expression` else `Identifier`",
- },
- ObjectMethod: {
- key: "if computed then `Expression` else `Identifier | Literal`",
- },
- ObjectProperty: {
- key: "if computed then `Expression` else `Identifier | Literal`",
- },
-};
-Object.keys(types.BUILDER_KEYS)
- .sort()
- .forEach(function(key) {
- readme.push("### " + key[0].toLowerCase() + key.substr(1));
- readme.push("```javascript");
- readme.push(
- "t." +
- toFunctionName(key) +
- "(" +
- types.BUILDER_KEYS[key].join(", ") +
- ")"
- );
- readme.push("```");
- readme.push("");
- readme.push(
- "See also `t.is" +
- key +
- "(node, opts)` and `t.assert" +
- key +
- "(node, opts)`."
- );
- readme.push("");
- if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) {
- readme.push(
- "Aliases: " +
- types.ALIAS_KEYS[key]
- .map(function(key) {
- return "`" + key + "`";
- })
- .join(", ")
- );
- readme.push("");
- }
- Object.keys(types.NODE_FIELDS[key])
- .sort(function(fieldA, fieldB) {
- const indexA = types.BUILDER_KEYS[key].indexOf(fieldA);
- const indexB = types.BUILDER_KEYS[key].indexOf(fieldB);
- if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
- if (indexA === -1) return 1;
- if (indexB === -1) return -1;
- return indexA - indexB;
- })
- .forEach(function(field) {
- const defaultValue = types.NODE_FIELDS[key][field].default;
- const fieldDescription = ["`" + field + "`"];
- const validator = types.NODE_FIELDS[key][field].validate;
- if (customTypes[key] && customTypes[key][field]) {
- fieldDescription.push(`: ${customTypes[key][field]}`);
- } else if (validator) {
- try {
- fieldDescription.push(
- ": `" + stringifyValidator(validator, "") + "`"
- );
- } catch (ex) {
- if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") {
- console.log(
- "Unrecognised validator type for " + key + "." + field
- );
- console.dir(ex.validator, { depth: 10, colors: true });
- }
- }
- }
- if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) {
- fieldDescription.push(
- " (default: `" + util.inspect(defaultValue) + "`)"
- );
- } else {
- fieldDescription.push(" (required)");
- }
- readme.push(" - " + fieldDescription.join(""));
- });
-
- readme.push("");
- readme.push("---");
- readme.push("");
- });
-
-process.stdout.write(readme.join("\n"));
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js
deleted file mode 100644
index daab2411d74..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/flow.js
+++ /dev/null
@@ -1,153 +0,0 @@
-"use strict";
-
-const t = require("../../");
-const stringifyValidator = require("../utils/stringifyValidator");
-const toFunctionName = require("../utils/toFunctionName");
-
-const NODE_PREFIX = "BabelNode";
-
-let code = `// NOTE: This file is autogenerated. Do not modify.
-// See packages/babel-types/scripts/generators/flow.js for script used.
-
-declare class ${NODE_PREFIX}Comment {
- value: string;
- start: number;
- end: number;
- loc: ${NODE_PREFIX}SourceLocation;
-}
-
-declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment {
- type: "CommentBlock";
-}
-
-declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment {
- type: "CommentLine";
-}
-
-declare class ${NODE_PREFIX}SourceLocation {
- start: {
- line: number;
- column: number;
- };
-
- end: {
- line: number;
- column: number;
- };
-}
-
-declare class ${NODE_PREFIX} {
- leadingComments?: Array<${NODE_PREFIX}Comment>;
- innerComments?: Array<${NODE_PREFIX}Comment>;
- trailingComments?: Array<${NODE_PREFIX}Comment>;
- start: ?number;
- end: ?number;
- loc: ?${NODE_PREFIX}SourceLocation;
-}\n\n`;
-
-//
-
-const lines = [];
-
-for (const type in t.NODE_FIELDS) {
- const fields = t.NODE_FIELDS[type];
-
- const struct = ['type: "' + type + '";'];
- const args = [];
-
- Object.keys(t.NODE_FIELDS[type])
- .sort((fieldA, fieldB) => {
- const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
- const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
- if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
- if (indexA === -1) return 1;
- if (indexB === -1) return -1;
- return indexA - indexB;
- })
- .forEach(fieldName => {
- const field = fields[fieldName];
-
- let suffix = "";
- if (field.optional || field.default != null) suffix += "?";
-
- let typeAnnotation = "any";
-
- const validate = field.validate;
- if (validate) {
- typeAnnotation = stringifyValidator(validate, NODE_PREFIX);
- }
-
- if (typeAnnotation) {
- suffix += ": " + typeAnnotation;
- }
-
- args.push(t.toBindingIdentifierName(fieldName) + suffix);
-
- if (t.isValidIdentifier(fieldName)) {
- struct.push(fieldName + suffix + ";");
- }
- });
-
- code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} {
- ${struct.join("\n ").trim()}
-}\n\n`;
-
- // Flow chokes on super() and import() :/
- if (type !== "Super" && type !== "Import") {
- lines.push(
- `declare function ${toFunctionName(type)}(${args.join(
- ", "
- )}): ${NODE_PREFIX}${type};`
- );
- }
-}
-
-for (let i = 0; i < t.TYPES.length; i++) {
- let decl = `declare function is${
- t.TYPES[i]
- }(node: ?Object, opts?: ?Object): boolean`;
-
- if (t.NODE_FIELDS[t.TYPES[i]]) {
- decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`;
- }
-
- lines.push(decl);
-}
-
-lines.push(
- `declare function validate(n: BabelNode, key: string, value: mixed): void;`,
- `declare function clone<T>(n: T): T;`,
- `declare function cloneDeep<T>(n: T): T;`,
- `declare function removeProperties<T>(n: T, opts: ?{}): void;`,
- `declare function removePropertiesDeep<T>(n: T, opts: ?{}): T;`,
- `declare type TraversalAncestors = Array<{
- node: BabelNode,
- key: string,
- index?: number,
- }>;
- declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
- declare type TraversalHandlers<T> = {
- enter?: TraversalHandler<T>,
- exit?: TraversalHandler<T>,
- };`.replace(/(^|\n) {2}/g, "$1"),
- // eslint-disable-next-line
- `declare function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`
-);
-
-for (const type in t.FLIPPED_ALIAS_KEYS) {
- const types = t.FLIPPED_ALIAS_KEYS[type];
- code += `type ${NODE_PREFIX}${type} = ${types
- .map(type => `${NODE_PREFIX}${type}`)
- .join(" | ")};\n`;
-}
-
-code += `\ndeclare module "@babel/types" {
- ${lines
- .join("\n")
- .replace(/\n/g, "\n ")
- .trim()}
-}\n`;
-
-//
-
-process.stdout.write(code);
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateAsserts.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateAsserts.js
deleted file mode 100644
index 150e8557c73..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateAsserts.js
+++ /dev/null
@@ -1,43 +0,0 @@
-"use strict";
-const definitions = require("../../lib/definitions");
-
-function addAssertHelper(type) {
- return `export function assert${type}(node: Object, opts?: Object = {}): void {
- assert("${type}", node, opts) }
- `;
-}
-
-module.exports = function generateAsserts() {
- let output = `// @flow
-/*
- * This file is auto-generated! Do not modify it directly.
- * To re-generate run 'make build'
- */
-import is from "../../validators/is";
-
-function assert(type: string, node: Object, opts?: Object): void {
- if (!is(type, node, opts)) {
- throw new Error(
- \`Expected type "\${type}" with option \${JSON.stringify(opts)}, but instead got "\${node.type}".\`,
- );
- }
-}\n\n`;
-
- Object.keys(definitions.VISITOR_KEYS).forEach(type => {
- output += addAssertHelper(type);
- });
-
- Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
- output += addAssertHelper(type);
- });
-
- Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
- const newType = definitions.DEPRECATED_KEYS[type];
- output += `export function assert${type}(node: Object, opts: Object): void {
- console.trace("The node type ${type} has been renamed to ${newType}");
- assert("${type}", node, opts);
-}\n`;
- });
-
- return output;
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js
deleted file mode 100644
index 08a5b6fc615..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/generateBuilders.js
+++ /dev/null
@@ -1,43 +0,0 @@
-"use strict";
-const definitions = require("../../lib/definitions");
-const formatBuilderName = require("../utils/formatBuilderName");
-const lowerFirst = require("../utils/lowerFirst");
-
-module.exports = function generateBuilders() {
- let output = `// @flow
-/*
- * This file is auto-generated! Do not modify it directly.
- * To re-generate run 'make build'
- */
-import builder from "../builder";\n\n`;
-
- Object.keys(definitions.BUILDER_KEYS).forEach(type => {
- output += `export function ${type}(...args: Array<any>): Object { return builder("${type}", ...args); }
-export { ${type} as ${formatBuilderName(type)} };\n`;
-
- // This is needed for backwards compatibility.
- // It should be removed in the next major version.
- // JSXIdentifier -> jSXIdentifier
- if (/^[A-Z]{2}/.test(type)) {
- output += `export { ${type} as ${lowerFirst(type)} }\n`;
- }
- });
-
- Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
- const newType = definitions.DEPRECATED_KEYS[type];
- output += `export function ${type}(...args: Array<any>): Object {
- console.trace("The node type ${type} has been renamed to ${newType}");
- return ${type}("${type}", ...args);
-}
-export { ${type} as ${formatBuilderName(type)} };\n`;
-
- // This is needed for backwards compatibility.
- // It should be removed in the next major version.
- // JSXIdentifier -> jSXIdentifier
- if (/^[A-Z]{2}/.test(type)) {
- output += `export { ${type} as ${lowerFirst(type)} }\n`;
- }
- });
-
- return output;
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js
deleted file mode 100644
index b6019ec3732..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/generators/typescript.js
+++ /dev/null
@@ -1,200 +0,0 @@
-"use strict";
-
-const t = require("../../");
-const stringifyValidator = require("../utils/stringifyValidator");
-const toFunctionName = require("../utils/toFunctionName");
-
-let code = `// NOTE: This file is autogenerated. Do not modify.
-// See packages/babel-types/scripts/generators/typescript.js for script used.
-
-interface BaseComment {
- value: string;
- start: number;
- end: number;
- loc: SourceLocation;
- type: "CommentBlock" | "CommentLine";
-}
-
-export interface CommentBlock extends BaseComment {
- type: "CommentBlock";
-}
-
-export interface CommentLine extends BaseComment {
- type: "CommentLine";
-}
-
-export type Comment = CommentBlock | CommentLine;
-
-export interface SourceLocation {
- start: {
- line: number;
- column: number;
- };
-
- end: {
- line: number;
- column: number;
- };
-}
-
-interface BaseNode {
- leadingComments: ReadonlyArray<Comment> | null;
- innerComments: ReadonlyArray<Comment> | null;
- trailingComments: ReadonlyArray<Comment> | null;
- start: number | null;
- end: number | null;
- loc: SourceLocation | null;
- type: Node["type"];
-}
-
-export type Node = ${t.TYPES.sort().join(" | ")};\n\n`;
-
-//
-
-const lines = [];
-
-for (const type in t.NODE_FIELDS) {
- const fields = t.NODE_FIELDS[type];
- const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type);
-
- const struct = ['type: "' + type + '";'];
- const args = [];
-
- fieldNames.forEach(fieldName => {
- const field = fields[fieldName];
- let typeAnnotation = stringifyValidator(field.validate, "");
-
- if (isNullable(field) && !hasDefault(field)) {
- typeAnnotation += " | null";
- }
-
- if (areAllRemainingFieldsNullable(fieldName, fieldNames, fields)) {
- args.push(
- `${t.toBindingIdentifierName(fieldName)}${
- isNullable(field) ? "?:" : ":"
- } ${typeAnnotation}`
- );
- } else {
- args.push(
- `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${
- isNullable(field) ? " | undefined" : ""
- }`
- );
- }
-
- const alphaNumeric = /^\w+$/;
-
- if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) {
- struct.push(`${fieldName}: ${typeAnnotation};`);
- } else {
- struct.push(`"${fieldName}": ${typeAnnotation};`);
- }
- });
-
- code += `export interface ${type} extends BaseNode {
- ${struct.join("\n ").trim()}
-}\n\n`;
-
- // super and import are reserved words in JavaScript
- if (type !== "Super" && type !== "Import") {
- lines.push(
- `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};`
- );
- }
-}
-
-for (let i = 0; i < t.TYPES.length; i++) {
- let decl = `export function is${
- t.TYPES[i]
- }(node: object | null | undefined, opts?: object | null): `;
-
- if (t.NODE_FIELDS[t.TYPES[i]]) {
- decl += `node is ${t.TYPES[i]};`;
- } else if (t.FLIPPED_ALIAS_KEYS[t.TYPES[i]]) {
- decl += `node is ${t.TYPES[i]};`;
- } else {
- decl += `boolean;`;
- }
-
- lines.push(decl);
-}
-
-lines.push(
- `export function validate(n: Node, key: string, value: any): void;`,
- `export function clone<T extends Node>(n: T): T;`,
- `export function cloneDeep<T extends Node>(n: T): T;`,
- `export function removeProperties(
- n: Node,
- opts?: { preserveComments: boolean } | null
-): void;`,
- `export function removePropertiesDeep<T extends Node>(
- n: T,
- opts?: { preserveComments: boolean } | null
-): T;`,
- `export type TraversalAncestors = ReadonlyArray<{
- node: Node,
- key: string,
- index?: number,
- }>;
- export type TraversalHandler<T> = (node: Node, parent: TraversalAncestors, type: T) => void;
- export type TraversalHandlers<T> = {
- enter?: TraversalHandler<T>,
- exit?: TraversalHandler<T>,
- };`.replace(/(^|\n) {2}/g, "$1"),
- // eslint-disable-next-line
- `export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`
-);
-
-for (const type in t.DEPRECATED_KEYS) {
- code += `/**
- * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\`
- */
-export type ${type} = ${t.DEPRECATED_KEYS[type]};\n
-`;
-}
-
-for (const type in t.FLIPPED_ALIAS_KEYS) {
- const types = t.FLIPPED_ALIAS_KEYS[type];
- code += `export type ${type} = ${types
- .map(type => `${type}`)
- .join(" | ")};\n`;
-}
-code += "\n";
-
-code += "export interface Aliases {\n";
-for (const type in t.FLIPPED_ALIAS_KEYS) {
- code += ` ${type}: ${type};\n`;
-}
-code += "}\n\n";
-
-code += lines.join("\n") + "\n";
-
-//
-
-process.stdout.write(code);
-
-//
-
-function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) {
- const index = fieldNames.indexOf(fieldName);
- return fieldNames.slice(index).every(_ => isNullable(fields[_]));
-}
-
-function hasDefault(field) {
- return field.default != null;
-}
-
-function isNullable(field) {
- return field.optional || hasDefault(field);
-}
-
-function sortFieldNames(fields, type) {
- return fields.sort((fieldA, fieldB) => {
- const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
- const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
- if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
- if (indexA === -1) return 1;
- if (indexB === -1) return -1;
- return indexA - indexB;
- });
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js
deleted file mode 100644
index 1b543a9bfaf..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/@babel/types/scripts/utils/formatBuilderName.js
+++ /dev/null
@@ -1,9 +0,0 @@
-"use strict";
-
-const toLowerCase = Function.call.bind("".toLowerCase);
-
-module.exports = function formatBuilderName(type) {
- // FunctionExpression -> functionExpression
- // JSXIdentifier -> jsxIdentifier
- return type.replace(/^([A-Z](?=[a-z])|[A-Z]+(?=[A-Z]))/, toLowerCase);
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json b/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json
deleted file mode 100644
index 5663ace24b4..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/ansi-styles/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "ava": {
- "require": "babel-polyfill"
- },
- "bugs": {
- "url": "https://github.com/chalk/ansi-styles/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "color-convert": "^1.9.0"
- },
- "deprecated": false,
- "description": "ANSI escape codes for styling strings in the terminal",
- "devDependencies": {
- "ava": "*",
- "babel-polyfill": "^6.23.0",
- "svg-term-cli": "^2.1.1",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/chalk/ansi-styles#readme",
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "name": "ansi-styles",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/ansi-styles.git"
- },
- "scripts": {
- "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
- "test": "xo && ava"
- },
- "version": "3.2.1"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/chalk/package.json b/tools/node_modules/babel-eslint/node_modules/chalk/package.json
deleted file mode 100644
index 270fecdc347..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/chalk/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "bugs": {
- "url": "https://github.com/chalk/chalk/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- },
- "deprecated": false,
- "description": "Terminal string styling done right",
- "devDependencies": {
- "ava": "*",
- "coveralls": "^3.0.0",
- "execa": "^0.9.0",
- "flow-bin": "^0.68.0",
- "import-fresh": "^2.0.0",
- "matcha": "^0.7.0",
- "nyc": "^11.0.2",
- "resolve-from": "^4.0.0",
- "typescript": "^2.5.3",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js",
- "templates.js",
- "types/index.d.ts",
- "index.js.flow"
- ],
- "homepage": "https://github.com/chalk/chalk#readme",
- "keywords": [
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "str",
- "ansi",
- "style",
- "styles",
- "tty",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "license": "MIT",
- "name": "chalk",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/chalk.git"
- },
- "scripts": {
- "bench": "matcha benchmark.js",
- "coveralls": "nyc report --reporter=text-lcov | coveralls",
- "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava"
- },
- "types": "types/index.d.ts",
- "version": "2.4.2",
- "xo": {
- "envs": [
- "node",
- "mocha"
- ],
- "ignores": [
- "test/_flow.js"
- ]
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/color-convert/package.json b/tools/node_modules/babel-eslint/node_modules/color-convert/package.json
deleted file mode 100644
index 991f69308c2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/color-convert/package.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "author": {
- "name": "Heather Arthur",
- "email": "fayearthur@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/Qix-/color-convert/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "color-name": "1.1.3"
- },
- "deprecated": false,
- "description": "Plain color conversion functions",
- "devDependencies": {
- "chalk": "1.1.1",
- "xo": "0.11.2"
- },
- "files": [
- "index.js",
- "conversions.js",
- "css-keywords.js",
- "route.js"
- ],
- "homepage": "https://github.com/Qix-/color-convert#readme",
- "keywords": [
- "color",
- "colour",
- "convert",
- "converter",
- "conversion",
- "rgb",
- "hsl",
- "hsv",
- "hwb",
- "cmyk",
- "ansi",
- "ansi16"
- ],
- "license": "MIT",
- "name": "color-convert",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Qix-/color-convert.git"
- },
- "scripts": {
- "pretest": "xo",
- "test": "node test/basic.js"
- },
- "version": "1.9.3",
- "xo": {
- "rules": {
- "default-case": 0,
- "no-inline-comments": 0,
- "operator-linebreak": 0
- }
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/color-name/package.json b/tools/node_modules/babel-eslint/node_modules/color-name/package.json
deleted file mode 100644
index 87d0e72ec56..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/color-name/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "author": {
- "name": "DY",
- "email": "dfcreative@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/dfcreative/color-name/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A list of color names and its values",
- "homepage": "https://github.com/dfcreative/color-name",
- "keywords": [
- "color-name",
- "color",
- "color-keyword",
- "keyword"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "color-name",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/dfcreative/color-name.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.1.3"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js b/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js
deleted file mode 100644
index 89ad0c2175c..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/dist/debug.js
+++ /dev/null
@@ -1,912 +0,0 @@
-"use strict";
-
-function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
-
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
-
-function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
-
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
-
-function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-
-(function (f) {
- if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
- module.exports = f();
- } else if (typeof define === "function" && define.amd) {
- define([], f);
- } else {
- var g;
-
- if (typeof window !== "undefined") {
- g = window;
- } else if (typeof global !== "undefined") {
- g = global;
- } else if (typeof self !== "undefined") {
- g = self;
- } else {
- g = this;
- }
-
- g.debug = f();
- }
-})(function () {
- var define, module, exports;
- return function () {
- function r(e, n, t) {
- function o(i, f) {
- if (!n[i]) {
- if (!e[i]) {
- var c = "function" == typeof require && require;
- if (!f && c) return c(i, !0);
- if (u) return u(i, !0);
- var a = new Error("Cannot find module '" + i + "'");
- throw a.code = "MODULE_NOT_FOUND", a;
- }
-
- var p = n[i] = {
- exports: {}
- };
- e[i][0].call(p.exports, function (r) {
- var n = e[i][1][r];
- return o(n || r);
- }, p, p.exports, r, e, n, t);
- }
-
- return n[i].exports;
- }
-
- for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
- o(t[i]);
- }
-
- return o;
- }
-
- return r;
- }()({
- 1: [function (require, module, exports) {
- /**
- * Helpers.
- */
- var s = 1000;
- var m = s * 60;
- var h = m * 60;
- var d = h * 24;
- var w = d * 7;
- var y = d * 365.25;
- /**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
-
- module.exports = function (val, options) {
- options = options || {};
-
- var type = _typeof(val);
-
- if (type === 'string' && val.length > 0) {
- return parse(val);
- } else if (type === 'number' && isNaN(val) === false) {
- return options.long ? fmtLong(val) : fmtShort(val);
- }
-
- throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
- };
- /**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-
- function parse(str) {
- str = String(str);
-
- if (str.length > 100) {
- return;
- }
-
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
-
- if (!match) {
- return;
- }
-
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
-
- switch (type) {
- case 'years':
- case 'year':
- case 'yrs':
- case 'yr':
- case 'y':
- return n * y;
-
- case 'weeks':
- case 'week':
- case 'w':
- return n * w;
-
- case 'days':
- case 'day':
- case 'd':
- return n * d;
-
- case 'hours':
- case 'hour':
- case 'hrs':
- case 'hr':
- case 'h':
- return n * h;
-
- case 'minutes':
- case 'minute':
- case 'mins':
- case 'min':
- case 'm':
- return n * m;
-
- case 'seconds':
- case 'second':
- case 'secs':
- case 'sec':
- case 's':
- return n * s;
-
- case 'milliseconds':
- case 'millisecond':
- case 'msecs':
- case 'msec':
- case 'ms':
- return n;
-
- default:
- return undefined;
- }
- }
- /**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-
- function fmtShort(ms) {
- var msAbs = Math.abs(ms);
-
- if (msAbs >= d) {
- return Math.round(ms / d) + 'd';
- }
-
- if (msAbs >= h) {
- return Math.round(ms / h) + 'h';
- }
-
- if (msAbs >= m) {
- return Math.round(ms / m) + 'm';
- }
-
- if (msAbs >= s) {
- return Math.round(ms / s) + 's';
- }
-
- return ms + 'ms';
- }
- /**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-
- function fmtLong(ms) {
- var msAbs = Math.abs(ms);
-
- if (msAbs >= d) {
- return plural(ms, msAbs, d, 'day');
- }
-
- if (msAbs >= h) {
- return plural(ms, msAbs, h, 'hour');
- }
-
- if (msAbs >= m) {
- return plural(ms, msAbs, m, 'minute');
- }
-
- if (msAbs >= s) {
- return plural(ms, msAbs, s, 'second');
- }
-
- return ms + ' ms';
- }
- /**
- * Pluralization helper.
- */
-
-
- function plural(ms, msAbs, n, name) {
- var isPlural = msAbs >= n * 1.5;
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
- }
- }, {}],
- 2: [function (require, module, exports) {
- // shim for using process in browser
- var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
-
- var cachedSetTimeout;
- var cachedClearTimeout;
-
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
-
- function defaultClearTimeout() {
- throw new Error('clearTimeout has not been defined');
- }
-
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
-
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- })();
-
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- } // if setTimeout wasn't available but was latter defined
-
-
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
-
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch (e) {
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
- }
-
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- } // if clearTimeout wasn't available but was latter defined
-
-
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
-
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e) {
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
- }
-
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
-
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
-
- draining = false;
-
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
-
- if (queue.length) {
- drainQueue();
- }
- }
-
- function drainQueue() {
- if (draining) {
- return;
- }
-
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
- var len = queue.length;
-
- while (len) {
- currentQueue = queue;
- queue = [];
-
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
-
- queueIndex = -1;
- len = queue.length;
- }
-
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
-
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
-
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
-
- queue.push(new Item(fun, args));
-
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- }; // v8 likes predictible objects
-
-
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
-
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
-
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
-
- process.versions = {};
-
- function noop() {}
-
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
-
- process.listeners = function (name) {
- return [];
- };
-
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
-
- process.cwd = function () {
- return '/';
- };
-
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
-
- process.umask = function () {
- return 0;
- };
- }, {}],
- 3: [function (require, module, exports) {
- /**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
- function setup(env) {
- createDebug.debug = createDebug;
- createDebug.default = createDebug;
- createDebug.coerce = coerce;
- createDebug.disable = disable;
- createDebug.enable = enable;
- createDebug.enabled = enabled;
- createDebug.humanize = require('ms');
- Object.keys(env).forEach(function (key) {
- createDebug[key] = env[key];
- });
- /**
- * Active `debug` instances.
- */
-
- createDebug.instances = [];
- /**
- * The currently active debug mode names, and names to skip.
- */
-
- createDebug.names = [];
- createDebug.skips = [];
- /**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
-
- createDebug.formatters = {};
- /**
- * Selects a color for a debug namespace
- * @param {String} namespace The namespace string for the for the debug instance to be colored
- * @return {Number|String} An ANSI color code for the given namespace
- * @api private
- */
-
- function selectColor(namespace) {
- var hash = 0;
-
- for (var i = 0; i < namespace.length; i++) {
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
- }
-
- createDebug.selectColor = selectColor;
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
-
- function createDebug(namespace) {
- var prevTime;
-
- function debug() {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- // Disabled?
- if (!debug.enabled) {
- return;
- }
-
- var self = debug; // Set `diff` timestamp
-
- var curr = Number(new Date());
- var ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
- args[0] = createDebug.coerce(args[0]);
-
- if (typeof args[0] !== 'string') {
- // Anything else let's inspect with %O
- args.unshift('%O');
- } // Apply any `formatters` transformations
-
-
- var index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
- // If we encounter an escaped % then don't increase the array index
- if (match === '%%') {
- return match;
- }
-
- index++;
- var formatter = createDebug.formatters[format];
-
- if (typeof formatter === 'function') {
- var val = args[index];
- match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
-
- args.splice(index, 1);
- index--;
- }
-
- return match;
- }); // Apply env-specific formatting (colors, etc.)
-
- createDebug.formatArgs.call(self, args);
- var logFn = self.log || createDebug.log;
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.enabled = createDebug.enabled(namespace);
- debug.useColors = createDebug.useColors();
- debug.color = selectColor(namespace);
- debug.destroy = destroy;
- debug.extend = extend; // Debug.formatArgs = formatArgs;
- // debug.rawLog = rawLog;
- // env-specific initialization logic for debug instances
-
- if (typeof createDebug.init === 'function') {
- createDebug.init(debug);
- }
-
- createDebug.instances.push(debug);
- return debug;
- }
-
- function destroy() {
- var index = createDebug.instances.indexOf(this);
-
- if (index !== -1) {
- createDebug.instances.splice(index, 1);
- return true;
- }
-
- return false;
- }
-
- function extend(namespace, delimiter) {
- var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
- newDebug.log = this.log;
- return newDebug;
- }
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
-
-
- function enable(namespaces) {
- createDebug.save(namespaces);
- createDebug.names = [];
- createDebug.skips = [];
- var i;
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- var len = split.length;
-
- for (i = 0; i < len; i++) {
- if (!split[i]) {
- // ignore empty strings
- continue;
- }
-
- namespaces = split[i].replace(/\*/g, '.*?');
-
- if (namespaces[0] === '-') {
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
-
- for (i = 0; i < createDebug.instances.length; i++) {
- var instance = createDebug.instances[i];
- instance.enabled = createDebug.enabled(instance.namespace);
- }
- }
- /**
- * Disable debug output.
- *
- * @return {String} namespaces
- * @api public
- */
-
-
- function disable() {
- var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
- return '-' + namespace;
- }))).join(',');
- createDebug.enable('');
- return namespaces;
- }
- /**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
-
-
- function enabled(name) {
- if (name[name.length - 1] === '*') {
- return true;
- }
-
- var i;
- var len;
-
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
- if (createDebug.skips[i].test(name)) {
- return false;
- }
- }
-
- for (i = 0, len = createDebug.names.length; i < len; i++) {
- if (createDebug.names[i].test(name)) {
- return true;
- }
- }
-
- return false;
- }
- /**
- * Convert regexp to namespace
- *
- * @param {RegExp} regxep
- * @return {String} namespace
- * @api private
- */
-
-
- function toNamespace(regexp) {
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
- }
- /**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
-
-
- function coerce(val) {
- if (val instanceof Error) {
- return val.stack || val.message;
- }
-
- return val;
- }
-
- createDebug.enable(createDebug.load());
- return createDebug;
- }
-
- module.exports = setup;
- }, {
- "ms": 1
- }],
- 4: [function (require, module, exports) {
- (function (process) {
- /* eslint-env browser */
-
- /**
- * This is the web browser implementation of `debug()`.
- */
- exports.log = log;
- exports.formatArgs = formatArgs;
- exports.save = save;
- exports.load = load;
- exports.useColors = useColors;
- exports.storage = localstorage();
- /**
- * Colors.
- */
-
- exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
- /**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
- // eslint-disable-next-line complexity
-
- function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
- return true;
- } // Internet Explorer and Edge do not support colors.
-
-
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- } // Is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
-
-
- return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
- typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
- typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
- }
- /**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-
- function formatArgs(args) {
- args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
-
- if (!this.useColors) {
- return;
- }
-
- var c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
-
- var index = 0;
- var lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, function (match) {
- if (match === '%%') {
- return;
- }
-
- index++;
-
- if (match === '%c') {
- // We only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
- args.splice(lastC, 0, c);
- }
- /**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-
-
- function log() {
- var _console;
-
- // This hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
- }
- /**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-
- function save(namespaces) {
- try {
- if (namespaces) {
- exports.storage.setItem('debug', namespaces);
- } else {
- exports.storage.removeItem('debug');
- }
- } catch (error) {// Swallow
- // XXX (@Qix-) should we be logging these?
- }
- }
- /**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-
- function load() {
- var r;
-
- try {
- r = exports.storage.getItem('debug');
- } catch (error) {} // Swallow
- // XXX (@Qix-) should we be logging these?
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
-
-
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = process.env.DEBUG;
- }
-
- return r;
- }
- /**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-
- function localstorage() {
- try {
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
- // The Browser also has localStorage in the global context.
- return localStorage;
- } catch (error) {// Swallow
- // XXX (@Qix-) should we be logging these?
- }
- }
-
- module.exports = require('./common')(exports);
- var formatters = module.exports.formatters;
- /**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
- formatters.j = function (v) {
- try {
- return JSON.stringify(v);
- } catch (error) {
- return '[UnexpectedJSONParseError]: ' + error.message;
- }
- };
- }).call(this, require('_process'));
- }, {
- "./common": 3,
- "_process": 2
- }]
- }, {}, [4])(4);
-});
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/package.json b/tools/node_modules/babel-eslint/node_modules/debug/package.json
deleted file mode 100644
index 7bc94f7f061..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "author": {
- "name": "TJ Holowaychuk",
- "email": "tj@vision-media.ca"
- },
- "browser": "./src/browser.js",
- "bugs": {
- "url": "https://github.com/visionmedia/debug/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Nathan Rajlich",
- "email": "nathan@tootallnate.net",
- "url": "http://n8.io"
- },
- {
- "name": "Andrew Rhyne",
- "email": "rhyneandrew@gmail.com"
- }
- ],
- "dependencies": {
- "ms": "^2.1.1"
- },
- "deprecated": false,
- "description": "small debugging utility",
- "devDependencies": {
- "@babel/cli": "^7.0.0",
- "@babel/core": "^7.0.0",
- "@babel/preset-env": "^7.0.0",
- "browserify": "14.4.0",
- "chai": "^3.5.0",
- "concurrently": "^3.1.0",
- "coveralls": "^3.0.2",
- "istanbul": "^0.4.5",
- "karma": "^3.0.0",
- "karma-chai": "^0.1.0",
- "karma-mocha": "^1.3.0",
- "karma-phantomjs-launcher": "^1.0.2",
- "mocha": "^5.2.0",
- "mocha-lcov-reporter": "^1.2.0",
- "rimraf": "^2.5.4",
- "xo": "^0.23.0"
- },
- "files": [
- "src",
- "dist/debug.js",
- "LICENSE",
- "README.md"
- ],
- "homepage": "https://github.com/visionmedia/debug#readme",
- "keywords": [
- "debug",
- "log",
- "debugger"
- ],
- "license": "MIT",
- "main": "./src/index.js",
- "name": "debug",
- "repository": {
- "type": "git",
- "url": "git://github.com/visionmedia/debug.git"
- },
- "scripts": {
- "build": "npm run build:debug && npm run build:test",
- "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js",
- "build:test": "babel -d dist test.js",
- "clean": "rimraf dist coverage",
- "lint": "xo",
- "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .",
- "pretest:browser": "npm run build",
- "test": "npm run test:node && npm run test:browser",
- "test:browser": "karma start --single-run",
- "test:coverage": "cat ./coverage/lcov.info | coveralls",
- "test:node": "istanbul cover _mocha -- test.js"
- },
- "unpkg": "./dist/debug.js",
- "version": "4.1.1"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/src/browser.js b/tools/node_modules/babel-eslint/node_modules/debug/src/browser.js
deleted file mode 100644
index 5f34c0d0a73..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/browser.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-
-/**
- * Colors.
- */
-
-exports.colors = [
- '#0000CC',
- '#0000FF',
- '#0033CC',
- '#0033FF',
- '#0066CC',
- '#0066FF',
- '#0099CC',
- '#0099FF',
- '#00CC00',
- '#00CC33',
- '#00CC66',
- '#00CC99',
- '#00CCCC',
- '#00CCFF',
- '#3300CC',
- '#3300FF',
- '#3333CC',
- '#3333FF',
- '#3366CC',
- '#3366FF',
- '#3399CC',
- '#3399FF',
- '#33CC00',
- '#33CC33',
- '#33CC66',
- '#33CC99',
- '#33CCCC',
- '#33CCFF',
- '#6600CC',
- '#6600FF',
- '#6633CC',
- '#6633FF',
- '#66CC00',
- '#66CC33',
- '#9900CC',
- '#9900FF',
- '#9933CC',
- '#9933FF',
- '#99CC00',
- '#99CC33',
- '#CC0000',
- '#CC0033',
- '#CC0066',
- '#CC0099',
- '#CC00CC',
- '#CC00FF',
- '#CC3300',
- '#CC3333',
- '#CC3366',
- '#CC3399',
- '#CC33CC',
- '#CC33FF',
- '#CC6600',
- '#CC6633',
- '#CC9900',
- '#CC9933',
- '#CCCC00',
- '#CCCC33',
- '#FF0000',
- '#FF0033',
- '#FF0066',
- '#FF0099',
- '#FF00CC',
- '#FF00FF',
- '#FF3300',
- '#FF3333',
- '#FF3366',
- '#FF3399',
- '#FF33CC',
- '#FF33FF',
- '#FF6600',
- '#FF6633',
- '#FF9900',
- '#FF9933',
- '#FFCC00',
- '#FFCC33'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-// eslint-disable-next-line complexity
-function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
- return true;
- }
-
- // Internet Explorer and Edge do not support colors.
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- }
-
- // Is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
- // Is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
- // Is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
- // Double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- args[0] = (this.useColors ? '%c' : '') +
- this.namespace +
- (this.useColors ? ' %c' : ' ') +
- args[0] +
- (this.useColors ? '%c ' : ' ') +
- '+' + module.exports.humanize(this.diff);
-
- if (!this.useColors) {
- return;
- }
-
- const c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit');
-
- // The final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
- let index = 0;
- let lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, match => {
- if (match === '%%') {
- return;
- }
- index++;
- if (match === '%c') {
- // We only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
-
- args.splice(lastC, 0, c);
-}
-
-/**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-function log(...args) {
- // This hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return typeof console === 'object' &&
- console.log &&
- console.log(...args);
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- try {
- if (namespaces) {
- exports.storage.setItem('debug', namespaces);
- } else {
- exports.storage.removeItem('debug');
- }
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-function load() {
- let r;
- try {
- r = exports.storage.getItem('debug');
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = process.env.DEBUG;
- }
-
- return r;
-}
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage() {
- try {
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
- // The Browser also has localStorage in the global context.
- return localStorage;
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-module.exports = require('./common')(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
- try {
- return JSON.stringify(v);
- } catch (error) {
- return '[UnexpectedJSONParseError]: ' + error.message;
- }
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/src/common.js b/tools/node_modules/babel-eslint/node_modules/debug/src/common.js
deleted file mode 100644
index 2f82b8dc7d8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/common.js
+++ /dev/null
@@ -1,266 +0,0 @@
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
-
-function setup(env) {
- createDebug.debug = createDebug;
- createDebug.default = createDebug;
- createDebug.coerce = coerce;
- createDebug.disable = disable;
- createDebug.enable = enable;
- createDebug.enabled = enabled;
- createDebug.humanize = require('ms');
-
- Object.keys(env).forEach(key => {
- createDebug[key] = env[key];
- });
-
- /**
- * Active `debug` instances.
- */
- createDebug.instances = [];
-
- /**
- * The currently active debug mode names, and names to skip.
- */
-
- createDebug.names = [];
- createDebug.skips = [];
-
- /**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
- createDebug.formatters = {};
-
- /**
- * Selects a color for a debug namespace
- * @param {String} namespace The namespace string for the for the debug instance to be colored
- * @return {Number|String} An ANSI color code for the given namespace
- * @api private
- */
- function selectColor(namespace) {
- let hash = 0;
-
- for (let i = 0; i < namespace.length; i++) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
- }
- createDebug.selectColor = selectColor;
-
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
- function createDebug(namespace) {
- let prevTime;
-
- function debug(...args) {
- // Disabled?
- if (!debug.enabled) {
- return;
- }
-
- const self = debug;
-
- // Set `diff` timestamp
- const curr = Number(new Date());
- const ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- args[0] = createDebug.coerce(args[0]);
-
- if (typeof args[0] !== 'string') {
- // Anything else let's inspect with %O
- args.unshift('%O');
- }
-
- // Apply any `formatters` transformations
- let index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
- // If we encounter an escaped % then don't increase the array index
- if (match === '%%') {
- return match;
- }
- index++;
- const formatter = createDebug.formatters[format];
- if (typeof formatter === 'function') {
- const val = args[index];
- match = formatter.call(self, val);
-
- // Now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
-
- // Apply env-specific formatting (colors, etc.)
- createDebug.formatArgs.call(self, args);
-
- const logFn = self.log || createDebug.log;
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.enabled = createDebug.enabled(namespace);
- debug.useColors = createDebug.useColors();
- debug.color = selectColor(namespace);
- debug.destroy = destroy;
- debug.extend = extend;
- // Debug.formatArgs = formatArgs;
- // debug.rawLog = rawLog;
-
- // env-specific initialization logic for debug instances
- if (typeof createDebug.init === 'function') {
- createDebug.init(debug);
- }
-
- createDebug.instances.push(debug);
-
- return debug;
- }
-
- function destroy() {
- const index = createDebug.instances.indexOf(this);
- if (index !== -1) {
- createDebug.instances.splice(index, 1);
- return true;
- }
- return false;
- }
-
- function extend(namespace, delimiter) {
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
- newDebug.log = this.log;
- return newDebug;
- }
-
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
- function enable(namespaces) {
- createDebug.save(namespaces);
-
- createDebug.names = [];
- createDebug.skips = [];
-
- let i;
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- const len = split.length;
-
- for (i = 0; i < len; i++) {
- if (!split[i]) {
- // ignore empty strings
- continue;
- }
-
- namespaces = split[i].replace(/\*/g, '.*?');
-
- if (namespaces[0] === '-') {
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
-
- for (i = 0; i < createDebug.instances.length; i++) {
- const instance = createDebug.instances[i];
- instance.enabled = createDebug.enabled(instance.namespace);
- }
- }
-
- /**
- * Disable debug output.
- *
- * @return {String} namespaces
- * @api public
- */
- function disable() {
- const namespaces = [
- ...createDebug.names.map(toNamespace),
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
- ].join(',');
- createDebug.enable('');
- return namespaces;
- }
-
- /**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
- function enabled(name) {
- if (name[name.length - 1] === '*') {
- return true;
- }
-
- let i;
- let len;
-
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
- if (createDebug.skips[i].test(name)) {
- return false;
- }
- }
-
- for (i = 0, len = createDebug.names.length; i < len; i++) {
- if (createDebug.names[i].test(name)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Convert regexp to namespace
- *
- * @param {RegExp} regxep
- * @return {String} namespace
- * @api private
- */
- function toNamespace(regexp) {
- return regexp.toString()
- .substring(2, regexp.toString().length - 2)
- .replace(/\.\*\?$/, '*');
- }
-
- /**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
- function coerce(val) {
- if (val instanceof Error) {
- return val.stack || val.message;
- }
- return val;
- }
-
- createDebug.enable(createDebug.load());
-
- return createDebug;
-}
-
-module.exports = setup;
diff --git a/tools/node_modules/babel-eslint/node_modules/debug/src/node.js b/tools/node_modules/babel-eslint/node_modules/debug/src/node.js
deleted file mode 100644
index 5e1f1541a05..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/debug/src/node.js
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * Module dependencies.
- */
-
-const tty = require('tty');
-const util = require('util');
-
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
- // eslint-disable-next-line import/no-extraneous-dependencies
- const supportsColor = require('supports-color');
-
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
- exports.colors = [
- 20,
- 21,
- 26,
- 27,
- 32,
- 33,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44,
- 45,
- 56,
- 57,
- 62,
- 63,
- 68,
- 69,
- 74,
- 75,
- 76,
- 77,
- 78,
- 79,
- 80,
- 81,
- 92,
- 93,
- 98,
- 99,
- 112,
- 113,
- 128,
- 129,
- 134,
- 135,
- 148,
- 149,
- 160,
- 161,
- 162,
- 163,
- 164,
- 165,
- 166,
- 167,
- 168,
- 169,
- 170,
- 171,
- 172,
- 173,
- 178,
- 179,
- 184,
- 185,
- 196,
- 197,
- 198,
- 199,
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 209,
- 214,
- 215,
- 220,
- 221
- ];
- }
-} catch (error) {
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-exports.inspectOpts = Object.keys(process.env).filter(key => {
- return /^debug_/i.test(key);
-}).reduce((obj, key) => {
- // Camel-case
- const prop = key
- .substring(6)
- .toLowerCase()
- .replace(/_([a-z])/g, (_, k) => {
- return k.toUpperCase();
- });
-
- // Coerce string value into JS value
- let val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === 'null') {
- val = null;
- } else {
- val = Number(val);
- }
-
- obj[prop] = val;
- return obj;
-}, {});
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
- return 'colors' in exports.inspectOpts ?
- Boolean(exports.inspectOpts.colors) :
- tty.isatty(process.stderr.fd);
-}
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- const {namespace: name, useColors} = this;
-
- if (useColors) {
- const c = this.color;
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
-
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
- } else {
- args[0] = getDate() + name + ' ' + args[0];
- }
-}
-
-function getDate() {
- if (exports.inspectOpts.hideDate) {
- return '';
- }
- return new Date().toISOString() + ' ';
-}
-
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-function log(...args) {
- return process.stderr.write(util.format(...args) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- if (namespaces) {
- process.env.DEBUG = namespaces;
- } else {
- // If you set a process.env field to null or undefined, it gets cast to the
- // string 'null' or 'undefined'. Just delete instead.
- delete process.env.DEBUG;
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
- return process.env.DEBUG;
-}
-
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-function init(debug) {
- debug.inspectOpts = {};
-
- const keys = Object.keys(exports.inspectOpts);
- for (let i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
-}
-
-module.exports = require('./common')(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts)
- .replace(/\s*\n\s*/g, ' ');
-};
-
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-formatters.O = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json b/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json
deleted file mode 100644
index ced6973347e..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/escape-string-regexp/package.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/escape-string-regexp/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Escape RegExp special characters",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=0.8.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
- "keywords": [
- "escape",
- "regex",
- "regexp",
- "re",
- "regular",
- "expression",
- "string",
- "str",
- "special",
- "characters"
- ],
- "license": "MIT",
- "maintainers": [
- {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- {
- "name": "Joshua Boy Nicolai Appelman",
- "email": "joshua@jbna.nl",
- "url": "jbna.nl"
- }
- ],
- "name": "escape-string-regexp",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "1.0.5"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json
deleted file mode 100644
index d31b7b29439..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json
+++ /dev/null
@@ -1,280 +0,0 @@
-{
- "AssignmentExpression": [
- "left",
- "right"
- ],
- "AssignmentPattern": [
- "left",
- "right"
- ],
- "ArrayExpression": [
- "elements"
- ],
- "ArrayPattern": [
- "elements"
- ],
- "ArrowFunctionExpression": [
- "params",
- "body"
- ],
- "AwaitExpression": [
- "argument"
- ],
- "BlockStatement": [
- "body"
- ],
- "BinaryExpression": [
- "left",
- "right"
- ],
- "BreakStatement": [
- "label"
- ],
- "CallExpression": [
- "callee",
- "arguments"
- ],
- "CatchClause": [
- "param",
- "body"
- ],
- "ClassBody": [
- "body"
- ],
- "ClassDeclaration": [
- "id",
- "superClass",
- "body"
- ],
- "ClassExpression": [
- "id",
- "superClass",
- "body"
- ],
- "ConditionalExpression": [
- "test",
- "consequent",
- "alternate"
- ],
- "ContinueStatement": [
- "label"
- ],
- "DebuggerStatement": [],
- "DoWhileStatement": [
- "body",
- "test"
- ],
- "EmptyStatement": [],
- "ExportAllDeclaration": [
- "source"
- ],
- "ExportDefaultDeclaration": [
- "declaration"
- ],
- "ExportNamedDeclaration": [
- "declaration",
- "specifiers",
- "source"
- ],
- "ExportSpecifier": [
- "exported",
- "local"
- ],
- "ExpressionStatement": [
- "expression"
- ],
- "ExperimentalRestProperty": [
- "argument"
- ],
- "ExperimentalSpreadProperty": [
- "argument"
- ],
- "ForStatement": [
- "init",
- "test",
- "update",
- "body"
- ],
- "ForInStatement": [
- "left",
- "right",
- "body"
- ],
- "ForOfStatement": [
- "left",
- "right",
- "body"
- ],
- "FunctionDeclaration": [
- "id",
- "params",
- "body"
- ],
- "FunctionExpression": [
- "id",
- "params",
- "body"
- ],
- "Identifier": [],
- "IfStatement": [
- "test",
- "consequent",
- "alternate"
- ],
- "ImportDeclaration": [
- "specifiers",
- "source"
- ],
- "ImportDefaultSpecifier": [
- "local"
- ],
- "ImportExpression": [
- "source"
- ],
- "ImportNamespaceSpecifier": [
- "local"
- ],
- "ImportSpecifier": [
- "imported",
- "local"
- ],
- "JSXAttribute": [
- "name",
- "value"
- ],
- "JSXClosingElement": [
- "name"
- ],
- "JSXElement": [
- "openingElement",
- "children",
- "closingElement"
- ],
- "JSXEmptyExpression": [],
- "JSXExpressionContainer": [
- "expression"
- ],
- "JSXIdentifier": [],
- "JSXMemberExpression": [
- "object",
- "property"
- ],
- "JSXNamespacedName": [
- "namespace",
- "name"
- ],
- "JSXOpeningElement": [
- "name",
- "attributes"
- ],
- "JSXSpreadAttribute": [
- "argument"
- ],
- "JSXText": [],
- "JSXFragment": [
- "openingFragment",
- "children",
- "closingFragment"
- ],
- "Literal": [],
- "LabeledStatement": [
- "label",
- "body"
- ],
- "LogicalExpression": [
- "left",
- "right"
- ],
- "MemberExpression": [
- "object",
- "property"
- ],
- "MetaProperty": [
- "meta",
- "property"
- ],
- "MethodDefinition": [
- "key",
- "value"
- ],
- "NewExpression": [
- "callee",
- "arguments"
- ],
- "ObjectExpression": [
- "properties"
- ],
- "ObjectPattern": [
- "properties"
- ],
- "Program": [
- "body"
- ],
- "Property": [
- "key",
- "value"
- ],
- "RestElement": [
- "argument"
- ],
- "ReturnStatement": [
- "argument"
- ],
- "SequenceExpression": [
- "expressions"
- ],
- "SpreadElement": [
- "argument"
- ],
- "Super": [],
- "SwitchStatement": [
- "discriminant",
- "cases"
- ],
- "SwitchCase": [
- "test",
- "consequent"
- ],
- "TaggedTemplateExpression": [
- "tag",
- "quasi"
- ],
- "TemplateElement": [],
- "TemplateLiteral": [
- "quasis",
- "expressions"
- ],
- "ThisExpression": [],
- "ThrowStatement": [
- "argument"
- ],
- "TryStatement": [
- "block",
- "handler",
- "finalizer"
- ],
- "UnaryExpression": [
- "argument"
- ],
- "UpdateExpression": [
- "argument"
- ],
- "VariableDeclaration": [
- "declarations"
- ],
- "VariableDeclarator": [
- "id",
- "init"
- ],
- "WhileStatement": [
- "test",
- "body"
- ],
- "WithStatement": [
- "object",
- "body"
- ],
- "YieldExpression": [
- "argument"
- ]
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json b/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json
deleted file mode 100644
index 68eec940691..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/eslint-visitor-keys/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "author": {
- "name": "Toru Nagashima",
- "url": "https://github.com/mysticatea"
- },
- "bugs": {
- "url": "https://github.com/eslint/eslint-visitor-keys/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Constants and utilities about visitor keys to traverse AST.",
- "devDependencies": {
- "eslint": "^4.7.2",
- "eslint-config-eslint": "^4.0.0",
- "eslint-release": "^1.0.0",
- "mocha": "^3.5.3",
- "nyc": "^11.2.1",
- "opener": "^1.4.3"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://github.com/eslint/eslint-visitor-keys#readme",
- "keywords": [],
- "license": "Apache-2.0",
- "main": "lib/index.js",
- "name": "eslint-visitor-keys",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/eslint/eslint-visitor-keys.git"
- },
- "scripts": {
- "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
- "generate-alpharelease": "eslint-generate-prerelease alpha",
- "generate-betarelease": "eslint-generate-prerelease beta",
- "generate-rcrelease": "eslint-generate-prerelease rc",
- "generate-release": "eslint-generate-release",
- "lint": "eslint lib tests/lib",
- "pretest": "npm run -s lint",
- "publish-release": "eslint-publish-release",
- "test": "nyc mocha tests/lib"
- },
- "version": "1.1.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/README.md b/tools/node_modules/babel-eslint/node_modules/esutils/README.md
deleted file mode 100644
index 517526cfb99..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/README.md
+++ /dev/null
@@ -1,174 +0,0 @@
-### esutils [![Build Status](https://secure.travis-ci.org/estools/esutils.svg)](http://travis-ci.org/estools/esutils)
-esutils ([esutils](http://github.com/estools/esutils)) is
-utility box for ECMAScript language tools.
-
-### API
-
-### ast
-
-#### ast.isExpression(node)
-
-Returns true if `node` is an Expression as defined in ECMA262 edition 5.1 section
-[11](https://es5.github.io/#x11).
-
-#### ast.isStatement(node)
-
-Returns true if `node` is a Statement as defined in ECMA262 edition 5.1 section
-[12](https://es5.github.io/#x12).
-
-#### ast.isIterationStatement(node)
-
-Returns true if `node` is an IterationStatement as defined in ECMA262 edition
-5.1 section [12.6](https://es5.github.io/#x12.6).
-
-#### ast.isSourceElement(node)
-
-Returns true if `node` is a SourceElement as defined in ECMA262 edition 5.1
-section [14](https://es5.github.io/#x14).
-
-#### ast.trailingStatement(node)
-
-Returns `Statement?` if `node` has trailing `Statement`.
-```js
-if (cond)
- consequent;
-```
-When taking this `IfStatement`, returns `consequent;` statement.
-
-#### ast.isProblematicIfStatement(node)
-
-Returns true if `node` is a problematic IfStatement. If `node` is a problematic `IfStatement`, `node` cannot be represented as an one on one JavaScript code.
-```js
-{
- type: 'IfStatement',
- consequent: {
- type: 'WithStatement',
- body: {
- type: 'IfStatement',
- consequent: {type: 'EmptyStatement'}
- }
- },
- alternate: {type: 'EmptyStatement'}
-}
-```
-The above node cannot be represented as a JavaScript code, since the top level `else` alternate belongs to an inner `IfStatement`.
-
-
-### code
-
-#### code.isDecimalDigit(code)
-
-Return true if provided code is decimal digit.
-
-#### code.isHexDigit(code)
-
-Return true if provided code is hexadecimal digit.
-
-#### code.isOctalDigit(code)
-
-Return true if provided code is octal digit.
-
-#### code.isWhiteSpace(code)
-
-Return true if provided code is white space. White space characters are formally defined in ECMA262.
-
-#### code.isLineTerminator(code)
-
-Return true if provided code is line terminator. Line terminator characters are formally defined in ECMA262.
-
-#### code.isIdentifierStart(code)
-
-Return true if provided code can be the first character of ECMA262 Identifier. They are formally defined in ECMA262.
-
-#### code.isIdentifierPart(code)
-
-Return true if provided code can be the trailing character of ECMA262 Identifier. They are formally defined in ECMA262.
-
-### keyword
-
-#### keyword.isKeywordES5(id, strict)
-
-Returns `true` if provided identifier string is a Keyword or Future Reserved Word
-in ECMA262 edition 5.1. They are formally defined in ECMA262 sections
-[7.6.1.1](http://es5.github.io/#x7.6.1.1) and [7.6.1.2](http://es5.github.io/#x7.6.1.2),
-respectively. If the `strict` flag is truthy, this function additionally checks whether
-`id` is a Keyword or Future Reserved Word under strict mode.
-
-#### keyword.isKeywordES6(id, strict)
-
-Returns `true` if provided identifier string is a Keyword or Future Reserved Word
-in ECMA262 edition 6. They are formally defined in ECMA262 sections
-[11.6.2.1](http://ecma-international.org/ecma-262/6.0/#sec-keywords) and
-[11.6.2.2](http://ecma-international.org/ecma-262/6.0/#sec-future-reserved-words),
-respectively. If the `strict` flag is truthy, this function additionally checks whether
-`id` is a Keyword or Future Reserved Word under strict mode.
-
-#### keyword.isReservedWordES5(id, strict)
-
-Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 5.1.
-They are formally defined in ECMA262 section [7.6.1](http://es5.github.io/#x7.6.1).
-If the `strict` flag is truthy, this function additionally checks whether `id`
-is a Reserved Word under strict mode.
-
-#### keyword.isReservedWordES6(id, strict)
-
-Returns `true` if provided identifier string is a Reserved Word in ECMA262 edition 6.
-They are formally defined in ECMA262 section [11.6.2](http://ecma-international.org/ecma-262/6.0/#sec-reserved-words).
-If the `strict` flag is truthy, this function additionally checks whether `id`
-is a Reserved Word under strict mode.
-
-#### keyword.isRestrictedWord(id)
-
-Returns `true` if provided identifier string is one of `eval` or `arguments`.
-They are restricted in strict mode code throughout ECMA262 edition 5.1 and
-in ECMA262 edition 6 section [12.1.1](http://ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors).
-
-#### keyword.isIdentifierNameES5(id)
-
-Return true if provided identifier string is an IdentifierName as specified in
-ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6).
-
-#### keyword.isIdentifierNameES6(id)
-
-Return true if provided identifier string is an IdentifierName as specified in
-ECMA262 edition 6 section [11.6](http://ecma-international.org/ecma-262/6.0/#sec-names-and-keywords).
-
-#### keyword.isIdentifierES5(id, strict)
-
-Return true if provided identifier string is an Identifier as specified in
-ECMA262 edition 5.1 section [7.6](https://es5.github.io/#x7.6). If the `strict`
-flag is truthy, this function additionally checks whether `id` is an Identifier
-under strict mode.
-
-#### keyword.isIdentifierES6(id, strict)
-
-Return true if provided identifier string is an Identifier as specified in
-ECMA262 edition 6 section [12.1](http://ecma-international.org/ecma-262/6.0/#sec-identifiers).
-If the `strict` flag is truthy, this function additionally checks whether `id`
-is an Identifier under strict mode.
-
-### License
-
-Copyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation)
- (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js
deleted file mode 100644
index 8faadae1ce7..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/ast.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-(function () {
- 'use strict';
-
- function isExpression(node) {
- if (node == null) { return false; }
- switch (node.type) {
- case 'ArrayExpression':
- case 'AssignmentExpression':
- case 'BinaryExpression':
- case 'CallExpression':
- case 'ConditionalExpression':
- case 'FunctionExpression':
- case 'Identifier':
- case 'Literal':
- case 'LogicalExpression':
- case 'MemberExpression':
- case 'NewExpression':
- case 'ObjectExpression':
- case 'SequenceExpression':
- case 'ThisExpression':
- case 'UnaryExpression':
- case 'UpdateExpression':
- return true;
- }
- return false;
- }
-
- function isIterationStatement(node) {
- if (node == null) { return false; }
- switch (node.type) {
- case 'DoWhileStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'WhileStatement':
- return true;
- }
- return false;
- }
-
- function isStatement(node) {
- if (node == null) { return false; }
- switch (node.type) {
- case 'BlockStatement':
- case 'BreakStatement':
- case 'ContinueStatement':
- case 'DebuggerStatement':
- case 'DoWhileStatement':
- case 'EmptyStatement':
- case 'ExpressionStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'IfStatement':
- case 'LabeledStatement':
- case 'ReturnStatement':
- case 'SwitchStatement':
- case 'ThrowStatement':
- case 'TryStatement':
- case 'VariableDeclaration':
- case 'WhileStatement':
- case 'WithStatement':
- return true;
- }
- return false;
- }
-
- function isSourceElement(node) {
- return isStatement(node) || node != null && node.type === 'FunctionDeclaration';
- }
-
- function trailingStatement(node) {
- switch (node.type) {
- case 'IfStatement':
- if (node.alternate != null) {
- return node.alternate;
- }
- return node.consequent;
-
- case 'LabeledStatement':
- case 'ForStatement':
- case 'ForInStatement':
- case 'WhileStatement':
- case 'WithStatement':
- return node.body;
- }
- return null;
- }
-
- function isProblematicIfStatement(node) {
- var current;
-
- if (node.type !== 'IfStatement') {
- return false;
- }
- if (node.alternate == null) {
- return false;
- }
- current = node.consequent;
- do {
- if (current.type === 'IfStatement') {
- if (current.alternate == null) {
- return true;
- }
- }
- current = trailingStatement(current);
- } while (current);
-
- return false;
- }
-
- module.exports = {
- isExpression: isExpression,
- isStatement: isStatement,
- isIterationStatement: isIterationStatement,
- isSourceElement: isSourceElement,
- isProblematicIfStatement: isProblematicIfStatement,
-
- trailingStatement: trailingStatement
- };
-}());
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js
deleted file mode 100644
index 23136af91f9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/code.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
- Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-(function () {
- 'use strict';
-
- var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch;
-
- // See `tools/generate-identifier-regex.js`.
- ES5Regex = {
- // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierStart:
- 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\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
- // ECMAScript 5.1/Unicode v9.0.0 NonAsciiIdentifierPart:
- NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\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\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
- };
-
- ES6Regex = {
- // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierStart:
- 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\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
- // ECMAScript 6/Unicode v9.0.0 NonAsciiIdentifierPart:
- 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\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\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\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\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\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
- };
-
- function isDecimalDigit(ch) {
- return 0x30 <= ch && ch <= 0x39; // 0..9
- }
-
- function isHexDigit(ch) {
- return 0x30 <= ch && ch <= 0x39 || // 0..9
- 0x61 <= ch && ch <= 0x66 || // a..f
- 0x41 <= ch && ch <= 0x46; // A..F
- }
-
- function isOctalDigit(ch) {
- return ch >= 0x30 && ch <= 0x37; // 0..7
- }
-
- // 7.2 White Space
-
- NON_ASCII_WHITESPACES = [
- 0x1680,
- 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A,
- 0x202F, 0x205F,
- 0x3000,
- 0xFEFF
- ];
-
- function isWhiteSpace(ch) {
- return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 ||
- ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0;
- }
-
- // 7.3 Line Terminators
-
- function isLineTerminator(ch) {
- return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;
- }
-
- // 7.6 Identifier Names and Identifiers
-
- function fromCodePoint(cp) {
- if (cp <= 0xFFFF) { return String.fromCharCode(cp); }
- var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800);
- var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00);
- return cu1 + cu2;
- }
-
- IDENTIFIER_START = new Array(0x80);
- for(ch = 0; ch < 0x80; ++ch) {
- IDENTIFIER_START[ch] =
- ch >= 0x61 && ch <= 0x7A || // a..z
- ch >= 0x41 && ch <= 0x5A || // A..Z
- ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
- }
-
- IDENTIFIER_PART = new Array(0x80);
- for(ch = 0; ch < 0x80; ++ch) {
- IDENTIFIER_PART[ch] =
- ch >= 0x61 && ch <= 0x7A || // a..z
- ch >= 0x41 && ch <= 0x5A || // A..Z
- ch >= 0x30 && ch <= 0x39 || // 0..9
- ch === 0x24 || ch === 0x5F; // $ (dollar) and _ (underscore)
- }
-
- function isIdentifierStartES5(ch) {
- return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
- }
-
- function isIdentifierPartES5(ch) {
- return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
- }
-
- function isIdentifierStartES6(ch) {
- return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch));
- }
-
- function isIdentifierPartES6(ch) {
- return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch));
- }
-
- module.exports = {
- isDecimalDigit: isDecimalDigit,
- isHexDigit: isHexDigit,
- isOctalDigit: isOctalDigit,
- isWhiteSpace: isWhiteSpace,
- isLineTerminator: isLineTerminator,
- isIdentifierStartES5: isIdentifierStartES5,
- isIdentifierPartES5: isIdentifierPartES5,
- isIdentifierStartES6: isIdentifierStartES6,
- isIdentifierPartES6: isIdentifierPartES6
- };
-}());
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js
deleted file mode 100644
index 13c8c6a967c..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/keyword.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-(function () {
- 'use strict';
-
- var code = require('./code');
-
- function isStrictModeReservedWordES6(id) {
- switch (id) {
- case 'implements':
- case 'interface':
- case 'package':
- case 'private':
- case 'protected':
- case 'public':
- case 'static':
- case 'let':
- return true;
- default:
- return false;
- }
- }
-
- function isKeywordES5(id, strict) {
- // yield should not be treated as keyword under non-strict mode.
- if (!strict && id === 'yield') {
- return false;
- }
- return isKeywordES6(id, strict);
- }
-
- function isKeywordES6(id, strict) {
- if (strict && isStrictModeReservedWordES6(id)) {
- return true;
- }
-
- switch (id.length) {
- case 2:
- return (id === 'if') || (id === 'in') || (id === 'do');
- case 3:
- return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try');
- case 4:
- return (id === 'this') || (id === 'else') || (id === 'case') ||
- (id === 'void') || (id === 'with') || (id === 'enum');
- case 5:
- return (id === 'while') || (id === 'break') || (id === 'catch') ||
- (id === 'throw') || (id === 'const') || (id === 'yield') ||
- (id === 'class') || (id === 'super');
- case 6:
- return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
- (id === 'switch') || (id === 'export') || (id === 'import');
- case 7:
- return (id === 'default') || (id === 'finally') || (id === 'extends');
- case 8:
- return (id === 'function') || (id === 'continue') || (id === 'debugger');
- case 10:
- return (id === 'instanceof');
- default:
- return false;
- }
- }
-
- function isReservedWordES5(id, strict) {
- return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict);
- }
-
- function isReservedWordES6(id, strict) {
- return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict);
- }
-
- function isRestrictedWord(id) {
- return id === 'eval' || id === 'arguments';
- }
-
- function isIdentifierNameES5(id) {
- var i, iz, ch;
-
- if (id.length === 0) { return false; }
-
- ch = id.charCodeAt(0);
- if (!code.isIdentifierStartES5(ch)) {
- return false;
- }
-
- for (i = 1, iz = id.length; i < iz; ++i) {
- ch = id.charCodeAt(i);
- if (!code.isIdentifierPartES5(ch)) {
- return false;
- }
- }
- return true;
- }
-
- function decodeUtf16(lead, trail) {
- return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
- }
-
- function isIdentifierNameES6(id) {
- var i, iz, ch, lowCh, check;
-
- if (id.length === 0) { return false; }
-
- check = code.isIdentifierStartES6;
- for (i = 0, iz = id.length; i < iz; ++i) {
- ch = id.charCodeAt(i);
- if (0xD800 <= ch && ch <= 0xDBFF) {
- ++i;
- if (i >= iz) { return false; }
- lowCh = id.charCodeAt(i);
- if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) {
- return false;
- }
- ch = decodeUtf16(ch, lowCh);
- }
- if (!check(ch)) {
- return false;
- }
- check = code.isIdentifierPartES6;
- }
- return true;
- }
-
- function isIdentifierES5(id, strict) {
- return isIdentifierNameES5(id) && !isReservedWordES5(id, strict);
- }
-
- function isIdentifierES6(id, strict) {
- return isIdentifierNameES6(id) && !isReservedWordES6(id, strict);
- }
-
- module.exports = {
- isKeywordES5: isKeywordES5,
- isKeywordES6: isKeywordES6,
- isReservedWordES5: isReservedWordES5,
- isReservedWordES6: isReservedWordES6,
- isRestrictedWord: isRestrictedWord,
- isIdentifierNameES5: isIdentifierNameES5,
- isIdentifierNameES6: isIdentifierNameES6,
- isIdentifierES5: isIdentifierES5,
- isIdentifierES6: isIdentifierES6
- };
-}());
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js b/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js
deleted file mode 100644
index ce18faa6bc8..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/lib/utils.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- Copyright (C) 2013 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-(function () {
- 'use strict';
-
- exports.ast = require('./ast');
- exports.code = require('./code');
- exports.keyword = require('./keyword');
-}());
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/tools/node_modules/babel-eslint/node_modules/esutils/package.json b/tools/node_modules/babel-eslint/node_modules/esutils/package.json
deleted file mode 100644
index cffa439c8da..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/esutils/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "bugs": {
- "url": "https://github.com/estools/esutils/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "utility box for ECMAScript language tools",
- "devDependencies": {
- "chai": "~1.7.2",
- "coffee-script": "~1.6.3",
- "jshint": "2.6.3",
- "mocha": "~2.2.1",
- "regenerate": "~1.3.1",
- "unicode-9.0.0": "~0.7.0"
- },
- "directories": {
- "lib": "./lib"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "LICENSE.BSD",
- "README.md",
- "lib"
- ],
- "homepage": "https://github.com/estools/esutils",
- "license": "BSD-2-Clause",
- "main": "lib/utils.js",
- "maintainers": [
- {
- "name": "Yusuke Suzuki",
- "email": "utatane.tea@gmail.com",
- "url": "http://github.com/Constellation"
- }
- ],
- "name": "esutils",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/estools/esutils.git"
- },
- "scripts": {
- "generate-regex": "node tools/generate-identifier-regex.js",
- "lint": "jshint lib/*.js",
- "test": "npm run-script lint && npm run-script unit-test",
- "unit-test": "mocha --compilers coffee:coffee-script -R spec"
- },
- "version": "2.0.3"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/globals/package.json b/tools/node_modules/babel-eslint/node_modules/globals/package.json
deleted file mode 100644
index ae094f30540..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/globals/package.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/globals/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Global identifiers from different JavaScript environments",
- "devDependencies": {
- "ava": "0.21.0",
- "xo": "0.18.0"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js",
- "globals.json"
- ],
- "homepage": "https://github.com/sindresorhus/globals#readme",
- "keywords": [
- "globals",
- "global",
- "identifiers",
- "variables",
- "vars",
- "jshint",
- "eslint",
- "environments"
- ],
- "license": "MIT",
- "name": "globals",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/globals.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "11.12.0",
- "xo": {
- "ignores": [
- "get-browser-globals.js"
- ]
- }
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/has-flag/package.json b/tools/node_modules/babel-eslint/node_modules/has-flag/package.json
deleted file mode 100644
index 1903ff01cf6..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/has-flag/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/has-flag/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Check if argv has a specific flag",
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/has-flag#readme",
- "keywords": [
- "has",
- "check",
- "detect",
- "contains",
- "find",
- "flag",
- "cli",
- "command-line",
- "argv",
- "process",
- "arg",
- "args",
- "argument",
- "arguments",
- "getopt",
- "minimist",
- "optimist"
- ],
- "license": "MIT",
- "name": "has-flag",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/has-flag.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "3.0.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json b/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json
deleted file mode 100644
index ccfb4ef3dc3..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/js-tokens/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "author": {
- "name": "Simon Lydell"
- },
- "bugs": {
- "url": "https://github.com/lydell/js-tokens/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A regex that tokenizes JavaScript.",
- "devDependencies": {
- "coffeescript": "2.1.1",
- "esprima": "4.0.0",
- "everything.js": "1.0.3",
- "mocha": "5.0.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/lydell/js-tokens#readme",
- "keywords": [
- "JavaScript",
- "js",
- "token",
- "tokenize",
- "regex"
- ],
- "license": "MIT",
- "name": "js-tokens",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lydell/js-tokens.git"
- },
- "scripts": {
- "build": "node generate-index.js",
- "dev": "npm run build && npm test",
- "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
- "test": "mocha --ui tdd"
- },
- "version": "4.0.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/jsesc/package.json b/tools/node_modules/babel-eslint/node_modules/jsesc/package.json
deleted file mode 100644
index 735096b93f9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/jsesc/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "author": {
- "name": "Mathias Bynens",
- "url": "https://mathiasbynens.be/"
- },
- "bin": {
- "jsesc": "bin/jsesc"
- },
- "bugs": {
- "url": "https://github.com/mathiasbynens/jsesc/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.",
- "devDependencies": {
- "coveralls": "^2.11.6",
- "grunt": "^0.4.5",
- "grunt-template": "^0.2.3",
- "istanbul": "^0.4.2",
- "mocha": "*",
- "regenerate": "^1.3.0",
- "requirejs": "^2.1.22"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "LICENSE-MIT.txt",
- "jsesc.js",
- "bin/",
- "man/"
- ],
- "homepage": "https://mths.be/jsesc",
- "keywords": [
- "buffer",
- "escape",
- "javascript",
- "json",
- "map",
- "set",
- "string",
- "stringify",
- "tool"
- ],
- "license": "MIT",
- "main": "jsesc.js",
- "man": [
- "man/jsesc.1"
- ],
- "name": "jsesc",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mathiasbynens/jsesc.git"
- },
- "scripts": {
- "build": "grunt template",
- "cover": "istanbul cover --report 'html' --verbose --dir 'coverage' 'tests/tests.js'",
- "coveralls": "istanbul cover --verbose --dir 'coverage' 'tests/tests.js' && coveralls < coverage/lcov.info'",
- "test": "mocha tests"
- },
- "version": "2.5.2"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/README.md b/tools/node_modules/babel-eslint/node_modules/lodash/README.md
deleted file mode 100644
index 292832fef2f..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# lodash v4.17.15
-
-The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
-
-## Installation
-
-Using npm:
-```shell
-$ npm i -g npm
-$ npm i --save lodash
-```
-
-In Node.js:
-```js
-// Load the full build.
-var _ = require('lodash');
-// Load the core build.
-var _ = require('lodash/core');
-// Load the FP build for immutable auto-curried iteratee-first data-last methods.
-var fp = require('lodash/fp');
-
-// Load method categories.
-var array = require('lodash/array');
-var object = require('lodash/fp/object');
-
-// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
-var at = require('lodash/at');
-var curryN = require('lodash/fp/curryN');
-```
-
-See the [package source](https://github.com/lodash/lodash/tree/4.17.15-npm) for more details.
-
-**Note:**<br>
-Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
-
-## Support
-
-Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
-Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js
deleted file mode 100644
index 290de9275de..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseClone.js
+++ /dev/null
@@ -1,165 +0,0 @@
-var Stack = require('./_Stack'),
- arrayEach = require('./_arrayEach'),
- assignValue = require('./_assignValue'),
- baseAssign = require('./_baseAssign'),
- baseAssignIn = require('./_baseAssignIn'),
- cloneBuffer = require('./_cloneBuffer'),
- copyArray = require('./_copyArray'),
- copySymbols = require('./_copySymbols'),
- copySymbolsIn = require('./_copySymbolsIn'),
- getAllKeys = require('./_getAllKeys'),
- getAllKeysIn = require('./_getAllKeysIn'),
- getTag = require('./_getTag'),
- initCloneArray = require('./_initCloneArray'),
- initCloneByTag = require('./_initCloneByTag'),
- initCloneObject = require('./_initCloneObject'),
- isArray = require('./isArray'),
- isBuffer = require('./isBuffer'),
- isMap = require('./isMap'),
- isObject = require('./isObject'),
- isSet = require('./isSet'),
- keys = require('./keys');
-
-/** Used to compose bitmasks for cloning. */
-var CLONE_DEEP_FLAG = 1,
- CLONE_FLAT_FLAG = 2,
- CLONE_SYMBOLS_FLAG = 4;
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]';
-
-var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
-/** Used to identify `toStringTag` values supported by `_.clone`. */
-var cloneableTags = {};
-cloneableTags[argsTag] = cloneableTags[arrayTag] =
-cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
-cloneableTags[boolTag] = cloneableTags[dateTag] =
-cloneableTags[float32Tag] = cloneableTags[float64Tag] =
-cloneableTags[int8Tag] = cloneableTags[int16Tag] =
-cloneableTags[int32Tag] = cloneableTags[mapTag] =
-cloneableTags[numberTag] = cloneableTags[objectTag] =
-cloneableTags[regexpTag] = cloneableTags[setTag] =
-cloneableTags[stringTag] = cloneableTags[symbolTag] =
-cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
-cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
-cloneableTags[errorTag] = cloneableTags[funcTag] =
-cloneableTags[weakMapTag] = false;
-
-/**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Deep clone
- * 2 - Flatten inherited properties
- * 4 - Clone symbols
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
-function baseClone(value, bitmask, customizer, key, object, stack) {
- var result,
- isDeep = bitmask & CLONE_DEEP_FLAG,
- isFlat = bitmask & CLONE_FLAT_FLAG,
- isFull = bitmask & CLONE_SYMBOLS_FLAG;
-
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
- if (!isDeep) {
- return isFlat
- ? copySymbolsIn(value, baseAssignIn(result, value))
- : copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- if (isSet(value)) {
- value.forEach(function(subValue) {
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
- });
- } else if (isMap(value)) {
- value.forEach(function(subValue, key) {
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- }
-
- var keysFunc = isFull
- ? (isFlat ? getAllKeysIn : getAllKeys)
- : (isFlat ? keysIn : keys);
-
- var props = isArr ? undefined : keysFunc(value);
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- return result;
-}
-
-module.exports = baseClone;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js
deleted file mode 100644
index d8a46ab20a2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseOrderBy.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var arrayMap = require('./_arrayMap'),
- baseIteratee = require('./_baseIteratee'),
- baseMap = require('./_baseMap'),
- baseSortBy = require('./_baseSortBy'),
- baseUnary = require('./_baseUnary'),
- compareMultiple = require('./_compareMultiple'),
- identity = require('./identity');
-
-/**
- * The base implementation of `_.orderBy` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {string[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
-function baseOrderBy(collection, iteratees, orders) {
- var index = -1;
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
-
- var result = baseMap(collection, function(value, key, collection) {
- var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value);
- });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
-}
-
-module.exports = baseOrderBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js
deleted file mode 100644
index 612a24cc857..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSet.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var assignValue = require('./_assignValue'),
- castPath = require('./_castPath'),
- isIndex = require('./_isIndex'),
- isObject = require('./isObject'),
- toKey = require('./_toKey');
-
-/**
- * The base implementation of `_.set`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
-function baseSet(object, path, value, customizer) {
- if (!isObject(object)) {
- return object;
- }
- path = castPath(path, object);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = toKey(path[index]),
- newValue = value;
-
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : undefined;
- if (newValue === undefined) {
- newValue = isObject(objValue)
- ? objValue
- : (isIndex(path[index + 1]) ? [] : {});
- }
- }
- assignValue(nested, key, newValue);
- nested = nested[key];
- }
- return object;
-}
-
-module.exports = baseSet;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js b/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js
deleted file mode 100644
index bb22e36dcdf..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_baseSortedIndexBy.js
+++ /dev/null
@@ -1,64 +0,0 @@
-var isSymbol = require('./isSymbol');
-
-/** Used as references for the maximum length and index of an array. */
-var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
-
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeFloor = Math.floor,
- nativeMin = Math.min;
-
-/**
- * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
- * which invokes `iteratee` for `value` and each element of `array` to compute
- * their sort ranking. The iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The iteratee invoked per element.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
-function baseSortedIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array == null ? 0 : array.length,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsSymbol = isSymbol(value),
- valIsUndefined = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- othIsDefined = computed !== undefined,
- othIsNull = computed === null,
- othIsReflexive = computed === computed,
- othIsSymbol = isSymbol(computed);
-
- if (valIsNaN) {
- var setLow = retHighest || othIsReflexive;
- } else if (valIsUndefined) {
- setLow = othIsReflexive && (retHighest || othIsDefined);
- } else if (valIsNull) {
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
- } else if (valIsSymbol) {
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
- } else if (othIsNull || othIsSymbol) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
-}
-
-module.exports = baseSortedIndexBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js b/tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js
deleted file mode 100644
index f6a3b7c9f27..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_equalArrays.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var SetCache = require('./_SetCache'),
- arraySome = require('./_arraySome'),
- cacheHas = require('./_cacheHas');
-
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
-/**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
-function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
-
- stack.set(array, other);
- stack.set(other, array);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
-}
-
-module.exports = equalArrays;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js b/tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js
deleted file mode 100644
index 17421f374c9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/_equalObjects.js
+++ /dev/null
@@ -1,89 +0,0 @@
-var getAllKeys = require('./_getAllKeys');
-
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1;
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = getAllKeys(object),
- objLength = objProps.length,
- othProps = getAllKeys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
-}
-
-module.exports = equalObjects;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/core.js b/tools/node_modules/babel-eslint/node_modules/lodash/core.js
deleted file mode 100644
index 89c77ded063..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/core.js
+++ /dev/null
@@ -1,3854 +0,0 @@
-/**
- * @license
- * Lodash (Custom Build) <https://lodash.com/>
- * Build: `lodash core -o ./dist/lodash.core.js`
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-;(function() {
-
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
-
- /** Used as the semantic version number. */
- var VERSION = '4.17.15';
-
- /** Error message constants. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
- /** Used to compose bitmasks for function metadata. */
- var WRAP_BIND_FLAG = 1,
- WRAP_PARTIAL_FLAG = 32;
-
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991;
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- asyncTag = '[object AsyncFunction]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- proxyTag = '[object Proxy]',
- regexpTag = '[object RegExp]',
- stringTag = '[object String]';
-
- /** Used to match HTML entities and HTML characters. */
- var reUnescapedHtml = /[&<>"']/g,
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
-
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;'
- };
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
-
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- array.push.apply(array, values);
- return array;
- }
-
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 1 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * The base implementation of `_.propertyOf` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyOf(object) {
- return function(key) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of
- * `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum
- ? (initAccum = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return baseMap(props, function(key) {
- return object[key];
- });
- }
-
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- var escapeHtmlChar = basePropertyOf(htmlEscapes);
-
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
-
- /*--------------------------------------------------------------------------*/
-
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- objectProto = Object.prototype;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
-
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
-
- /** Built-in value references. */
- var objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable;
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeIsFinite = root.isFinite,
- nativeKeys = overArg(Object.keys, Object),
- nativeMax = Math.max;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit method
- * chain sequences. Methods that operate on and return arrays, collections,
- * and functions can be chained together. Methods that retrieve a single value
- * or may return a primitive value will automatically end the chain sequence
- * and return the unwrapped value. Otherwise, the value must be unwrapped
- * with `_#value`.
- *
- * Explicit chain sequences, which must be unwrapped with `_#value`, may be
- * enabled using `_.chain`.
- *
- * The execution of chained methods is lazy, that is, it's deferred until
- * `_#value` is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion.
- * Shortcut fusion is an optimization to merge iteratee calls; this avoids
- * the creation of intermediate arrays and can greatly reduce the number of
- * iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array and iteratees accept only
- * one argument. The heuristic for whether a section qualifies for shortcut
- * fusion is subject to change.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
- * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
- * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
- * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
- * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
- * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
- * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
- * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
- * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
- * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
- * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
- * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
- * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
- * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
- * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
- * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
- * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
- * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
- * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
- * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
- * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
- * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
- * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
- * `zipObject`, `zipObjectDeep`, and `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
- * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
- * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
- * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
- * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
- * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
- * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
- * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
- * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
- * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
- * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
- * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
- * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
- * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
- * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
- * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
- * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
- * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
- * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
- * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
- * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
- * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
- * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
- * `upperFirst`, `value`, and `words`
- *
- * @name _
- * @constructor
- * @category Seq
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // Returns an unwrapped value.
- * wrapped.reduce(_.add);
- * // => 6
- *
- * // Returns a wrapped value.
- * var squares = wrapped.map(square);
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- return value instanceof LodashWrapper
- ? value
- : new LodashWrapper(value);
- }
-
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
- };
- }());
-
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable explicit method chain sequences.
- */
- function LodashWrapper(value, chainAll) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__chain__ = !!chainAll;
- }
-
- LodashWrapper.prototype = baseCreate(lodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
- }
- }
-
- /**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function baseAssignValue(object, key, value) {
- object[key] = value;
- }
-
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts `args`
- * to provide to `func`.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Array} args The arguments to provide to `func`.
- * @returns {number|Object} Returns the timer id or timeout object.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
- }
-
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
-
- /**
- * The base implementation of `_.every` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
-
- /**
- * The base implementation of methods like `_.max` and `_.min` which accepts a
- * `comparator` to determine the extremum value.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The iteratee invoked per iteration.
- * @param {Function} comparator The comparator used to compare values.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(array, iteratee, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index],
- current = iteratee(value);
-
- if (current != null && (computed === undefined
- ? (current === current && !false)
- : comparator(current, computed)
- )) {
- var computed = current,
- result = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.filter` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.flatten` with support for restricting flattening.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {number} depth The maximum recursion depth.
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, depth, predicate, isStrict, result) {
- var index = -1,
- length = array.length;
-
- predicate || (predicate = isFlattenable);
- result || (result = []);
-
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && predicate(value)) {
- if (depth > 1) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, depth - 1, predicate, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
-
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from `props`.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the function names.
- */
- function baseFunctions(object, props) {
- return baseFilter(props, function(key) {
- return isFunction(object[key]);
- });
- }
-
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- return objectToString(value);
- }
-
- /**
- * The base implementation of `_.gt` which doesn't coerce arguments.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- */
- function baseGt(value, other) {
- return value > other;
- }
-
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- var baseIsArguments = noop;
-
- /**
- * The base implementation of `_.isDate` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
- */
- function baseIsDate(value) {
- return isObjectLike(value) && baseGetTag(value) == dateTag;
- }
-
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = objIsArr ? arrayTag : baseGetTag(object),
- othTag = othIsArr ? arrayTag : baseGetTag(other);
-
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
-
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- stack || (stack = []);
- var objStack = find(stack, function(entry) {
- return entry[0] == object;
- });
- var othStack = find(stack, function(entry) {
- return entry[0] == other;
- });
- if (objStack && othStack) {
- return objStack[1] == other;
- }
- stack.push([object, other]);
- stack.push([other, object]);
- if (isSameTag && !objIsObj) {
- var result = (objIsArr)
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- stack.pop();
- return result;
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
-
- var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- stack.pop();
- return result;
- }
- }
- if (!isSameTag) {
- return false;
- }
- var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- stack.pop();
- return result;
- }
-
- /**
- * The base implementation of `_.isRegExp` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
- */
- function baseIsRegExp(value) {
- return isObjectLike(value) && baseGetTag(value) == regexpTag;
- }
-
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(func) {
- if (typeof func == 'function') {
- return func;
- }
- if (func == null) {
- return identity;
- }
- return (typeof func == 'object' ? baseMatches : baseProperty)(func);
- }
-
- /**
- * The base implementation of `_.lt` which doesn't coerce arguments.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`,
- * else `false`.
- */
- function baseLt(value, other) {
- return value < other;
- }
-
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
-
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatches(source) {
- var props = nativeKeys(source);
- return function(object) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (length--) {
- var key = props[length];
- if (!(key in object &&
- baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG)
- )) {
- return false;
- }
- }
- return true;
- };
- }
-
- /**
- * The base implementation of `_.pick` without support for individual
- * property identifiers.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} paths The property paths to pick.
- * @returns {Object} Returns the new object.
- */
- function basePick(object, props) {
- object = Object(object);
- return reduce(props, function(result, key) {
- if (key in object) {
- result[key] = object[key];
- }
- return result;
- }, {});
- }
-
- /**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
- function baseRest(func, start) {
- return setToString(overRest(func, start, identity), func + '');
- }
-
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
-
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source) {
- return baseSlice(source, 0, source.length);
- }
-
- /**
- * The base implementation of `_.some` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
-
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to perform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- return reduce(actions, function(result, action) {
- return action.func.apply(action.thisArg, arrayPush([result], action.args));
- }, result);
- }
-
- /**
- * Compares values to sort them in ascending order.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function compareAscending(value, other) {
- if (value !== other) {
- var valIsDefined = value !== undefined,
- valIsNull = value === null,
- valIsReflexive = value === value,
- valIsSymbol = false;
-
- var othIsDefined = other !== undefined,
- othIsNull = other === null,
- othIsReflexive = other === other,
- othIsSymbol = false;
-
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
- (valIsNull && othIsDefined && othIsReflexive) ||
- (!valIsDefined && othIsReflexive) ||
- !valIsReflexive) {
- return 1;
- }
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
- (othIsNull && valIsDefined && valIsReflexive) ||
- (!othIsDefined && valIsReflexive) ||
- !othIsReflexive) {
- return -1;
- }
- }
- return 0;
- }
-
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
-
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
-
- if (newValue === undefined) {
- newValue = source[key];
- }
- if (isNew) {
- baseAssignValue(object, key, newValue);
- } else {
- assignValue(object, key, newValue);
- }
- }
- return object;
- }
-
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return baseRest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined;
-
- customizer = (assigner.length > 3 && typeof customizer == 'function')
- ? (length--, customizer)
- : undefined;
-
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
- });
- }
-
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
-
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
-
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtor(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors. See
- // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
-
- /**
- * Creates a `_.find` or `_.findLast` function.
- *
- * @private
- * @param {Function} findIndexFunc The function to find the collection index.
- * @returns {Function} Returns the new find function.
- */
- function createFind(findIndexFunc) {
- return function(collection, predicate, fromIndex) {
- var iterable = Object(collection);
- if (!isArrayLike(collection)) {
- var iteratee = baseIteratee(predicate, 3);
- collection = keys(collection);
- predicate = function(key) { return iteratee(iterable[key], key, iterable); };
- }
- var index = findIndexFunc(collection, predicate, fromIndex);
- return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
- };
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the `this` binding
- * of `thisArg` and `partials` prepended to the arguments it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to
- * the new function.
- * @returns {Function} Returns the new wrapped function.
- */
- function createPartial(func, bitmask, thisArg, partials) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var isBind = bitmask & WRAP_BIND_FLAG,
- Ctor = createCtor(func);
-
- function wrapper() {
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength),
- fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- return fn.apply(isBind ? thisArg : this, args);
- }
- return wrapper;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- var compared;
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!baseSome(other, function(othValue, othIndex) {
- if (!indexOf(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
-
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return eq(+object, +other);
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
-
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- var result = true;
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- var compared;
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `baseRest` which flattens the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @returns {Function} Returns the new function.
- */
- function flatRest(func) {
- return setToString(overRest(func, undefined, flatten), func + '');
- }
-
- /**
- * Checks if `value` is a flattenable `arguments` object or array.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
- */
- function isFlattenable(value) {
- return isArray(value) || isArguments(value);
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- var type = typeof value;
- length = length == null ? MAX_SAFE_INTEGER : length;
-
- return !!length &&
- (type == 'number' ||
- (type != 'symbol' && reIsUint.test(value))) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
-
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
- }
- return false;
- }
-
- /**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
-
- /**
- * A specialized version of `baseRest` which transforms the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @param {Function} transform The rest array transform.
- * @returns {Function} Returns the new function.
- */
- function overRest(func, start, transform) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = transform(array);
- return func.apply(this, otherArgs);
- };
- }
-
- /**
- * Sets the `toString` method of `func` to return `string`.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var setToString = identity;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- return baseFilter(array, Boolean);
- }
-
- /**
- * Creates a new array concatenating `array` with any additional arrays
- * and/or values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to concatenate.
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var other = _.concat(array, 2, [3], [[4]]);
- *
- * console.log(other);
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- function concat() {
- var length = arguments.length;
- if (!length) {
- return [];
- }
- var args = Array(length - 1),
- array = arguments[0],
- index = length;
-
- while (index--) {
- args[index - 1] = arguments[index];
- }
- return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
- }
-
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
- * // => 0
- *
- * // The `_.matches` iteratee shorthand.
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findIndex(users, ['active', false]);
- * // => 0
- *
- * // The `_.property` iteratee shorthand.
- * _.findIndex(users, 'active');
- * // => 2
- */
- function findIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
- return baseFindIndex(array, baseIteratee(predicate, 3), index);
- }
-
- /**
- * Flattens `array` a single level deep.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, [3, [4]], 5]]);
- * // => [1, 2, [3, [4]], 5]
- */
- function flatten(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, 1) : [];
- }
-
- /**
- * Recursively flattens `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
- * // => [1, 2, 3, 4, 5]
- */
- function flattenDeep(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, INFINITY) : [];
- }
-
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias first
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.head([1, 2, 3]);
- * // => 1
- *
- * _.head([]);
- * // => undefined
- */
- function head(array) {
- return (array && array.length) ? array[0] : undefined;
- }
-
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the
- * offset from the end of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // Search from the `fromIndex`.
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- */
- function indexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (typeof fromIndex == 'number') {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
- } else {
- fromIndex = 0;
- }
- var index = (fromIndex || 0) - 1,
- isReflexive = value === value;
-
- while (++index < length) {
- var other = array[index];
- if ((isReflexive ? other === value : other !== other)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array == null ? 0 : array.length;
- return length ? array[length - 1] : undefined;
- }
-
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of
- * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
- * returned.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array == null ? 0 : array.length;
- start = start == null ? 0 : +start;
- end = end === undefined ? length : +end;
- return length ? baseSlice(array, start, end) : [];
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` wrapper instance that wraps `value` with explicit method
- * chain sequences enabled. The result of such sequences must be unwrapped
- * with `_#value`.
- *
- * @static
- * @memberOf _
- * @since 1.3.0
- * @category Seq
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _
- * .chain(users)
- * .sortBy('age')
- * .map(function(o) {
- * return o.user + ' is ' + o.age;
- * })
- * .head()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
-
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor
- * is invoked with one argument; (value). The purpose of this method is to
- * "tap into" a method chain sequence in order to modify intermediate results.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * // Mutate input array.
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor) {
- interceptor(value);
- return value;
- }
-
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- * The purpose of this method is to "pass thru" values replacing intermediate
- * results in a method chain sequence.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor) {
- return interceptor(value);
- }
-
- /**
- * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
- *
- * @name chain
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // A sequence without explicit chaining.
- * _(users).head();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // A sequence with explicit chaining.
- * _(users)
- * .chain()
- * .head()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
-
- /**
- * Executes the chain sequence to resolve the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @since 0.1.0
- * @alias toJSON, valueOf
- * @category Seq
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * Iteration is stopped once `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * **Note:** This method returns `true` for
- * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
- * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
- * elements of empty collections.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.every(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, guard) {
- predicate = guard ? undefined : predicate;
- return baseEvery(collection, baseIteratee(predicate));
- }
-
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * **Note:** Unlike `_.remove`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.reject
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, { 'age': 36, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.filter(users, 'active');
- * // => objects for ['barney']
- */
- function filter(collection, predicate) {
- return baseFilter(collection, baseIteratee(predicate));
- }
-
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.find(users, function(o) { return o.age < 40; });
- * // => object for 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.find(users, { 'age': 1, 'active': true });
- * // => object for 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.find(users, ['active', false]);
- * // => object for 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.find(users, 'active');
- * // => object for 'barney'
- */
- var find = createFind(findIndex);
-
- /**
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length"
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
- * or `_.forOwn` for object iteration.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEachRight
- * @example
- *
- * _.forEach([1, 2], function(value) {
- * console.log(value);
- * });
- * // => Logs `1` then `2`.
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
- function forEach(collection, iteratee) {
- return baseEach(collection, baseIteratee(iteratee));
- }
-
- /**
- * Creates an array of values by running each element in `collection` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * _.map([4, 8], square);
- * // => [16, 64]
- *
- * _.map({ 'a': 4, 'b': 8 }, square);
- * // => [16, 64] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee) {
- return baseMap(collection, baseIteratee(iteratee));
- }
-
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` thru `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not given, the first element of `collection` is used as the initial
- * value. The iteratee is invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
- * and `sortBy`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduceRight
- * @example
- *
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
- * }, 0);
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * return result;
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
- */
- function reduce(collection, iteratee, accumulator) {
- return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
- }
-
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable string keyed properties for objects.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @returns {number} Returns the collection size.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- if (collection == null) {
- return 0;
- }
- collection = isArrayLike(collection) ? collection : nativeKeys(collection);
- return collection.length;
- }
-
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * Iteration is stopped once `predicate` returns truthy. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.some(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, guard) {
- predicate = guard ? undefined : predicate;
- return baseSome(collection, baseIteratee(predicate));
- }
-
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection thru each iteratee. This method
- * performs a stable sort, that is, it preserves the original sort order of
- * equal elements. The iteratees are invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.sortBy(users, [function(o) { return o.user; }]);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- *
- * _.sortBy(users, ['user', 'age']);
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- */
- function sortBy(collection, iteratee) {
- var index = 0;
- iteratee = baseIteratee(iteratee);
-
- return baseMap(baseMap(collection, function(value, key, collection) {
- return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
- }).sort(function(object, other) {
- return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
- }), baseProperty('value'));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery(element).on('click', _.before(5, addContactToList));
- * // => Allows adding up to 4 contacts to the list.
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and `partials` prepended to the arguments it receives.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * function greet(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = baseRest(function(func, thisArg, partials) {
- return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials);
- });
-
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // => Logs 'deferred' after one millisecond.
- */
- var defer = baseRest(function(func, args) {
- return baseDelay(func, 1, args);
- });
-
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => Logs 'later' after one second.
- */
- var delay = baseRest(function(func, wait, args) {
- return baseDelay(func, toNumber(wait) || 0, args);
- });
-
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new negated function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- var args = arguments;
- return !predicate.apply(this, args);
- };
- }
-
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first invocation. The `func` is
- * invoked with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // => `createApplication` is invoked once
- */
- function once(func) {
- return before(2, func);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a shallow clone of `value`.
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
- * arrays. The own enumerable properties of `arguments` objects are cloned
- * as plain objects. An empty object is returned for uncloneable values such
- * as error objects, functions, DOM nodes, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to clone.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeep
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var shallow = _.clone(objects);
- * console.log(shallow[0] === objects[0]);
- * // => true
- */
- function clone(value) {
- if (!isObject(value)) {
- return value;
- }
- return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value));
- }
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
- !propertyIsEnumerable.call(value, 'callee');
- };
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
-
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false ||
- (isObjectLike(value) && baseGetTag(value) == boolTag);
- }
-
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- var isDate = baseIsDate;
-
- /**
- * Checks if `value` is an empty object, collection, map, or set.
- *
- * Objects are considered empty if they have no own enumerable string keyed
- * properties.
- *
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
- * jQuery-like collections are considered empty if they have a `length` of `0`.
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (isArrayLike(value) &&
- (isArray(value) || isString(value) ||
- isFunction(value.splice) || isArguments(value))) {
- return !value.length;
- }
- return !nativeKeys(value).length;
- }
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are compared by strict equality, i.e. `===`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
-
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on
- * [`Number.isFinite`](https://mdn.io/Number/isFinite).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(3);
- * // => true
- *
- * _.isFinite(Number.MIN_VALUE);
- * // => true
- *
- * _.isFinite(Infinity);
- * // => false
- *
- * _.isFinite('3');
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
-
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is based on
- * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
- * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
- * `undefined` and other non-number values.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some
- // ActiveX objects in IE.
- return isNumber(value) && value != +value;
- }
-
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
-
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
- * classified as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a number, else `false`.
- * @example
- *
- * _.isNumber(3);
- * // => true
- *
- * _.isNumber(Number.MIN_VALUE);
- * // => true
- *
- * _.isNumber(Infinity);
- * // => true
- *
- * _.isNumber('3');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' ||
- (isObjectLike(value) && baseGetTag(value) == numberTag);
- }
-
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- var isRegExp = baseIsRegExp;
-
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
- }
-
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
-
- /**
- * Converts `value` to an array.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * _.toArray({ 'a': 1, 'b': 2 });
- * // => [1, 2]
- *
- * _.toArray('abc');
- * // => ['a', 'b', 'c']
- *
- * _.toArray(1);
- * // => []
- *
- * _.toArray(null);
- * // => []
- */
- function toArray(value) {
- if (!isArrayLike(value)) {
- return values(value);
- }
- return value.length ? copyArray(value) : [];
- }
-
- /**
- * Converts `value` to an integer.
- *
- * **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toInteger(3.2);
- * // => 3
- *
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toInteger('3.2');
- * // => 3
- */
- var toInteger = Number;
-
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- var toNumber = Number;
-
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- if (typeof value == 'string') {
- return value;
- }
- return value == null ? '' : (value + '');
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Assigns own enumerable string keyed properties of source objects to the
- * destination object. Source objects are applied from left to right.
- * Subsequent sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object` and is loosely based on
- * [`Object.assign`](https://mdn.io/Object/assign).
- *
- * @static
- * @memberOf _
- * @since 0.10.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assignIn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * function Bar() {
- * this.c = 3;
- * }
- *
- * Foo.prototype.b = 2;
- * Bar.prototype.d = 4;
- *
- * _.assign({ 'a': 0 }, new Foo, new Bar);
- * // => { 'a': 1, 'c': 3 }
- */
- var assign = createAssigner(function(object, source) {
- copyObject(source, nativeKeys(source), object);
- });
-
- /**
- * This method is like `_.assign` except that it iterates over own and
- * inherited source properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assign
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * function Bar() {
- * this.c = 3;
- * }
- *
- * Foo.prototype.b = 2;
- * Bar.prototype.d = 4;
- *
- * _.assignIn({ 'a': 0 }, new Foo, new Bar);
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
- */
- var assignIn = createAssigner(function(object, source) {
- copyObject(source, nativeKeysIn(source), object);
- });
-
- /**
- * Creates an object that inherits from the `prototype` object. If a
- * `properties` object is given, its own enumerable string keyed properties
- * are assigned to the created object.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties) {
- var result = baseCreate(prototype);
- return properties == null ? result : assign(result, properties);
- }
-
- /**
- * Assigns own and inherited enumerable string keyed properties of source
- * objects to the destination object for all destination properties that
- * resolve to `undefined`. Source objects are applied from left to right.
- * Once a property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.defaultsDeep
- * @example
- *
- * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var defaults = baseRest(function(object, sources) {
- object = Object(object);
-
- var index = -1;
- var length = sources.length;
- var guard = length > 2 ? sources[2] : undefined;
-
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- length = 1;
- }
-
- while (++index < length) {
- var source = sources[index];
- var props = keysIn(source);
- var propsIndex = -1;
- var propsLength = props.length;
-
- while (++propsIndex < propsLength) {
- var key = props[propsIndex];
- var value = object[key];
-
- if (value === undefined ||
- (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- object[key] = source[key];
- }
- }
- }
-
- return object;
- });
-
- /**
- * Checks if `path` is a direct property of `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': 2 } };
- * var other = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b');
- * // => true
- *
- * _.has(object, ['a', 'b']);
- * // => true
- *
- * _.has(other, 'a');
- * // => false
- */
- function has(object, path) {
- return object != null && hasOwnProperty.call(object, path);
- }
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- var keys = nativeKeys;
-
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- var keysIn = nativeKeysIn;
-
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [paths] The property paths to pick.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- var pick = flatRest(function(object, paths) {
- return object == null ? {} : basePick(object, paths);
- });
-
- /**
- * This method is like `_.get` except that if the resolved value is a
- * function it's invoked with the `this` binding of its parent object and
- * its result is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a[0].b.c3', 'default');
- * // => 'default'
- *
- * _.result(object, 'a[0].b.c3', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- var value = object == null ? undefined : object[path];
- if (value === undefined) {
- value = defaultValue;
- }
- return isFunction(value) ? value.call(object) : value;
- }
-
- /**
- * Creates an array of the own enumerable string keyed property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return object == null ? [] : baseValues(object, keys(object));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
- * corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value. See
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * When working with HTML you should always
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
- * XSS vectors.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
- */
- function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
-
- /**
- * Creates a function that invokes `func` with the arguments of the created
- * function. If `func` is a property name, the created function returns the
- * property value for a given element. If `func` is an array or object, the
- * created function returns `true` for elements that contain the equivalent
- * source properties, otherwise it returns `false`.
- *
- * @static
- * @since 4.0.0
- * @memberOf _
- * @category Util
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
- * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, _.iteratee(['user', 'fred']));
- * // => [{ 'user': 'fred', 'age': 40 }]
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, _.iteratee('user'));
- * // => ['barney', 'fred']
- *
- * // Create custom iteratee shorthands.
- * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
- * return !_.isRegExp(func) ? iteratee(func) : function(string) {
- * return func.test(string);
- * };
- * });
- *
- * _.filter(['abc', 'def'], /ef/);
- * // => ['def']
- */
- var iteratee = baseIteratee;
-
- /**
- * Creates a function that performs a partial deep comparison between a given
- * object and `source`, returning `true` if the given object has equivalent
- * property values, else `false`.
- *
- * **Note:** The created function is equivalent to `_.isMatch` with `source`
- * partially applied.
- *
- * Partial comparisons will match empty array and empty object `source`
- * values against any array or object value, respectively. See `_.isEqual`
- * for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 1, 'b': 2, 'c': 3 },
- * { 'a': 4, 'b': 5, 'c': 6 }
- * ];
- *
- * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
- * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
- */
- function matches(source) {
- return baseMatches(assign({}, source));
- }
-
- /**
- * Adds all own enumerable string keyed function properties of a source
- * object to the destination object. If `object` is a function, then methods
- * are added to its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
- function mixin(object, source, options) {
- var props = keys(source),
- methodNames = baseFunctions(source, props);
-
- if (options == null &&
- !(isObject(source) && (methodNames.length || !props.length))) {
- options = source;
- source = object;
- object = this;
- methodNames = baseFunctions(source, keys(source));
- }
- var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
- isFunc = isFunction(object);
-
- baseEach(methodNames, function(methodName) {
- var func = source[methodName];
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__),
- actions = result.__actions__ = copyArray(this.__actions__);
-
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }
- });
-
- return object;
- }
-
- /**
- * Reverts the `_` variable to its previous value and returns a reference to
- * the `lodash` function.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @returns {Function} Returns the `lodash` function.
- * @example
- *
- * var lodash = _.noConflict();
- */
- function noConflict() {
- if (root._ === this) {
- root._ = oldDash;
- }
- return this;
- }
-
- /**
- * This method returns `undefined`.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Util
- * @example
- *
- * _.times(2, _.noop);
- * // => [undefined, undefined]
- */
- function noop() {
- // No operation performed.
- }
-
- /**
- * Generates a unique ID. If `prefix` is given, the ID is appended to it.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {string} [prefix=''] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return toString(prefix) + id;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Computes the maximum value of `array`. If `array` is empty or falsey,
- * `undefined` is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => undefined
- */
- function max(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, baseGt)
- : undefined;
- }
-
- /**
- * Computes the minimum value of `array`. If `array` is empty or falsey,
- * `undefined` is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => undefined
- */
- function min(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, baseLt)
- : undefined;
- }
-
- /*------------------------------------------------------------------------*/
-
- // Add methods that return wrapped values in chain sequences.
- lodash.assignIn = assignIn;
- lodash.before = before;
- lodash.bind = bind;
- lodash.chain = chain;
- lodash.compact = compact;
- lodash.concat = concat;
- lodash.create = create;
- lodash.defaults = defaults;
- lodash.defer = defer;
- lodash.delay = delay;
- lodash.filter = filter;
- lodash.flatten = flatten;
- lodash.flattenDeep = flattenDeep;
- lodash.iteratee = iteratee;
- lodash.keys = keys;
- lodash.map = map;
- lodash.matches = matches;
- lodash.mixin = mixin;
- lodash.negate = negate;
- lodash.once = once;
- lodash.pick = pick;
- lodash.slice = slice;
- lodash.sortBy = sortBy;
- lodash.tap = tap;
- lodash.thru = thru;
- lodash.toArray = toArray;
- lodash.values = values;
-
- // Add aliases.
- lodash.extend = assignIn;
-
- // Add methods to `lodash.prototype`.
- mixin(lodash, lodash);
-
- /*------------------------------------------------------------------------*/
-
- // Add methods that return unwrapped values in chain sequences.
- lodash.clone = clone;
- lodash.escape = escape;
- lodash.every = every;
- lodash.find = find;
- lodash.forEach = forEach;
- lodash.has = has;
- lodash.head = head;
- lodash.identity = identity;
- lodash.indexOf = indexOf;
- lodash.isArguments = isArguments;
- lodash.isArray = isArray;
- lodash.isBoolean = isBoolean;
- lodash.isDate = isDate;
- lodash.isEmpty = isEmpty;
- lodash.isEqual = isEqual;
- lodash.isFinite = isFinite;
- lodash.isFunction = isFunction;
- lodash.isNaN = isNaN;
- lodash.isNull = isNull;
- lodash.isNumber = isNumber;
- lodash.isObject = isObject;
- lodash.isRegExp = isRegExp;
- lodash.isString = isString;
- lodash.isUndefined = isUndefined;
- lodash.last = last;
- lodash.max = max;
- lodash.min = min;
- lodash.noConflict = noConflict;
- lodash.noop = noop;
- lodash.reduce = reduce;
- lodash.result = result;
- lodash.size = size;
- lodash.some = some;
- lodash.uniqueId = uniqueId;
-
- // Add aliases.
- lodash.each = forEach;
- lodash.first = head;
-
- mixin(lodash, (function() {
- var source = {};
- baseForOwn(lodash, function(func, methodName) {
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
- source[methodName] = func;
- }
- });
- return source;
- }()), { 'chain': false });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The semantic version number.
- *
- * @static
- * @memberOf _
- * @type {string}
- */
- lodash.VERSION = VERSION;
-
- // Add `Array` methods to `lodash.prototype`.
- baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
- var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
- chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
- retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
-
- lodash.prototype[methodName] = function() {
- var args = arguments;
- if (retUnwrapped && !this.__chain__) {
- var value = this.value();
- return func.apply(isArray(value) ? value : [], args);
- }
- return this[chainName](function(value) {
- return func.apply(isArray(value) ? value : [], args);
- });
- };
- });
-
- // Add chain sequence methods to the `lodash` wrapper.
- lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
-
- /*--------------------------------------------------------------------------*/
-
- // Some AMD build optimizers, like r.js, check for condition patterns like:
- if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
- // Expose Lodash on the global object to prevent errors when Lodash is
- // loaded by a script tag in the presence of an AMD loader.
- // See http://requirejs.org/docs/errors.html#mismatch for more details.
- // Use `_.noConflict` to remove Lodash from the global object.
- root._ = lodash;
-
- // Define as an anonymous module so, through path mapping, it can be
- // referenced as the "underscore" module.
- define(function() {
- return lodash;
- });
- }
- // Check for `exports` after `define` in case a build optimizer adds it.
- else if (freeModule) {
- // Export for Node.js.
- (freeModule.exports = lodash)._ = lodash;
- // Export for CommonJS support.
- freeExports._ = lodash;
- }
- else {
- // Export to the global object.
- root._ = lodash;
- }
-}.call(this));
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js b/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js
deleted file mode 100644
index bb543ff54ab..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/core.min.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @license
- * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
- * Build: `lodash core -o ./dist/lodash.core.js`
- */
-;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
-return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=R),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,Dn);
-}function h(n,t){return l(t,function(t){return U(n[t])})}function v(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
-return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
-r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=M(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(I(n,void 0,X),n+"");
-}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r){var e=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=Z;if(c===Z&&(c=n[i]),e)r[i]=c;else{var f=r,a=f[i];pn.call(f,i)&&J(a,c)&&(c!==Z||i in f)||(f[i]=c);
-}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");
-var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!E(t,function(n,t){if(!P(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function B(n,t,r,e,u,o){var i=1&r,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];
-if(void 0!==Z||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function R(t){return Nn(t)||n(t)}function D(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function I(n,t,r){return t=jn(t===Z?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,
-o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function q(n){return n&&n.length?n[0]:Z}function P(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return mn(n,g(t))}function C(n,t,r){return e(n,g(t),r,3>arguments.length,mn)}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),
-function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){
-return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;
-if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
-return function(t){return null==n?Z:n[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
-var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=X,An=function(n){return function(t,r,e){var u=Object(t);if(!M(t)){var o=g(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=null==n?0:n.length;
-if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,D(t),n)}),Rn=O(function(n,t){n=Object(n);var r,e=-1,u=t.length,o=2<u?t[2]:Z;if(r=o){r=t[0];var i=t[1];if(V(o)){var c=typeof i;if("number"==c){if(c=M(o))var c=o.length,f=typeof i,c=null==c?9007199254740991:c,c=!!c&&("number"==f||"symbol"!=f&&en.test(i))&&-1<i&&0==i%1&&i<c;
-}else c="string"==c&&i in o;r=!!c&&J(o[i],r)}else r=false}for(r&&(u=1);++e<u;)for(o=t[e],r=In(o),i=-1,c=r.length;++i<c;){var f=r[i],a=n[f];(a===Z||J(a,ln[f])&&!pn.call(n,f))&&(n[f]=o[f])}return n}),Dn=_n,In=D,$n=function(n){return xn(I(n,Z,$),n+"")}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=G,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];
-return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Rn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){return(null==n?0:n.length)?p(n,nn):[]},o.iteratee=g,o.keys=Dn,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){
-return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===Z?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){
-return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
-},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
-var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
-var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.15",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
-})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/filter.js b/tools/node_modules/babel-eslint/node_modules/lodash/filter.js
deleted file mode 100644
index 52616be8b01..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/filter.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var arrayFilter = require('./_arrayFilter'),
- baseFilter = require('./_baseFilter'),
- baseIteratee = require('./_baseIteratee'),
- isArray = require('./isArray');
-
-/**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * **Note:** Unlike `_.remove`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.reject
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, { 'age': 36, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.filter(users, 'active');
- * // => objects for ['barney']
- */
-function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, baseIteratee(predicate, 3));
-}
-
-module.exports = filter;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js b/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js
deleted file mode 100644
index 9b95dfefe87..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.js
+++ /dev/null
@@ -1,17112 +0,0 @@
-/**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-;(function() {
-
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
-
- /** Used as the semantic version number. */
- var VERSION = '4.17.15';
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /** Error message constants. */
- var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
- FUNC_ERROR_TEXT = 'Expected a function';
-
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
- /** Used as the maximum memoize cache size. */
- var MAX_MEMOIZE_SIZE = 500;
-
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = '__lodash_placeholder__';
-
- /** Used to compose bitmasks for cloning. */
- var CLONE_DEEP_FLAG = 1,
- CLONE_FLAT_FLAG = 2,
- CLONE_SYMBOLS_FLAG = 4;
-
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
- /** Used to compose bitmasks for function metadata. */
- var WRAP_BIND_FLAG = 1,
- WRAP_BIND_KEY_FLAG = 2,
- WRAP_CURRY_BOUND_FLAG = 4,
- WRAP_CURRY_FLAG = 8,
- WRAP_CURRY_RIGHT_FLAG = 16,
- WRAP_PARTIAL_FLAG = 32,
- WRAP_PARTIAL_RIGHT_FLAG = 64,
- WRAP_ARY_FLAG = 128,
- WRAP_REARG_FLAG = 256,
- WRAP_FLIP_FLAG = 512;
-
- /** Used as default options for `_.truncate`. */
- var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = '...';
-
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 800,
- HOT_SPAN = 16;
-
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2,
- LAZY_WHILE_FLAG = 3;
-
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991,
- MAX_INTEGER = 1.7976931348623157e+308,
- NAN = 0 / 0;
-
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
-
- /** Used to associate wrap methods with their bit flags. */
- var wrapFlags = [
- ['ary', WRAP_ARY_FLAG],
- ['bind', WRAP_BIND_FLAG],
- ['bindKey', WRAP_BIND_KEY_FLAG],
- ['curry', WRAP_CURRY_FLAG],
- ['curryRight', WRAP_CURRY_RIGHT_FLAG],
- ['flip', WRAP_FLIP_FLAG],
- ['partial', WRAP_PARTIAL_FLAG],
- ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
- ['rearg', WRAP_REARG_FLAG]
- ];
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- asyncTag = '[object AsyncFunction]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- domExcTag = '[object DOMException]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- nullTag = '[object Null]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- proxyTag = '[object Proxy]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- undefinedTag = '[object Undefined]',
- weakMapTag = '[object WeakMap]',
- weakSetTag = '[object WeakSet]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
- reUnescapedHtml = /[&<>"']/g,
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g;
-
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
-
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
- reHasRegExpChar = RegExp(reRegExpChar.source);
-
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g,
- reTrimStart = /^\s+/,
- reTrimEnd = /\s+$/;
-
- /** Used to match wrap detail comments. */
- var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
- reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
- reSplitDetails = /,? & /;
-
- /** Used to match words composed of alphanumeric characters. */
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
-
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
-
- /**
- * Used to match
- * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
- */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
-
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
-
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
-
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
-
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
-
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
- /** Used to compose unicode character classes. */
- var rsAstralRange = '\\ud800-\\udfff',
- rsComboMarksRange = '\\u0300-\\u036f',
- reComboHalfMarksRange = '\\ufe20-\\ufe2f',
- rsComboSymbolsRange = '\\u20d0-\\u20ff',
- rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
- rsDingbatRange = '\\u2700-\\u27bf',
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
- rsPunctuationRange = '\\u2000-\\u206f',
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
- rsVarRange = '\\ufe0e\\ufe0f',
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
-
- /** Used to compose unicode capture groups. */
- var rsApos = "['\u2019]",
- rsAstral = '[' + rsAstralRange + ']',
- rsBreak = '[' + rsBreakRange + ']',
- rsCombo = '[' + rsComboRange + ']',
- rsDigits = '\\d+',
- rsDingbat = '[' + rsDingbatRange + ']',
- rsLower = '[' + rsLowerRange + ']',
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
- rsNonAstral = '[^' + rsAstralRange + ']',
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
- rsUpper = '[' + rsUpperRange + ']',
- rsZWJ = '\\u200d';
-
- /** Used to compose unicode regexes. */
- var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
- rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
- rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
- rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
- reOptMod = rsModifier + '?',
- rsOptVar = '[' + rsVarRange + ']?',
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
- rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
-
- /** Used to match apostrophes. */
- var reApos = RegExp(rsApos, 'g');
-
- /**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
- */
- var reComboMark = RegExp(rsCombo, 'g');
-
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
- var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
-
- /** Used to match complex or compound words. */
- var reUnicodeWord = RegExp([
- rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
- rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
- rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
- rsUpper + '+' + rsOptContrUpper,
- rsOrdUpper,
- rsOrdLower,
- rsDigits,
- rsEmoji
- ].join('|'), 'g');
-
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
- var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
-
- /** Used to detect strings that need a more robust regexp to match words. */
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
-
- /** Used to assign default `context` object properties. */
- var contextProps = [
- 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
- 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
- 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
- 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
- '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
- ];
-
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
-
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
-
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
- cloneableTags[boolTag] = cloneableTags[dateTag] =
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
- cloneableTags[numberTag] = cloneableTags[objectTag] =
- cloneableTags[regexpTag] = cloneableTags[setTag] =
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[weakMapTag] = false;
-
- /** Used to map Latin Unicode letters to basic Latin letters. */
- var deburredLetters = {
- // Latin-1 Supplement block.
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
- '\xc7': 'C', '\xe7': 'c',
- '\xd0': 'D', '\xf0': 'd',
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
- '\xd1': 'N', '\xf1': 'n',
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
- '\xc6': 'Ae', '\xe6': 'ae',
- '\xde': 'Th', '\xfe': 'th',
- '\xdf': 'ss',
- // Latin Extended-A block.
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
- '\u0134': 'J', '\u0135': 'j',
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
- '\u0174': 'W', '\u0175': 'w',
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
- '\u0132': 'IJ', '\u0133': 'ij',
- '\u0152': 'Oe', '\u0153': 'oe',
- '\u0149': "'n", '\u017f': 's'
- };
-
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;'
- };
-
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- '&amp;': '&',
- '&lt;': '<',
- '&gt;': '>',
- '&quot;': '"',
- '&#39;': "'"
- };
-
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- /** Built-in method references without a dependency on `root`. */
- var freeParseFloat = parseFloat,
- freeParseInt = parseInt;
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
-
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
-
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
-
- /** Used to access faster Node.js helpers. */
- var nodeUtil = (function() {
- try {
- // Use `util.types` for Node.js 10+.
- var types = freeModule && freeModule.require && freeModule.require('util').types;
-
- if (types) {
- return types;
- }
-
- // Legacy `process.binding('util')` for Node.js < 10.
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
- } catch (e) {}
- }());
-
- /* Node.js helper references. */
- var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
- nodeIsDate = nodeUtil && nodeUtil.isDate,
- nodeIsMap = nodeUtil && nodeUtil.isMap,
- nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
- nodeIsSet = nodeUtil && nodeUtil.isSet,
- nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
-
- /**
- * A specialized version of `baseAggregator` for arrays.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function arrayAggregator(array, setter, iteratee, accumulator) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- var value = array[index];
- setter(accumulator, value, iteratee(value), array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array == null ? 0 : array.length;
-
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.every` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludes(array, value) {
- var length = array == null ? 0 : array.length;
- return !!length && baseIndexOf(array, value, 0) > -1;
- }
-
- /**
- * This function is like `arrayIncludes` except that it accepts a comparator.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludesWith(array, value, comparator) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array == null ? 0 : array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the last element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initAccum) {
- var length = array == null ? 0 : array.length;
- if (initAccum && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Gets the size of an ASCII `string`.
- *
- * @private
- * @param {string} string The string inspect.
- * @returns {number} Returns the string size.
- */
- var asciiSize = baseProperty('length');
-
- /**
- * Converts an ASCII `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function asciiToArray(string) {
- return string.split('');
- }
-
- /**
- * Splits an ASCII `string` into an array of its words.
- *
- * @private
- * @param {string} The string to inspect.
- * @returns {Array} Returns the words of `string`.
- */
- function asciiWords(string) {
- return string.match(reAsciiWord) || [];
- }
-
- /**
- * The base implementation of methods like `_.findKey` and `_.findLastKey`,
- * without support for iteratee shorthands, which iterates over `collection`
- * using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFindKey(collection, predicate, eachFunc) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = key;
- return false;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 1 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- return value === value
- ? strictIndexOf(array, value, fromIndex)
- : baseFindIndex(array, baseIsNaN, fromIndex);
- }
-
- /**
- * This function is like `baseIndexOf` except that it accepts a comparator.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOfWith(array, value, fromIndex, comparator) {
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (comparator(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.isNaN` without support for number objects.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- */
- function baseIsNaN(value) {
- return value !== value;
- }
-
- /**
- * The base implementation of `_.mean` and `_.meanBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the mean.
- */
- function baseMean(array, iteratee) {
- var length = array == null ? 0 : array.length;
- return length ? (baseSum(array, iteratee) / length) : NAN;
- }
-
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * The base implementation of `_.propertyOf` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyOf(object) {
- return function(key) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of
- * `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum
- ? (initAccum = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define the
- * sort order of `array` and replaces criteria objects with their corresponding
- * values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
-
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.sum` and `_.sumBy` without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(array, iteratee) {
- var result,
- index = -1,
- length = array.length;
-
- while (++index < length) {
- var current = iteratee(array[index]);
- if (current !== undefined) {
- result = result === undefined ? current : (result + current);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
-
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
- * of key-value pairs for `object` corresponding to the property names of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the key-value pairs.
- */
- function baseToPairs(object, props) {
- return arrayMap(props, function(key) {
- return [key, object[key]];
- });
- }
-
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
-
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return arrayMap(props, function(key) {
- return object[key];
- });
- }
-
- /**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function cacheHas(cache, key) {
- return cache.has(key);
- }
-
- /**
- * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the first unmatched string symbol.
- */
- function charsStartIndex(strSymbols, chrSymbols) {
- var index = -1,
- length = strSymbols.length;
-
- while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the last unmatched string symbol.
- */
- function charsEndIndex(strSymbols, chrSymbols) {
- var index = strSymbols.length;
-
- while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Gets the number of `placeholder` occurrences in `array`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} placeholder The placeholder to search for.
- * @returns {number} Returns the placeholder count.
- */
- function countHolders(array, placeholder) {
- var length = array.length,
- result = 0;
-
- while (length--) {
- if (array[length] === placeholder) {
- ++result;
- }
- }
- return result;
- }
-
- /**
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
- * letters to basic Latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
- var deburrLetter = basePropertyOf(deburredLetters);
-
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- var escapeHtmlChar = basePropertyOf(htmlEscapes);
-
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
-
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
-
- /**
- * Checks if `string` contains Unicode symbols.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {boolean} Returns `true` if a symbol is found, else `false`.
- */
- function hasUnicode(string) {
- return reHasUnicode.test(string);
- }
-
- /**
- * Checks if `string` contains a word composed of Unicode symbols.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {boolean} Returns `true` if a word is found, else `false`.
- */
- function hasUnicodeWord(string) {
- return reHasUnicodeWord.test(string);
- }
-
- /**
- * Converts `iterator` to an array.
- *
- * @private
- * @param {Object} iterator The iterator to convert.
- * @returns {Array} Returns the converted array.
- */
- function iteratorToArray(iterator) {
- var data,
- result = [];
-
- while (!(data = iterator.next()).done) {
- result.push(data.value);
- }
- return result;
- }
-
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
-
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
-
- /**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
- function replaceHolders(array, placeholder) {
- var index = -1,
- length = array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value === placeholder || value === PLACEHOLDER) {
- array[index] = PLACEHOLDER;
- result[resIndex++] = index;
- }
- }
- return result;
- }
-
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
-
- /**
- * Converts `set` to its value-value pairs.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the value-value pairs.
- */
- function setToPairs(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = [value, value];
- });
- return result;
- }
-
- /**
- * A specialized version of `_.indexOf` which performs strict equality
- * comparisons of values, i.e. `===`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function strictIndexOf(array, value, fromIndex) {
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * A specialized version of `_.lastIndexOf` which performs strict equality
- * comparisons of values, i.e. `===`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function strictLastIndexOf(array, value, fromIndex) {
- var index = fromIndex + 1;
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return index;
- }
-
- /**
- * Gets the number of symbols in `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the string size.
- */
- function stringSize(string) {
- return hasUnicode(string)
- ? unicodeSize(string)
- : asciiSize(string);
- }
-
- /**
- * Converts `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function stringToArray(string) {
- return hasUnicode(string)
- ? unicodeToArray(string)
- : asciiToArray(string);
- }
-
- /**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
- var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
-
- /**
- * Gets the size of a Unicode `string`.
- *
- * @private
- * @param {string} string The string inspect.
- * @returns {number} Returns the string size.
- */
- function unicodeSize(string) {
- var result = reUnicode.lastIndex = 0;
- while (reUnicode.test(string)) {
- ++result;
- }
- return result;
- }
-
- /**
- * Converts a Unicode `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function unicodeToArray(string) {
- return string.match(reUnicode) || [];
- }
-
- /**
- * Splits a Unicode `string` into an array of its words.
- *
- * @private
- * @param {string} The string to inspect.
- * @returns {Array} Returns the words of `string`.
- */
- function unicodeWords(string) {
- return string.match(reUnicodeWord) || [];
- }
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Create a new pristine `lodash` function using the `context` object.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Util
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // Create a suped-up `defer` in Node.js.
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- var runInContext = (function runInContext(context) {
- context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
-
- /** Built-in constructor references. */
- var Array = context.Array,
- Date = context.Date,
- Error = context.Error,
- Function = context.Function,
- Math = context.Math,
- Object = context.Object,
- RegExp = context.RegExp,
- String = context.String,
- TypeError = context.TypeError;
-
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
-
- /** Used to detect overreaching core-js shims. */
- var coreJsData = context['__core-js_shared__'];
-
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
-
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
-
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /** Built-in value references. */
- var Buffer = moduleExports ? context.Buffer : undefined,
- Symbol = context.Symbol,
- Uint8Array = context.Uint8Array,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
- getPrototype = overArg(Object.getPrototypeOf, Object),
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice,
- spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
- symIterator = Symbol ? Symbol.iterator : undefined,
- symToStringTag = Symbol ? Symbol.toStringTag : undefined;
-
- var defineProperty = (function() {
- try {
- var func = getNative(Object, 'defineProperty');
- func({}, '', {});
- return func;
- } catch (e) {}
- }());
-
- /** Mocked built-ins. */
- var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
- ctxNow = Date && Date.now !== root.Date.now && Date.now,
- ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeIsFinite = context.isFinite,
- nativeJoin = arrayProto.join,
- nativeKeys = overArg(Object.keys, Object),
- nativeMax = Math.max,
- nativeMin = Math.min,
- nativeNow = Date.now,
- nativeParseInt = context.parseInt,
- nativeRandom = Math.random,
- nativeReverse = arrayProto.reverse;
-
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(context, 'DataView'),
- Map = getNative(context, 'Map'),
- Promise = getNative(context, 'Promise'),
- Set = getNative(context, 'Set'),
- WeakMap = getNative(context, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
-
- /** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap;
-
- /** Used to lookup unminified function names. */
- var realNames = {};
-
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
-
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit method
- * chain sequences. Methods that operate on and return arrays, collections,
- * and functions can be chained together. Methods that retrieve a single value
- * or may return a primitive value will automatically end the chain sequence
- * and return the unwrapped value. Otherwise, the value must be unwrapped
- * with `_#value`.
- *
- * Explicit chain sequences, which must be unwrapped with `_#value`, may be
- * enabled using `_.chain`.
- *
- * The execution of chained methods is lazy, that is, it's deferred until
- * `_#value` is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion.
- * Shortcut fusion is an optimization to merge iteratee calls; this avoids
- * the creation of intermediate arrays and can greatly reduce the number of
- * iteratee executions. Sections of a chain sequence qualify for shortcut
- * fusion if the section is applied to an array and iteratees accept only
- * one argument. The heuristic for whether a section qualifies for shortcut
- * fusion is subject to change.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
- * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
- * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
- * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
- * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
- * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
- * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
- * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
- * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
- * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
- * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
- * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
- * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
- * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
- * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
- * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
- * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
- * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
- * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
- * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
- * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
- * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
- * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
- * `zipObject`, `zipObjectDeep`, and `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
- * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
- * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
- * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
- * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
- * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
- * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
- * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
- * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
- * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
- * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
- * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
- * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
- * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
- * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
- * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
- * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
- * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
- * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
- * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
- * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
- * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
- * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
- * `upperFirst`, `value`, and `words`
- *
- * @name _
- * @constructor
- * @category Seq
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // Returns an unwrapped value.
- * wrapped.reduce(_.add);
- * // => 6
- *
- * // Returns a wrapped value.
- * var squares = wrapped.map(square);
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
- }
-
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
- };
- }());
-
- /**
- * The function whose prototype chain sequence wrappers inherit from.
- *
- * @private
- */
- function baseLodash() {
- // No operation performed.
- }
-
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable explicit method chain sequences.
- */
- function LodashWrapper(value, chainAll) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__chain__ = !!chainAll;
- this.__index__ = 0;
- this.__values__ = undefined;
- }
-
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB) as well as ES2015 template strings. Change the
- * following template settings to use alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type {Object}
- */
- lodash.templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- '_': lodash
- }
- };
-
- // Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype;
- lodash.prototype.constructor = lodash;
-
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @constructor
- * @param {*} value The value to wrap.
- */
- function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = MAX_ARRAY_LENGTH;
- this.__views__ = [];
- }
-
- /**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
- function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = copyArray(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = copyArray(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = copyArray(this.__views__);
- return result;
- }
-
- /**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
- function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
- }
-
- /**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
- function lazyValue() {
- var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : (start - 1),
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__);
-
- if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
- return baseWrapperValue(array, this.__actions__);
- }
- var result = [];
-
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
-
- var iterIndex = -1,
- value = array[index];
-
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value);
-
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
- }
-
- // Ensure `LazyWrapper` is an instance of `baseLodash`.
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
- LazyWrapper.prototype.constructor = LazyWrapper;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
-
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
-
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
- }
-
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
-
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- --this.size;
- return true;
- }
-
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- return index < 0 ? undefined : data[index][1];
- }
-
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
-
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
-
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
-
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- var result = getMapData(this, key)['delete'](key);
- this.size -= result ? 1 : 0;
- return result;
- }
-
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
-
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
-
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- var data = getMapData(this, key),
- size = data.size;
-
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
-
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values == null ? 0 : values.length;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.add(values[index]);
- }
- }
-
- /**
- * Adds `value` to the array cache.
- *
- * @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
- */
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
-
- /**
- * Checks if `value` is in the array cache.
- *
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
-
- // Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
-
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- result = data['delete'](key);
-
- this.size = data.size;
- return result;
- }
-
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
-
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
-
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
-
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- var isArr = isArray(value),
- isArg = !isArr && isArguments(value),
- isBuff = !isArr && !isArg && isBuffer(value),
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? baseTimes(value.length, String) : [],
- length = result.length;
-
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (
- // Safari 9 has enumerable `arguments.length` in strict mode.
- key == 'length' ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == 'offset' || key == 'parent')) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
- // Skip index properties.
- isIndex(key, length)
- ))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.sample` for arrays.
- *
- * @private
- * @param {Array} array The array to sample.
- * @returns {*} Returns the random element.
- */
- function arraySample(array) {
- var length = array.length;
- return length ? array[baseRandom(0, length - 1)] : undefined;
- }
-
- /**
- * A specialized version of `_.sampleSize` for arrays.
- *
- * @private
- * @param {Array} array The array to sample.
- * @param {number} n The number of elements to sample.
- * @returns {Array} Returns the random elements.
- */
- function arraySampleSize(array, n) {
- return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
- }
-
- /**
- * A specialized version of `_.shuffle` for arrays.
- *
- * @private
- * @param {Array} array The array to shuffle.
- * @returns {Array} Returns the new shuffled array.
- */
- function arrayShuffle(array) {
- return shuffleSelf(copyArray(array));
- }
-
- /**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignMergeValue(object, key, value) {
- if ((value !== undefined && !eq(object[key], value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
- }
- }
-
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- baseAssignValue(object, key, value);
- }
- }
-
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
-
- /**
- * Aggregates elements of `collection` on `accumulator` with keys transformed
- * by `iteratee` and values set by `setter`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseAggregator(collection, setter, iteratee, accumulator) {
- baseEach(collection, function(value, key, collection) {
- setter(accumulator, value, iteratee(value), collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
- }
-
- /**
- * The base implementation of `_.assignIn` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssignIn(object, source) {
- return object && copyObject(source, keysIn(source), object);
- }
-
- /**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function baseAssignValue(object, key, value) {
- if (key == '__proto__' && defineProperty) {
- defineProperty(object, key, {
- 'configurable': true,
- 'enumerable': true,
- 'value': value,
- 'writable': true
- });
- } else {
- object[key] = value;
- }
- }
-
- /**
- * The base implementation of `_.at` without support for individual paths.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {string[]} paths The property paths to pick.
- * @returns {Array} Returns the picked elements.
- */
- function baseAt(object, paths) {
- var index = -1,
- length = paths.length,
- result = Array(length),
- skip = object == null;
-
- while (++index < length) {
- result[index] = skip ? undefined : get(object, paths[index]);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.clamp` which doesn't coerce arguments.
- *
- * @private
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- */
- function baseClamp(number, lower, upper) {
- if (number === number) {
- if (upper !== undefined) {
- number = number <= upper ? number : upper;
- }
- if (lower !== undefined) {
- number = number >= lower ? number : lower;
- }
- }
- return number;
- }
-
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Deep clone
- * 2 - Flatten inherited properties
- * 4 - Clone symbols
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, bitmask, customizer, key, object, stack) {
- var result,
- isDeep = bitmask & CLONE_DEEP_FLAG,
- isFlat = bitmask & CLONE_FLAT_FLAG,
- isFull = bitmask & CLONE_SYMBOLS_FLAG;
-
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
- if (!isDeep) {
- return isFlat
- ? copySymbolsIn(value, baseAssignIn(result, value))
- : copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- if (isSet(value)) {
- value.forEach(function(subValue) {
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
- });
- } else if (isMap(value)) {
- value.forEach(function(subValue, key) {
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- }
-
- var keysFunc = isFull
- ? (isFlat ? getAllKeysIn : getAllKeys)
- : (isFlat ? keysIn : keys);
-
- var props = isArr ? undefined : keysFunc(value);
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
- });
- return result;
- }
-
- /**
- * The base implementation of `_.conforms` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property predicates to conform to.
- * @returns {Function} Returns the new spec function.
- */
- function baseConforms(source) {
- var props = keys(source);
- return function(object) {
- return baseConformsTo(object, source, props);
- };
- }
-
- /**
- * The base implementation of `_.conformsTo` which accepts `props` to check.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property predicates to conform to.
- * @returns {boolean} Returns `true` if `object` conforms, else `false`.
- */
- function baseConformsTo(object, source, props) {
- var length = props.length;
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (length--) {
- var key = props[length],
- predicate = source[key],
- value = object[key];
-
- if ((value === undefined && !(key in object)) || !predicate(value)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts `args`
- * to provide to `func`.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Array} args The arguments to provide to `func`.
- * @returns {number|Object} Returns the timer id or timeout object.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
- }
-
- /**
- * The base implementation of methods like `_.difference` without support
- * for excluding multiple arrays or iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- isCommon = true,
- length = array.length,
- result = [],
- valuesLength = values.length;
-
- if (!length) {
- return result;
- }
- if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee));
- }
- if (comparator) {
- includes = arrayIncludesWith;
- isCommon = false;
- }
- else if (values.length >= LARGE_ARRAY_SIZE) {
- includes = cacheHas;
- isCommon = false;
- values = new SetCache(values);
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee == null ? value : iteratee(value);
-
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === computed) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (!includes(values, computed, comparator)) {
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
-
- /**
- * The base implementation of `_.forEachRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEachRight = createBaseEach(baseForOwnRight, true);
-
- /**
- * The base implementation of `_.every` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
-
- /**
- * The base implementation of methods like `_.max` and `_.min` which accepts a
- * `comparator` to determine the extremum value.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The iteratee invoked per iteration.
- * @param {Function} comparator The comparator used to compare values.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(array, iteratee, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index],
- current = iteratee(value);
-
- if (current != null && (computed === undefined
- ? (current === current && !isSymbol(current))
- : comparator(current, computed)
- )) {
- var computed = current,
- result = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
- function baseFill(array, value, start, end) {
- var length = array.length;
-
- start = toInteger(start);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : toInteger(end);
- if (end < 0) {
- end += length;
- }
- end = start > end ? 0 : toLength(end);
- while (start < end) {
- array[start++] = value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.filter` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.flatten` with support for restricting flattening.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {number} depth The maximum recursion depth.
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, depth, predicate, isStrict, result) {
- var index = -1,
- length = array.length;
-
- predicate || (predicate = isFlattenable);
- result || (result = []);
-
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && predicate(value)) {
- if (depth > 1) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, depth - 1, predicate, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
-
- /**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseForRight = createBaseFor(true);
-
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwnRight(object, iteratee) {
- return object && baseForRight(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from `props`.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the function names.
- */
- function baseFunctions(object, props) {
- return arrayFilter(props, function(key) {
- return isFunction(object[key]);
- });
- }
-
- /**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path) {
- path = castPath(path, object);
-
- var index = 0,
- length = path.length;
-
- while (object != null && index < length) {
- object = object[toKey(path[index++])];
- }
- return (index && index == length) ? object : undefined;
- }
-
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
-
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
-
- /**
- * The base implementation of `_.gt` which doesn't coerce arguments.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- */
- function baseGt(value, other) {
- return value > other;
- }
-
- /**
- * The base implementation of `_.has` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHas(object, key) {
- return object != null && hasOwnProperty.call(object, key);
- }
-
- /**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHasIn(object, key) {
- return object != null && key in Object(object);
- }
-
- /**
- * The base implementation of `_.inRange` which doesn't coerce arguments.
- *
- * @private
- * @param {number} number The number to check.
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- */
- function baseInRange(number, start, end) {
- return number >= nativeMin(start, end) && number < nativeMax(start, end);
- }
-
- /**
- * The base implementation of methods like `_.intersection`, without support
- * for iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of shared values.
- */
- function baseIntersection(arrays, iteratee, comparator) {
- var includes = comparator ? arrayIncludesWith : arrayIncludes,
- length = arrays[0].length,
- othLength = arrays.length,
- othIndex = othLength,
- caches = Array(othLength),
- maxLength = Infinity,
- result = [];
-
- while (othIndex--) {
- var array = arrays[othIndex];
- if (othIndex && iteratee) {
- array = arrayMap(array, baseUnary(iteratee));
- }
- maxLength = nativeMin(array.length, maxLength);
- caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
- ? new SetCache(othIndex && array)
- : undefined;
- }
- array = arrays[0];
-
- var index = -1,
- seen = caches[0];
-
- outer:
- while (++index < length && result.length < maxLength) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (!(seen
- ? cacheHas(seen, computed)
- : includes(result, computed, comparator)
- )) {
- othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if (!(cache
- ? cacheHas(cache, computed)
- : includes(arrays[othIndex], computed, comparator))
- ) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.invert` and `_.invertBy` which inverts
- * `object` with values transformed by `iteratee` and set by `setter`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform values.
- * @param {Object} accumulator The initial inverted object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseInverter(object, setter, iteratee, accumulator) {
- baseForOwn(object, function(value, key, object) {
- setter(accumulator, iteratee(value), key, object);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.invoke` without support for individual
- * method arguments.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
- function baseInvoke(object, path, args) {
- path = castPath(path, object);
- object = parent(object, path);
- var func = object == null ? object : object[toKey(last(path))];
- return func == null ? undefined : apply(func, object, args);
- }
-
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag;
- }
-
- /**
- * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
- */
- function baseIsArrayBuffer(value) {
- return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
- }
-
- /**
- * The base implementation of `_.isDate` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
- */
- function baseIsDate(value) {
- return isObjectLike(value) && baseGetTag(value) == dateTag;
- }
-
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = objIsArr ? arrayTag : getTag(object),
- othTag = othIsArr ? arrayTag : getTag(other);
-
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
-
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
- }
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
-
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- }
-
- /**
- * The base implementation of `_.isMap` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
- */
- function baseIsMap(value) {
- return isObjectLike(value) && getTag(value) == mapTag;
- }
-
- /**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
-
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
-
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var stack = new Stack;
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === undefined
- ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
- : result
- )) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
-
- /**
- * The base implementation of `_.isRegExp` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
- */
- function baseIsRegExp(value) {
- return isObjectLike(value) && baseGetTag(value) == regexpTag;
- }
-
- /**
- * The base implementation of `_.isSet` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
- */
- function baseIsSet(value) {
- return isObjectLike(value) && getTag(value) == setTag;
- }
-
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
-
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(value) {
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
- if (typeof value == 'function') {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == 'object') {
- return isArray(value)
- ? baseMatchesProperty(value[0], value[1])
- : baseMatches(value);
- }
- return property(value);
- }
-
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeysIn(object) {
- if (!isObject(object)) {
- return nativeKeysIn(object);
- }
- var isProto = isPrototype(object),
- result = [];
-
- for (var key in object) {
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.lt` which doesn't coerce arguments.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`,
- * else `false`.
- */
- function baseLt(value, other) {
- return value < other;
- }
-
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
-
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
- }
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
-
- /**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function baseMatchesProperty(path, srcValue) {
- if (isKey(path) && isStrictComparable(srcValue)) {
- return matchesStrictComparable(toKey(path), srcValue);
- }
- return function(object) {
- var objValue = get(object, path);
- return (objValue === undefined && objValue === srcValue)
- ? hasIn(object, path)
- : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
- };
- }
-
- /**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
- baseFor(source, function(srcValue, key) {
- stack || (stack = new Stack);
- if (isObject(srcValue)) {
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- }
- else {
- var newValue = customizer
- ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
- : undefined;
-
- if (newValue === undefined) {
- newValue = srcValue;
- }
- assignMergeValue(object, key, newValue);
- }
- }, keysIn);
- }
-
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = safeGet(object, key),
- srcValue = safeGet(source, key),
- stacked = stack.get(srcValue);
-
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
-
- var isCommon = newValue === undefined;
-
- if (isCommon) {
- var isArr = isArray(srcValue),
- isBuff = !isArr && isBuffer(srcValue),
- isTyped = !isArr && !isBuff && isTypedArray(srcValue);
-
- newValue = srcValue;
- if (isArr || isBuff || isTyped) {
- if (isArray(objValue)) {
- newValue = objValue;
- }
- else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
- }
- else if (isBuff) {
- isCommon = false;
- newValue = cloneBuffer(srcValue, true);
- }
- else if (isTyped) {
- isCommon = false;
- newValue = cloneTypedArray(srcValue, true);
- }
- else {
- newValue = [];
- }
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- newValue = objValue;
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
- }
- else if (!isObject(objValue) || isFunction(objValue)) {
- newValue = initCloneObject(srcValue);
- }
- }
- else {
- isCommon = false;
- }
- }
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, newValue);
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- stack['delete'](srcValue);
- }
- assignMergeValue(object, key, newValue);
- }
-
- /**
- * The base implementation of `_.nth` which doesn't coerce arguments.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {number} n The index of the element to return.
- * @returns {*} Returns the nth element of `array`.
- */
- function baseNth(array, n) {
- var length = array.length;
- if (!length) {
- return;
- }
- n += n < 0 ? length : 0;
- return isIndex(n, length) ? array[n] : undefined;
- }
-
- /**
- * The base implementation of `_.orderBy` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {string[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseOrderBy(collection, iteratees, orders) {
- var index = -1;
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
-
- var result = baseMap(collection, function(value, key, collection) {
- var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value);
- });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
- }
-
- /**
- * The base implementation of `_.pick` without support for individual
- * property identifiers.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} paths The property paths to pick.
- * @returns {Object} Returns the new object.
- */
- function basePick(object, paths) {
- return basePickBy(object, paths, function(value, path) {
- return hasIn(object, path);
- });
- }
-
- /**
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} paths The property paths to pick.
- * @param {Function} predicate The function invoked per property.
- * @returns {Object} Returns the new object.
- */
- function basePickBy(object, paths, predicate) {
- var index = -1,
- length = paths.length,
- result = {};
-
- while (++index < length) {
- var path = paths[index],
- value = baseGet(object, path);
-
- if (predicate(value, path)) {
- baseSet(result, castPath(path, object), value);
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
-
- /**
- * The base implementation of `_.pullAllBy` without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns `array`.
- */
- function basePullAll(array, values, iteratee, comparator) {
- var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
- index = -1,
- length = values.length,
- seen = array;
-
- if (array === values) {
- values = copyArray(values);
- }
- if (iteratee) {
- seen = arrayMap(array, baseUnary(iteratee));
- }
- while (++index < length) {
- var fromIndex = 0,
- value = values[index],
- computed = iteratee ? iteratee(value) : value;
-
- while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
- if (seen !== array) {
- splice.call(seen, fromIndex, 1);
- }
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.pullAt` without support for individual
- * indexes or capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0,
- lastIndex = length - 1;
-
- while (length--) {
- var index = indexes[length];
- if (length == lastIndex || index !== previous) {
- var previous = index;
- if (isIndex(index)) {
- splice.call(array, index, 1);
- } else {
- baseUnset(array, index);
- }
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.random` without support for returning
- * floating-point numbers.
- *
- * @private
- * @param {number} lower The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the random number.
- */
- function baseRandom(lower, upper) {
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
- }
-
- /**
- * The base implementation of `_.range` and `_.rangeRight` which doesn't
- * coerce arguments.
- *
- * @private
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @param {number} step The value to increment or decrement by.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the range of numbers.
- */
- function baseRange(start, end, step, fromRight) {
- var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length);
-
- while (length--) {
- result[fromRight ? length : ++index] = start;
- start += step;
- }
- return result;
- }
-
- /**
- * The base implementation of `_.repeat` which doesn't coerce arguments.
- *
- * @private
- * @param {string} string The string to repeat.
- * @param {number} n The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- */
- function baseRepeat(string, n) {
- var result = '';
- if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- if (n) {
- string += string;
- }
- } while (n);
-
- return result;
- }
-
- /**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
- function baseRest(func, start) {
- return setToString(overRest(func, start, identity), func + '');
- }
-
- /**
- * The base implementation of `_.sample`.
- *
- * @private
- * @param {Array|Object} collection The collection to sample.
- * @returns {*} Returns the random element.
- */
- function baseSample(collection) {
- return arraySample(values(collection));
- }
-
- /**
- * The base implementation of `_.sampleSize` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to sample.
- * @param {number} n The number of elements to sample.
- * @returns {Array} Returns the random elements.
- */
- function baseSampleSize(collection, n) {
- var array = values(collection);
- return shuffleSelf(array, baseClamp(n, 0, array.length));
- }
-
- /**
- * The base implementation of `_.set`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseSet(object, path, value, customizer) {
- if (!isObject(object)) {
- return object;
- }
- path = castPath(path, object);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = toKey(path[index]),
- newValue = value;
-
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : undefined;
- if (newValue === undefined) {
- newValue = isObject(objValue)
- ? objValue
- : (isIndex(path[index + 1]) ? [] : {});
- }
- }
- assignValue(nested, key, newValue);
- nested = nested[key];
- }
- return object;
- }
-
- /**
- * The base implementation of `setData` without support for hot loop shorting.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var baseSetData = !metaMap ? identity : function(func, data) {
- metaMap.set(func, data);
- return func;
- };
-
- /**
- * The base implementation of `setToString` without support for hot loop shorting.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var baseSetToString = !defineProperty ? identity : function(func, string) {
- return defineProperty(func, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': constant(string),
- 'writable': true
- });
- };
-
- /**
- * The base implementation of `_.shuffle`.
- *
- * @private
- * @param {Array|Object} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- */
- function baseShuffle(collection) {
- return shuffleSelf(values(collection));
- }
-
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
-
- /**
- * The base implementation of `_.some` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
-
- /**
- * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
- * performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function baseSortedIndex(array, value, retHighest) {
- var low = 0,
- high = array == null ? low : array.length;
-
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = (low + high) >>> 1,
- computed = array[mid];
-
- if (computed !== null && !isSymbol(computed) &&
- (retHighest ? (computed <= value) : (computed < value))) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return baseSortedIndexBy(array, value, identity, retHighest);
- }
-
- /**
- * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
- * which invokes `iteratee` for `value` and each element of `array` to compute
- * their sort ranking. The iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The iteratee invoked per element.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function baseSortedIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array == null ? 0 : array.length,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsSymbol = isSymbol(value),
- valIsUndefined = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- othIsDefined = computed !== undefined,
- othIsNull = computed === null,
- othIsReflexive = computed === computed,
- othIsSymbol = isSymbol(computed);
-
- if (valIsNaN) {
- var setLow = retHighest || othIsReflexive;
- } else if (valIsUndefined) {
- setLow = othIsReflexive && (retHighest || othIsDefined);
- } else if (valIsNull) {
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
- } else if (valIsSymbol) {
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
- } else if (othIsNull || othIsSymbol) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
- }
-
- /**
- * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseSortedUniq(array, iteratee) {
- var index = -1,
- length = array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (!index || !eq(computed, seen)) {
- var seen = computed;
- result[resIndex++] = value === 0 ? 0 : value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.toNumber` which doesn't ensure correct
- * conversions of binary, hexadecimal, or octal string values.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- */
- function baseToNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- return +value;
- }
-
- /**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (isArray(value)) {
- // Recursively convert values (susceptible to call stack limits).
- return arrayMap(value, baseToString) + '';
- }
- if (isSymbol(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- /**
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseUniq(array, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- length = array.length,
- isCommon = true,
- result = [],
- seen = result;
-
- if (comparator) {
- isCommon = false;
- includes = arrayIncludesWith;
- }
- else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array);
- if (set) {
- return setToArray(set);
- }
- isCommon = false;
- includes = cacheHas;
- seen = new SetCache;
- }
- else {
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- }
- else if (!includes(seen, computed, comparator)) {
- if (seen !== result) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.unset`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The property path to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- */
- function baseUnset(object, path) {
- path = castPath(path, object);
- object = parent(object, path);
- return object == null || delete object[toKey(last(path))];
- }
-
- /**
- * The base implementation of `_.update`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to update.
- * @param {Function} updater The function to produce the updated value.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseUpdate(object, path, updater, customizer) {
- return baseSet(object, path, updater(baseGet(object, path)), customizer);
- }
-
- /**
- * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
- * without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length) &&
- predicate(array[index], index, array)) {}
-
- return isDrop
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
- }
-
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to perform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- return arrayReduce(actions, function(result, action) {
- return action.func.apply(action.thisArg, arrayPush([result], action.args));
- }, result);
- }
-
- /**
- * The base implementation of methods like `_.xor`, without support for
- * iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of values.
- */
- function baseXor(arrays, iteratee, comparator) {
- var length = arrays.length;
- if (length < 2) {
- return length ? baseUniq(arrays[0]) : [];
- }
- var index = -1,
- result = Array(length);
-
- while (++index < length) {
- var array = arrays[index],
- othIndex = -1;
-
- while (++othIndex < length) {
- if (othIndex != index) {
- result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
- }
- }
- }
- return baseUniq(baseFlatten(result, 1), iteratee, comparator);
- }
-
- /**
- * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
- *
- * @private
- * @param {Array} props The property identifiers.
- * @param {Array} values The property values.
- * @param {Function} assignFunc The function to assign values.
- * @returns {Object} Returns the new object.
- */
- function baseZipObject(props, values, assignFunc) {
- var index = -1,
- length = props.length,
- valsLength = values.length,
- result = {};
-
- while (++index < length) {
- var value = index < valsLength ? values[index] : undefined;
- assignFunc(result, props[index], value);
- }
- return result;
- }
-
- /**
- * Casts `value` to an empty array if it's not an array like object.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array|Object} Returns the cast array-like object.
- */
- function castArrayLikeObject(value) {
- return isArrayLikeObject(value) ? value : [];
- }
-
- /**
- * Casts `value` to `identity` if it's not a function.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Function} Returns cast function.
- */
- function castFunction(value) {
- return typeof value == 'function' ? value : identity;
- }
-
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {Object} [object] The object to query keys on.
- * @returns {Array} Returns the cast property path array.
- */
- function castPath(value, object) {
- if (isArray(value)) {
- return value;
- }
- return isKey(value, object) ? [value] : stringToPath(toString(value));
- }
-
- /**
- * A `baseRest` alias which can be replaced with `identity` by module
- * replacement plugins.
- *
- * @private
- * @type {Function}
- * @param {Function} func The function to apply a rest parameter to.
- * @returns {Function} Returns the new function.
- */
- var castRest = baseRest;
-
- /**
- * Casts `array` to a slice if it's needed.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {number} start The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the cast slice.
- */
- function castSlice(array, start, end) {
- var length = array.length;
- end = end === undefined ? length : end;
- return (!start && end >= length) ? array : baseSlice(array, start, end);
- }
-
- /**
- * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
- *
- * @private
- * @param {number|Object} id The timer id or timeout object of the timer to clear.
- */
- var clearTimeout = ctxClearTimeout || function(id) {
- return root.clearTimeout(id);
- };
-
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var length = buffer.length,
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
-
- buffer.copy(result);
- return result;
- }
-
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
- return result;
- }
-
- /**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
- function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
- }
-
- /**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
- function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
- }
-
- /**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
- function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
- }
-
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
- }
-
- /**
- * Compares values to sort them in ascending order.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function compareAscending(value, other) {
- if (value !== other) {
- var valIsDefined = value !== undefined,
- valIsNull = value === null,
- valIsReflexive = value === value,
- valIsSymbol = isSymbol(value);
-
- var othIsDefined = other !== undefined,
- othIsNull = other === null,
- othIsReflexive = other === other,
- othIsSymbol = isSymbol(other);
-
- if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
- (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
- (valIsNull && othIsDefined && othIsReflexive) ||
- (!valIsDefined && othIsReflexive) ||
- !valIsReflexive) {
- return 1;
- }
- if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
- (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
- (othIsNull && valIsDefined && valIsReflexive) ||
- (!othIsDefined && valIsReflexive) ||
- !othIsReflexive) {
- return -1;
- }
- }
- return 0;
- }
-
- /**
- * Used by `_.orderBy` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
- * specify an order of "desc" for descending or "asc" for ascending sort order
- * of corresponding values.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]|string[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
-
- while (++index < length) {
- var result = compareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order == 'desc' ? -1 : 1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
-
- /**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgs(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersLength = holders.length,
- leftIndex = -1,
- leftLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(leftLength + rangeLength),
- isUncurried = !isCurried;
-
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- }
- while (rangeLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
- }
-
- /**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgsRight(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersIndex = -1,
- holdersLength = holders.length,
- rightIndex = -1,
- rightLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(rangeLength + rightLength),
- isUncurried = !isCurried;
-
- while (++argsIndex < rangeLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- }
- return result;
- }
-
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
-
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
-
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
-
- if (newValue === undefined) {
- newValue = source[key];
- }
- if (isNew) {
- baseAssignValue(object, key, newValue);
- } else {
- assignValue(object, key, newValue);
- }
- }
- return object;
- }
-
- /**
- * Copies own symbols of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
-
- /**
- * Copies own and inherited symbols of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbolsIn(source, object) {
- return copyObject(source, getSymbolsIn(source), object);
- }
-
- /**
- * Creates a function like `_.groupBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} [initializer] The accumulator object initializer.
- * @returns {Function} Returns the new aggregator function.
- */
- function createAggregator(setter, initializer) {
- return function(collection, iteratee) {
- var func = isArray(collection) ? arrayAggregator : baseAggregator,
- accumulator = initializer ? initializer() : {};
-
- return func(collection, setter, getIteratee(iteratee, 2), accumulator);
- };
- }
-
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return baseRest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
-
- customizer = (assigner.length > 3 && typeof customizer == 'function')
- ? (length--, customizer)
- : undefined;
-
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
- });
- }
-
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
-
- /**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the optional `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createBind(func, bitmask, thisArg) {
- var isBind = bitmask & WRAP_BIND_FLAG,
- Ctor = createCtor(func);
-
- function wrapper() {
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, arguments);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.lowerFirst`.
- *
- * @private
- * @param {string} methodName The name of the `String` case method to use.
- * @returns {Function} Returns the new case function.
- */
- function createCaseFirst(methodName) {
- return function(string) {
- string = toString(string);
-
- var strSymbols = hasUnicode(string)
- ? stringToArray(string)
- : undefined;
-
- var chr = strSymbols
- ? strSymbols[0]
- : string.charAt(0);
-
- var trailing = strSymbols
- ? castSlice(strSymbols, 1).join('')
- : string.slice(1);
-
- return chr[methodName]() + trailing;
- };
- }
-
- /**
- * Creates a function like `_.camelCase`.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
- function createCompounder(callback) {
- return function(string) {
- return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
- };
- }
-
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtor(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors. See
- // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0: return new Ctor;
- case 1: return new Ctor(args[0]);
- case 2: return new Ctor(args[0], args[1]);
- case 3: return new Ctor(args[0], args[1], args[2]);
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
-
- /**
- * Creates a function that wraps `func` to enable currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {number} arity The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCurry(func, bitmask, arity) {
- var Ctor = createCtor(func);
-
- function wrapper() {
- var length = arguments.length,
- args = Array(length),
- index = length,
- placeholder = getHolder(wrapper);
-
- while (index--) {
- args[index] = arguments[index];
- }
- var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
- ? []
- : replaceHolders(args, placeholder);
-
- length -= holders.length;
- if (length < arity) {
- return createRecurry(
- func, bitmask, createHybrid, wrapper.placeholder, undefined,
- args, holders, undefined, undefined, arity - length);
- }
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return apply(fn, this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.find` or `_.findLast` function.
- *
- * @private
- * @param {Function} findIndexFunc The function to find the collection index.
- * @returns {Function} Returns the new find function.
- */
- function createFind(findIndexFunc) {
- return function(collection, predicate, fromIndex) {
- var iterable = Object(collection);
- if (!isArrayLike(collection)) {
- var iteratee = getIteratee(predicate, 3);
- collection = keys(collection);
- predicate = function(key) { return iteratee(iterable[key], key, iterable); };
- }
- var index = findIndexFunc(collection, predicate, fromIndex);
- return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
- };
- }
-
- /**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
- function createFlow(fromRight) {
- return flatRest(function(funcs) {
- var length = funcs.length,
- index = length,
- prereq = LodashWrapper.prototype.thru;
-
- if (fromRight) {
- funcs.reverse();
- }
- while (index--) {
- var func = funcs[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
- var wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? index : length;
- while (++index < length) {
- func = funcs[index];
-
- var funcName = getFuncName(func),
- data = funcName == 'wrapper' ? getData(func) : undefined;
-
- if (data && isLaziable(data[0]) &&
- data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
- !data[4].length && data[9] == 1
- ) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = (func.length == 1 && isLaziable(func))
- ? wrapper[funcName]()
- : wrapper.thru(func);
- }
- }
- return function() {
- var args = arguments,
- value = args[0];
-
- if (wrapper && args.length == 1 && isArray(value)) {
- return wrapper.plant(value).value();
- }
- var index = 0,
- result = length ? funcs[index].apply(this, args) : value;
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- });
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with optional `this`
- * binding of `thisArg`, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to
- * the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided
- * to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & WRAP_ARY_FLAG,
- isBind = bitmask & WRAP_BIND_FLAG,
- isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
- isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
- isFlip = bitmask & WRAP_FLIP_FLAG,
- Ctor = isBindKey ? undefined : createCtor(func);
-
- function wrapper() {
- var length = arguments.length,
- args = Array(length),
- index = length;
-
- while (index--) {
- args[index] = arguments[index];
- }
- if (isCurried) {
- var placeholder = getHolder(wrapper),
- holdersCount = countHolders(args, placeholder);
- }
- if (partials) {
- args = composeArgs(args, partials, holders, isCurried);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
- }
- length -= holdersCount;
- if (isCurried && length < arity) {
- var newHolders = replaceHolders(args, placeholder);
- return createRecurry(
- func, bitmask, createHybrid, wrapper.placeholder, thisArg,
- args, newHolders, argPos, ary, arity - length
- );
- }
- var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func;
-
- length = args.length;
- if (argPos) {
- args = reorder(args, argPos);
- } else if (isFlip && length > 1) {
- args.reverse();
- }
- if (isAry && ary < length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtor(fn);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.invertBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} toIteratee The function to resolve iteratees.
- * @returns {Function} Returns the new inverter function.
- */
- function createInverter(setter, toIteratee) {
- return function(object, iteratee) {
- return baseInverter(object, setter, toIteratee(iteratee), {});
- };
- }
-
- /**
- * Creates a function that performs a mathematical operation on two values.
- *
- * @private
- * @param {Function} operator The function to perform the operation.
- * @param {number} [defaultValue] The value used for `undefined` arguments.
- * @returns {Function} Returns the new mathematical operation function.
- */
- function createMathOperation(operator, defaultValue) {
- return function(value, other) {
- var result;
- if (value === undefined && other === undefined) {
- return defaultValue;
- }
- if (value !== undefined) {
- result = value;
- }
- if (other !== undefined) {
- if (result === undefined) {
- return other;
- }
- if (typeof value == 'string' || typeof other == 'string') {
- value = baseToString(value);
- other = baseToString(other);
- } else {
- value = baseToNumber(value);
- other = baseToNumber(other);
- }
- result = operator(value, other);
- }
- return result;
- };
- }
-
- /**
- * Creates a function like `_.over`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over iteratees.
- * @returns {Function} Returns the new over function.
- */
- function createOver(arrayFunc) {
- return flatRest(function(iteratees) {
- iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
- return baseRest(function(args) {
- var thisArg = this;
- return arrayFunc(iteratees, function(iteratee) {
- return apply(iteratee, thisArg, args);
- });
- });
- });
- }
-
- /**
- * Creates the padding for `string` based on `length`. The `chars` string
- * is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {number} length The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padding for `string`.
- */
- function createPadding(length, chars) {
- chars = chars === undefined ? ' ' : baseToString(chars);
-
- var charsLength = chars.length;
- if (charsLength < 2) {
- return charsLength ? baseRepeat(chars, length) : chars;
- }
- var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
- return hasUnicode(chars)
- ? castSlice(stringToArray(result), 0, length).join('')
- : result.slice(0, length);
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the `this` binding
- * of `thisArg` and `partials` prepended to the arguments it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to
- * the new function.
- * @returns {Function} Returns the new wrapped function.
- */
- function createPartial(func, bitmask, thisArg, partials) {
- var isBind = bitmask & WRAP_BIND_FLAG,
- Ctor = createCtor(func);
-
- function wrapper() {
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength),
- fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- return apply(fn, isBind ? thisArg : this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.range` or `_.rangeRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new range function.
- */
- function createRange(fromRight) {
- return function(start, end, step) {
- if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- // Ensure the sign of `-0` is preserved.
- start = toFinite(start);
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toFinite(end);
- }
- step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
- return baseRange(start, end, step, fromRight);
- };
- }
-
- /**
- * Creates a function that performs a relational operation on two values.
- *
- * @private
- * @param {Function} operator The function to perform the operation.
- * @returns {Function} Returns the new relational operation function.
- */
- function createRelationalOperation(operator) {
- return function(value, other) {
- if (!(typeof value == 'string' && typeof other == 'string')) {
- value = toNumber(value);
- other = toNumber(other);
- }
- return operator(value, other);
- };
- }
-
- /**
- * Creates a function that wraps `func` to continue currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @param {Function} wrapFunc The function to create the `func` wrapper.
- * @param {*} placeholder The placeholder value.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to
- * the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
- var isCurry = bitmask & WRAP_CURRY_FLAG,
- newHolders = isCurry ? holders : undefined,
- newHoldersRight = isCurry ? undefined : holders,
- newPartials = isCurry ? partials : undefined,
- newPartialsRight = isCurry ? undefined : partials;
-
- bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
-
- if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
- bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
- }
- var newData = [
- func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
- newHoldersRight, argPos, ary, arity
- ];
-
- var result = wrapFunc.apply(undefined, newData);
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return setWrapToString(result, func, bitmask);
- }
-
- /**
- * Creates a function like `_.round`.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
- function createRound(methodName) {
- var func = Math[methodName];
- return function(number, precision) {
- number = toNumber(number);
- precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
- if (precision && nativeIsFinite(number)) {
- // Shift with exponential notation to avoid floating-point issues.
- // See [MDN](https://mdn.io/round#Examples) for more details.
- var pair = (toString(number) + 'e').split('e'),
- value = func(pair[0] + 'e' + (+pair[1] + precision));
-
- pair = (toString(value) + 'e').split('e');
- return +(pair[0] + 'e' + (+pair[1] - precision));
- }
- return func(number);
- };
- }
-
- /**
- * Creates a set object of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
- var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
- return new Set(values);
- };
-
- /**
- * Creates a `_.toPairs` or `_.toPairsIn` function.
- *
- * @private
- * @param {Function} keysFunc The function to get the keys of a given object.
- * @returns {Function} Returns the new pairs function.
- */
- function createToPairs(keysFunc) {
- return function(object) {
- var tag = getTag(object);
- if (tag == mapTag) {
- return mapToArray(object);
- }
- if (tag == setTag) {
- return setToPairs(object);
- }
- return baseToPairs(object, keysFunc(object));
- };
- }
-
- /**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask flags.
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * 512 - `_.flip`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
- arity = arity === undefined ? arity : toInteger(arity);
- length -= holders ? holders.length : 0;
-
- if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials,
- holdersRight = holders;
-
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func);
-
- var newData = [
- func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
- argPos, ary, arity
- ];
-
- if (data) {
- mergeData(newData, data);
- }
- func = newData[0];
- bitmask = newData[1];
- thisArg = newData[2];
- partials = newData[3];
- holders = newData[4];
- arity = newData[9] = newData[9] === undefined
- ? (isBindKey ? 0 : func.length)
- : nativeMax(newData[9] - length, 0);
-
- if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
- bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
- }
- if (!bitmask || bitmask == WRAP_BIND_FLAG) {
- var result = createBind(func, bitmask, thisArg);
- } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
- result = createCurry(func, bitmask, arity);
- } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
- result = createPartial(func, bitmask, thisArg, partials);
- } else {
- result = createHybrid.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setWrapToString(setter(result, newData), func, bitmask);
- }
-
- /**
- * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
- * of source objects to the destination object for all destination properties
- * that resolve to `undefined`.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
- function customDefaultsAssignIn(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
- }
-
- /**
- * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
- * objects into destination objects that are passed thru.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to merge.
- * @param {Object} object The parent object of `objValue`.
- * @param {Object} source The parent object of `srcValue`.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- * @returns {*} Returns the value to assign.
- */
- function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
- if (isObject(objValue) && isObject(srcValue)) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, objValue);
- baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
- stack['delete'](srcValue);
- }
- return objValue;
- }
-
- /**
- * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
- * objects.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {string} key The key of the property to inspect.
- * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
- */
- function customOmitClone(value) {
- return isPlainObject(value) ? undefined : value;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
-
- stack.set(array, other);
- stack.set(other, array);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
-
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
-
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return eq(+object, +other);
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
-
- case mapTag:
- var convert = mapToArray;
-
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
- convert || (convert = setToArray);
-
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= COMPARE_UNORDERED_FLAG;
-
- // Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack['delete'](object);
- return result;
-
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = getAllKeys(object),
- objLength = objProps.length,
- othProps = getAllKeys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
- }
-
- /**
- * A specialized version of `baseRest` which flattens the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @returns {Function} Returns the new function.
- */
- function flatRest(func) {
- return setToString(overRest(func, undefined, flatten), func + '');
- }
-
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
-
- /**
- * Creates an array of own and inherited enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeysIn(object) {
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
- }
-
- /**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
- var getData = !metaMap ? noop : function(func) {
- return metaMap.get(func);
- };
-
- /**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
- function getFuncName(func) {
- var result = (func.name + ''),
- array = realNames[result],
- length = hasOwnProperty.call(realNames, result) ? array.length : 0;
-
- while (length--) {
- var data = array[length],
- otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
- }
-
- /**
- * Gets the argument placeholder value for `func`.
- *
- * @private
- * @param {Function} func The function to inspect.
- * @returns {*} Returns the placeholder value.
- */
- function getHolder(func) {
- var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
- return object.placeholder;
- }
-
- /**
- * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
- * this function returns the custom method, otherwise it returns `baseIteratee`.
- * If arguments are provided, the chosen function is invoked with them and
- * its result is returned.
- *
- * @private
- * @param {*} [value] The value to convert to an iteratee.
- * @param {number} [arity] The arity of the created iteratee.
- * @returns {Function} Returns the chosen function or its result.
- */
- function getIteratee() {
- var result = lodash.iteratee || iteratee;
- result = result === iteratee ? baseIteratee : result;
- return arguments.length ? result(arguments[0], arguments[1]) : result;
- }
-
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
-
- /**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = keys(object),
- length = result.length;
-
- while (length--) {
- var key = result[length],
- value = object[key];
-
- result[length] = [key, value, isStrictComparable(value)];
- }
- return result;
- }
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
-
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
-
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
-
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
-
- /**
- * Creates an array of the own enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) {
- return [];
- }
- object = Object(object);
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
- };
-
- /**
- * Creates an array of the own and inherited enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
- var result = [];
- while (object) {
- arrayPush(result, getSymbols(object));
- object = getPrototype(object);
- }
- return result;
- };
-
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
-
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = baseGetTag(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : '';
-
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
-
- /**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
- function getView(start, end, transforms) {
- var index = -1,
- length = transforms.length;
-
- while (++index < length) {
- var data = transforms[index],
- size = data.size;
-
- switch (data.type) {
- case 'drop': start += size; break;
- case 'dropRight': end -= size; break;
- case 'take': end = nativeMin(end, start + size); break;
- case 'takeRight': start = nativeMax(start, end - size); break;
- }
- }
- return { 'start': start, 'end': end };
- }
-
- /**
- * Extracts wrapper details from the `source` body comment.
- *
- * @private
- * @param {string} source The source to inspect.
- * @returns {Array} Returns the wrapper details.
- */
- function getWrapDetails(source) {
- var match = source.match(reWrapDetails);
- return match ? match[1].split(reSplitDetails) : [];
- }
-
- /**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
- function hasPath(object, path, hasFunc) {
- path = castPath(path, object);
-
- var index = -1,
- length = path.length,
- result = false;
-
- while (++index < length) {
- var key = toKey(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
- }
- object = object[key];
- }
- if (result || ++index != length) {
- return result;
- }
- length = object == null ? 0 : object.length;
- return !!length && isLength(length) && isIndex(key, length) &&
- (isArray(object) || isArguments(object));
- }
-
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length,
- result = new array.constructor(length);
-
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
-
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
- }
-
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case dataViewTag:
- return cloneDataView(object, isDeep);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
-
- case mapTag:
- return new Ctor;
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- return cloneRegExp(object);
-
- case setTag:
- return new Ctor;
-
- case symbolTag:
- return cloneSymbol(object);
- }
- }
-
- /**
- * Inserts wrapper `details` in a comment at the top of the `source` body.
- *
- * @private
- * @param {string} source The source to modify.
- * @returns {Array} details The details to insert.
- * @returns {string} Returns the modified source.
- */
- function insertWrapDetails(source, details) {
- var length = details.length;
- if (!length) {
- return source;
- }
- var lastIndex = length - 1;
- details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
- details = details.join(length > 2 ? ', ' : ' ');
- return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
- }
-
- /**
- * Checks if `value` is a flattenable `arguments` object or array.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
- */
- function isFlattenable(value) {
- return isArray(value) || isArguments(value) ||
- !!(spreadableSymbol && value && value[spreadableSymbol]);
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- var type = typeof value;
- length = length == null ? MAX_SAFE_INTEGER : length;
-
- return !!length &&
- (type == 'number' ||
- (type != 'symbol' && reIsUint.test(value))) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
-
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
- }
- return false;
- }
-
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- if (isArray(value)) {
- return false;
- }
- var type = typeof value;
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
- value == null || isSymbol(value)) {
- return true;
- }
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
- (object != null && value in Object(object));
- }
-
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
-
- /**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
- * else `false`.
- */
- function isLaziable(func) {
- var funcName = getFuncName(func),
- other = lodash[funcName];
-
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
- }
-
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
-
- /**
- * Checks if `func` is capable of being masked.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
- */
- var isMaskable = coreJsData ? isFunction : stubFalse;
-
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-
- return value === proto;
- }
-
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
-
- /**
- * A specialized version of `matchesProperty` for source values suitable
- * for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
- function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === srcValue &&
- (srcValue !== undefined || (key in Object(object)));
- };
- }
-
- /**
- * A specialized version of `_.memoize` which clears the memoized function's
- * cache when it exceeds `MAX_MEMOIZE_SIZE`.
- *
- * @private
- * @param {Function} func The function to have its output memoized.
- * @returns {Function} Returns the new memoized function.
- */
- function memoizeCapped(func) {
- var result = memoize(func, function(key) {
- if (cache.size === MAX_MEMOIZE_SIZE) {
- cache.clear();
- }
- return key;
- });
-
- var cache = result.cache;
- return result;
- }
-
- /**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers used to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and
- * `_.rearg` modify function arguments, making the order in which they are
- * executed important, preventing the merging of metadata. However, we make
- * an exception for a safe combined case where curried functions have `_.ary`
- * and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
- function mergeData(data, source) {
- var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
-
- var isCombo =
- ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
- ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
- ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
-
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & WRAP_BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : value;
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = value;
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & WRAP_ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
-
- return data;
- }
-
- /**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
-
- /**
- * A specialized version of `baseRest` which transforms the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @param {Function} transform The rest array transform.
- * @returns {Function} Returns the new function.
- */
- function overRest(func, start, transform) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = transform(array);
- return apply(func, this, otherArgs);
- };
- }
-
- /**
- * Gets the parent value at `path` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path to get the parent value of.
- * @returns {*} Returns the parent value.
- */
- function parent(object, path) {
- return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
- }
-
- /**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
- function reorder(array, indexes) {
- var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = copyArray(array);
-
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
- }
-
- /**
- * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function safeGet(object, key) {
- if (key === 'constructor' && typeof object[key] === 'function') {
- return;
- }
-
- if (key == '__proto__') {
- return;
- }
-
- return object[key];
- }
-
- /**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity
- * function to avoid garbage collection pauses in V8. See
- * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var setData = shortOut(baseSetData);
-
- /**
- * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @returns {number|Object} Returns the timer id or timeout object.
- */
- var setTimeout = ctxSetTimeout || function(func, wait) {
- return root.setTimeout(func, wait);
- };
-
- /**
- * Sets the `toString` method of `func` to return `string`.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
- var setToString = shortOut(baseSetToString);
-
- /**
- * Sets the `toString` method of `wrapper` to mimic the source of `reference`
- * with wrapper details in a comment at the top of the source body.
- *
- * @private
- * @param {Function} wrapper The function to modify.
- * @param {Function} reference The reference function.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @returns {Function} Returns `wrapper`.
- */
- function setWrapToString(wrapper, reference, bitmask) {
- var source = (reference + '');
- return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
- }
-
- /**
- * Creates a function that'll short out and invoke `identity` instead
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
- * milliseconds.
- *
- * @private
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new shortable function.
- */
- function shortOut(func) {
- var count = 0,
- lastCalled = 0;
-
- return function() {
- var stamp = nativeNow(),
- remaining = HOT_SPAN - (stamp - lastCalled);
-
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
- return func.apply(undefined, arguments);
- };
- }
-
- /**
- * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
- *
- * @private
- * @param {Array} array The array to shuffle.
- * @param {number} [size=array.length] The size of `array`.
- * @returns {Array} Returns `array`.
- */
- function shuffleSelf(array, size) {
- var index = -1,
- length = array.length,
- lastIndex = length - 1;
-
- size = size === undefined ? length : size;
- while (++index < size) {
- var rand = baseRandom(index, lastIndex),
- value = array[rand];
-
- array[rand] = array[index];
- array[index] = value;
- }
- array.length = size;
- return array;
- }
-
- /**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
- var stringToPath = memoizeCapped(function(string) {
- var result = [];
- if (string.charCodeAt(0) === 46 /* . */) {
- result.push('');
- }
- string.replace(rePropName, function(match, number, quote, subString) {
- result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
- });
-
- /**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
- function toKey(value) {
- if (typeof value == 'string' || isSymbol(value)) {
- return value;
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
-
- /**
- * Updates wrapper `details` based on `bitmask` flags.
- *
- * @private
- * @returns {Array} details The details to modify.
- * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
- * @returns {Array} Returns `details`.
- */
- function updateWrapDetails(details, bitmask) {
- arrayEach(wrapFlags, function(pair) {
- var value = '_.' + pair[0];
- if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
- details.push(value);
- }
- });
- return details.sort();
- }
-
- /**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
- function wrapperClone(wrapper) {
- if (wrapper instanceof LazyWrapper) {
- return wrapper.clone();
- }
- var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
- result.__actions__ = copyArray(wrapper.__actions__);
- result.__index__ = wrapper.__index__;
- result.__values__ = wrapper.__values__;
- return result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of elements split into groups the length of `size`.
- * If `array` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=1] The length of each chunk
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the new array of chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
- function chunk(array, size, guard) {
- if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
- size = 1;
- } else {
- size = nativeMax(toInteger(size), 0);
- }
- var length = array == null ? 0 : array.length;
- if (!length || size < 1) {
- return [];
- }
- var index = 0,
- resIndex = 0,
- result = Array(nativeCeil(length / size));
-
- while (index < length) {
- result[resIndex++] = baseSlice(array, index, (index += size));
- }
- return result;
- }
-
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
-
- /**
- * Creates a new array concatenating `array` with any additional arrays
- * and/or values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to concatenate.
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var other = _.concat(array, 2, [3], [[4]]);
- *
- * console.log(other);
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- function concat() {
- var length = arguments.length;
- if (!length) {
- return [];
- }
- var args = Array(length - 1),
- array = arguments[0],
- index = length;
-
- while (index--) {
- args[index - 1] = arguments[index];
- }
- return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
- }
-
- /**
- * Creates an array of `array` values not included in the other given arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order and references of result values are
- * determined by the first array.
- *
- * **Note:** Unlike `_.pullAll`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @see _.without, _.xor
- * @example
- *
- * _.difference([2, 1], [2, 3]);
- * // => [1]
- */
- var difference = baseRest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `iteratee` which
- * is invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. The order and references of result values are
- * determined by the first array. The iteratee is invoked with one argument:
- * (value).
- *
- * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
- * // => [1.2]
- *
- * // The `_.property` iteratee shorthand.
- * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var differenceBy = baseRest(function(array, values) {
- var iteratee = last(values);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `comparator`
- * which is invoked to compare elements of `array` to `values`. The order and
- * references of result values are determined by the first array. The comparator
- * is invoked with two arguments: (arrVal, othVal).
- *
- * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- *
- * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }]
- */
- var differenceWith = baseRest(function(array, values) {
- var comparator = last(values);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
- : [];
- });
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function drop(array, n, guard) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function dropRight(array, n, guard) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.dropRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropRightWhile(users, ['active', false]);
- * // => objects for ['barney']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropRightWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.dropWhile(users, function(o) { return !o.active; });
- * // => objects for ['pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropWhile(users, ['active', false]);
- * // => objects for ['pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true)
- : [];
- }
-
- /**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8, 10], '*', 1, 3);
- * // => [4, '*', '*', 10]
- */
- function fill(array, value, start, end) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
- }
-
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
- * // => 0
- *
- * // The `_.matches` iteratee shorthand.
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findIndex(users, ['active', false]);
- * // => 0
- *
- * // The `_.property` iteratee shorthand.
- * _.findIndex(users, 'active');
- * // => 2
- */
- function findIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
- return baseFindIndex(array, getIteratee(predicate, 3), index);
- }
-
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=array.length-1] The index to search from.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
- * // => 2
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastIndex(users, ['active', false]);
- * // => 2
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- function findLastIndex(array, predicate, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = length - 1;
- if (fromIndex !== undefined) {
- index = toInteger(fromIndex);
- index = fromIndex < 0
- ? nativeMax(length + index, 0)
- : nativeMin(index, length - 1);
- }
- return baseFindIndex(array, getIteratee(predicate, 3), index, true);
- }
-
- /**
- * Flattens `array` a single level deep.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, [3, [4]], 5]]);
- * // => [1, 2, [3, [4]], 5]
- */
- function flatten(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, 1) : [];
- }
-
- /**
- * Recursively flattens `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
- * // => [1, 2, 3, 4, 5]
- */
- function flattenDeep(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseFlatten(array, INFINITY) : [];
- }
-
- /**
- * Recursively flatten `array` up to `depth` times.
- *
- * @static
- * @memberOf _
- * @since 4.4.0
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {number} [depth=1] The maximum recursion depth.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * var array = [1, [2, [3, [4]], 5]];
- *
- * _.flattenDepth(array, 1);
- * // => [1, 2, [3, [4]], 5]
- *
- * _.flattenDepth(array, 2);
- * // => [1, 2, 3, [4], 5]
- */
- function flattenDepth(array, depth) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- depth = depth === undefined ? 1 : toInteger(depth);
- return baseFlatten(array, depth);
- }
-
- /**
- * The inverse of `_.toPairs`; this method returns an object composed
- * from key-value `pairs`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} pairs The key-value pairs.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.fromPairs([['a', 1], ['b', 2]]);
- * // => { 'a': 1, 'b': 2 }
- */
- function fromPairs(pairs) {
- var index = -1,
- length = pairs == null ? 0 : pairs.length,
- result = {};
-
- while (++index < length) {
- var pair = pairs[index];
- result[pair[0]] = pair[1];
- }
- return result;
- }
-
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias first
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.head([1, 2, 3]);
- * // => 1
- *
- * _.head([]);
- * // => undefined
- */
- function head(array) {
- return (array && array.length) ? array[0] : undefined;
- }
-
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the
- * offset from the end of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // Search from the `fromIndex`.
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- */
- function indexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
- if (index < 0) {
- index = nativeMax(length + index, 0);
- }
- return baseIndexOf(array, value, index);
- }
-
- /**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
- function initial(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseSlice(array, 0, -1) : [];
- }
-
- /**
- * Creates an array of unique values that are included in all given arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons. The order and references of result values are
- * determined by the first array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * _.intersection([2, 1], [2, 3]);
- * // => [2]
- */
- var intersection = baseRest(function(arrays) {
- var mapped = arrayMap(arrays, castArrayLikeObject);
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped)
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `iteratee`
- * which is invoked for each element of each `arrays` to generate the criterion
- * by which they're compared. The order and references of result values are
- * determined by the first array. The iteratee is invoked with one argument:
- * (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
- * // => [2.1]
- *
- * // The `_.property` iteratee shorthand.
- * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }]
- */
- var intersectionBy = baseRest(function(arrays) {
- var iteratee = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject);
-
- if (iteratee === last(mapped)) {
- iteratee = undefined;
- } else {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, getIteratee(iteratee, 2))
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `comparator`
- * which is invoked to compare elements of `arrays`. The order and references
- * of result values are determined by the first array. The comparator is
- * invoked with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of intersecting values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.intersectionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }]
- */
- var intersectionWith = baseRest(function(arrays) {
- var comparator = last(arrays),
- mapped = arrayMap(arrays, castArrayLikeObject);
-
- comparator = typeof comparator == 'function' ? comparator : undefined;
- if (comparator) {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, undefined, comparator)
- : [];
- });
-
- /**
- * Converts all elements in `array` into a string separated by `separator`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to convert.
- * @param {string} [separator=','] The element separator.
- * @returns {string} Returns the joined string.
- * @example
- *
- * _.join(['a', 'b', 'c'], '~');
- * // => 'a~b~c'
- */
- function join(array, separator) {
- return array == null ? '' : nativeJoin.call(array, separator);
- }
-
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array == null ? 0 : array.length;
- return length ? array[length - 1] : undefined;
- }
-
- /**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=array.length-1] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // Search from the `fromIndex`.
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- */
- function lastIndexOf(array, value, fromIndex) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return -1;
- }
- var index = length;
- if (fromIndex !== undefined) {
- index = toInteger(fromIndex);
- index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
- }
- return value === value
- ? strictLastIndexOf(array, value, index)
- : baseFindIndex(array, baseIsNaN, index, true);
- }
-
- /**
- * Gets the element at index `n` of `array`. If `n` is negative, the nth
- * element from the end is returned.
- *
- * @static
- * @memberOf _
- * @since 4.11.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=0] The index of the element to return.
- * @returns {*} Returns the nth element of `array`.
- * @example
- *
- * var array = ['a', 'b', 'c', 'd'];
- *
- * _.nth(array, 1);
- * // => 'b'
- *
- * _.nth(array, -2);
- * // => 'c';
- */
- function nth(array, n) {
- return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
- }
-
- /**
- * Removes all given values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
- * to remove elements from an array by predicate.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
- *
- * _.pull(array, 'a', 'c');
- * console.log(array);
- * // => ['b', 'b']
- */
- var pull = baseRest(pullAll);
-
- /**
- * This method is like `_.pull` except that it accepts an array of values to remove.
- *
- * **Note:** Unlike `_.difference`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
- *
- * _.pullAll(array, ['a', 'c']);
- * console.log(array);
- * // => ['b', 'b']
- */
- function pullAll(array, values) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values)
- : array;
- }
-
- /**
- * This method is like `_.pullAll` except that it accepts `iteratee` which is
- * invoked for each element of `array` and `values` to generate the criterion
- * by which they're compared. The iteratee is invoked with one argument: (value).
- *
- * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
- *
- * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
- * console.log(array);
- * // => [{ 'x': 2 }]
- */
- function pullAllBy(array, values, iteratee) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values, getIteratee(iteratee, 2))
- : array;
- }
-
- /**
- * This method is like `_.pullAll` except that it accepts `comparator` which
- * is invoked to compare elements of `array` to `values`. The comparator is
- * invoked with two arguments: (arrVal, othVal).
- *
- * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
- *
- * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
- * console.log(array);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
- */
- function pullAllWith(array, values, comparator) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values, undefined, comparator)
- : array;
- }
-
- /**
- * Removes elements from `array` corresponding to `indexes` and returns an
- * array of removed elements.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = ['a', 'b', 'c', 'd'];
- * var pulled = _.pullAt(array, [1, 3]);
- *
- * console.log(array);
- * // => ['a', 'c']
- *
- * console.log(pulled);
- * // => ['b', 'd']
- */
- var pullAt = flatRest(function(array, indexes) {
- var length = array == null ? 0 : array.length,
- result = baseAt(array, indexes);
-
- basePullAt(array, arrayMap(indexes, function(index) {
- return isIndex(index, length) ? +index : index;
- }).sort(compareAscending));
-
- return result;
- });
-
- /**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is invoked
- * with three arguments: (value, index, array).
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
- * to pull elements from an array by value.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
- function remove(array, predicate) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1,
- indexes = [],
- length = array.length;
-
- predicate = getIteratee(predicate, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
- }
-
- /**
- * Reverses `array` so that the first element becomes the last, the second
- * element becomes the second to last, and so on.
- *
- * **Note:** This method mutates `array` and is based on
- * [`Array#reverse`](https://mdn.io/Array/reverse).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to modify.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.reverse(array);
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function reverse(array) {
- return array == null ? array : nativeReverse.call(array);
- }
-
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of
- * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
- * returned.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- else {
- start = start == null ? 0 : toInteger(start);
- end = end === undefined ? length : toInteger(end);
- }
- return baseSlice(array, start, end);
- }
-
- /**
- * Uses a binary search to determine the lowest index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- */
- function sortedIndex(array, value) {
- return baseSortedIndex(array, value);
- }
-
- /**
- * This method is like `_.sortedIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * var objects = [{ 'x': 4 }, { 'x': 5 }];
- *
- * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
- * // => 0
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
- * // => 0
- */
- function sortedIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
- }
-
- /**
- * This method is like `_.indexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
- * // => 1
- */
- function sortedIndexOf(array, value) {
- var length = array == null ? 0 : array.length;
- if (length) {
- var index = baseSortedIndex(array, value);
- if (index < length && eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
- * // => 4
- */
- function sortedLastIndex(array, value) {
- return baseSortedIndex(array, value, true);
- }
-
- /**
- * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * var objects = [{ 'x': 4 }, { 'x': 5 }];
- *
- * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
- * // => 1
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
- * // => 1
- */
- function sortedLastIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
- }
-
- /**
- * This method is like `_.lastIndexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
- * // => 3
- */
- function sortedLastIndexOf(array, value) {
- var length = array == null ? 0 : array.length;
- if (length) {
- var index = baseSortedIndex(array, value, true) - 1;
- if (eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.uniq` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniq([1, 1, 2]);
- * // => [1, 2]
- */
- function sortedUniq(array) {
- return (array && array.length)
- ? baseSortedUniq(array)
- : [];
- }
-
- /**
- * This method is like `_.uniqBy` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
- * // => [1.1, 2.3]
- */
- function sortedUniqBy(array, iteratee) {
- return (array && array.length)
- ? baseSortedUniq(array, getIteratee(iteratee, 2))
- : [];
- }
-
- /**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.tail([1, 2, 3]);
- * // => [2, 3]
- */
- function tail(array) {
- var length = array == null ? 0 : array.length;
- return length ? baseSlice(array, 1, length) : [];
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
- function take(array, n, guard) {
- if (!(array && array.length)) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
- function takeRight(array, n, guard) {
- var length = array == null ? 0 : array.length;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is invoked with
- * three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.takeRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeRightWhile(users, ['active', false]);
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeRightWhile(users, 'active');
- * // => []
- */
- function takeRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), false, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is invoked with
- * three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.takeWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeWhile(users, ['active', false]);
- * // => objects for ['barney', 'fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeWhile(users, 'active');
- * // => []
- */
- function takeWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3))
- : [];
- }
-
- /**
- * Creates an array of unique values, in order, from all given arrays using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([2], [1, 2]);
- * // => [2, 1]
- */
- var union = baseRest(function(arrays) {
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
- });
-
- /**
- * This method is like `_.union` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by
- * which uniqueness is computed. Result values are chosen from the first
- * array in which the value occurs. The iteratee is invoked with one argument:
- * (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.unionBy([2.1], [1.2, 2.3], Math.floor);
- * // => [2.1, 1.2]
- *
- * // The `_.property` iteratee shorthand.
- * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- var unionBy = baseRest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
- });
-
- /**
- * This method is like `_.union` except that it accepts `comparator` which
- * is invoked to compare elements of `arrays`. Result values are chosen from
- * the first array in which the value occurs. The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.unionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var unionWith = baseRest(function(arrays) {
- var comparator = last(arrays);
- comparator = typeof comparator == 'function' ? comparator : undefined;
- return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
- });
-
- /**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each element
- * is kept. The order of result values is determined by the order they occur
- * in the array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- */
- function uniq(array) {
- return (array && array.length) ? baseUniq(array) : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * uniqueness is computed. The order of result values is determined by the
- * order they occur in the array. The iteratee is invoked with one argument:
- * (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
- * // => [2.1, 1.2]
- *
- * // The `_.property` iteratee shorthand.
- * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- function uniqBy(array, iteratee) {
- return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `comparator` which
- * is invoked to compare elements of `array`. The order of result values is
- * determined by the order they occur in the array.The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.uniqWith(objects, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
- */
- function uniqWith(array, comparator) {
- comparator = typeof comparator == 'function' ? comparator : undefined;
- return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
- }
-
- /**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @since 1.2.0
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
- * // => [['a', 1, true], ['b', 2, false]]
- *
- * _.unzip(zipped);
- * // => [['a', 'b'], [1, 2], [true, false]]
- */
- function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var length = 0;
- array = arrayFilter(array, function(group) {
- if (isArrayLikeObject(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- return baseTimes(length, function(index) {
- return arrayMap(array, baseProperty(index));
- });
- }
-
- /**
- * This method is like `_.unzip` except that it accepts `iteratee` to specify
- * how regrouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee=_.identity] The function to combine
- * regrouped values.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
- function unzipWith(array, iteratee) {
- if (!(array && array.length)) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- return arrayMap(result, function(group) {
- return apply(iteratee, undefined, group);
- });
- }
-
- /**
- * Creates an array excluding all given values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.pull`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @see _.difference, _.xor
- * @example
- *
- * _.without([2, 1, 2, 3], 1, 2);
- * // => [3]
- */
- var without = baseRest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, values)
- : [];
- });
-
- /**
- * Creates an array of unique values that is the
- * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the given arrays. The order of result values is determined by the order
- * they occur in the arrays.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of filtered values.
- * @see _.difference, _.without
- * @example
- *
- * _.xor([2, 1], [2, 3]);
- * // => [1, 3]
- */
- var xor = baseRest(function(arrays) {
- return baseXor(arrayFilter(arrays, isArrayLikeObject));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by
- * which by which they're compared. The order of result values is determined
- * by the order they occur in the arrays. The iteratee is invoked with one
- * argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
- * // => [1.2, 3.4]
- *
- * // The `_.property` iteratee shorthand.
- * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var xorBy = baseRest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `comparator` which is
- * invoked to compare elements of `arrays`. The order of result values is
- * determined by the order they occur in the arrays. The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.xorWith(objects, others, _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var xorWith = baseRest(function(arrays) {
- var comparator = last(arrays);
- comparator = typeof comparator == 'function' ? comparator : undefined;
- return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
- });
-
- /**
- * Creates an array of grouped elements, the first of which contains the
- * first elements of the given arrays, the second of which contains the
- * second elements of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['a', 'b'], [1, 2], [true, false]);
- * // => [['a', 1, true], ['b', 2, false]]
- */
- var zip = baseRest(unzip);
-
- /**
- * This method is like `_.fromPairs` except that it accepts two arrays,
- * one of property identifiers and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @since 0.4.0
- * @category Array
- * @param {Array} [props=[]] The property identifiers.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject(['a', 'b'], [1, 2]);
- * // => { 'a': 1, 'b': 2 }
- */
- function zipObject(props, values) {
- return baseZipObject(props || [], values || [], assignValue);
- }
-
- /**
- * This method is like `_.zipObject` except that it supports property paths.
- *
- * @static
- * @memberOf _
- * @since 4.1.0
- * @category Array
- * @param {Array} [props=[]] The property identifiers.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
- * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
- */
- function zipObjectDeep(props, values) {
- return baseZipObject(props || [], values || [], baseSet);
- }
-
- /**
- * This method is like `_.zip` except that it accepts `iteratee` to specify
- * how grouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee=_.identity] The function to combine
- * grouped values.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
- * return a + b + c;
- * });
- * // => [111, 222]
- */
- var zipWith = baseRest(function(arrays) {
- var length = arrays.length,
- iteratee = length > 1 ? arrays[length - 1] : undefined;
-
- iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
- return unzipWith(arrays, iteratee);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` wrapper instance that wraps `value` with explicit method
- * chain sequences enabled. The result of such sequences must be unwrapped
- * with `_#value`.
- *
- * @static
- * @memberOf _
- * @since 1.3.0
- * @category Seq
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _
- * .chain(users)
- * .sortBy('age')
- * .map(function(o) {
- * return o.user + ' is ' + o.age;
- * })
- * .head()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
-
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor
- * is invoked with one argument; (value). The purpose of this method is to
- * "tap into" a method chain sequence in order to modify intermediate results.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * // Mutate input array.
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor) {
- interceptor(value);
- return value;
- }
-
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- * The purpose of this method is to "pass thru" values replacing intermediate
- * results in a method chain sequence.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor) {
- return interceptor(value);
- }
-
- /**
- * This method is the wrapper version of `_.at`.
- *
- * @name at
- * @memberOf _
- * @since 1.0.0
- * @category Seq
- * @param {...(string|string[])} [paths] The property paths to pick.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _(object).at(['a[0].b.c', 'a[1]']).value();
- * // => [3, 4]
- */
- var wrapperAt = flatRest(function(paths) {
- var length = paths.length,
- start = length ? paths[0] : 0,
- value = this.__wrapped__,
- interceptor = function(object) { return baseAt(object, paths); };
-
- if (length > 1 || this.__actions__.length ||
- !(value instanceof LazyWrapper) || !isIndex(start)) {
- return this.thru(interceptor);
- }
- value = value.slice(start, +start + (length ? 1 : 0));
- value.__actions__.push({
- 'func': thru,
- 'args': [interceptor],
- 'thisArg': undefined
- });
- return new LodashWrapper(value, this.__chain__).thru(function(array) {
- if (length && !array.length) {
- array.push(undefined);
- }
- return array;
- });
- });
-
- /**
- * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
- *
- * @name chain
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // A sequence without explicit chaining.
- * _(users).head();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // A sequence with explicit chaining.
- * _(users)
- * .chain()
- * .head()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
-
- /**
- * Executes the chain sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @since 3.2.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
- function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
- }
-
- /**
- * Gets the next value on a wrapped object following the
- * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
- *
- * @name next
- * @memberOf _
- * @since 4.0.0
- * @category Seq
- * @returns {Object} Returns the next iterator value.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 1 }
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 2 }
- *
- * wrapped.next();
- * // => { 'done': true, 'value': undefined }
- */
- function wrapperNext() {
- if (this.__values__ === undefined) {
- this.__values__ = toArray(this.value());
- }
- var done = this.__index__ >= this.__values__.length,
- value = done ? undefined : this.__values__[this.__index__++];
-
- return { 'done': done, 'value': value };
- }
-
- /**
- * Enables the wrapper to be iterable.
- *
- * @name Symbol.iterator
- * @memberOf _
- * @since 4.0.0
- * @category Seq
- * @returns {Object} Returns the wrapper object.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped[Symbol.iterator]() === wrapped;
- * // => true
- *
- * Array.from(wrapped);
- * // => [1, 2]
- */
- function wrapperToIterator() {
- return this;
- }
-
- /**
- * Creates a clone of the chain sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @since 3.2.0
- * @category Seq
- * @param {*} value The value to plant.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2]).map(square);
- * var other = wrapped.plant([3, 4]);
- *
- * other.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
- function wrapperPlant(value) {
- var result,
- parent = this;
-
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- clone.__index__ = 0;
- clone.__values__ = undefined;
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
- }
-
- /**
- * This method is the wrapper version of `_.reverse`.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @since 0.1.0
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function wrapperReverse() {
- var value = this.__wrapped__;
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({
- 'func': thru,
- 'args': [reverse],
- 'thisArg': undefined
- });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(reverse);
- }
-
- /**
- * Executes the chain sequence to resolve the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @since 0.1.0
- * @alias toJSON, valueOf
- * @category Seq
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The corresponding value of
- * each key is the number of times the key was returned by `iteratee`. The
- * iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': 1, '6': 2 }
- *
- * // The `_.property` iteratee shorthand.
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
- var countBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- ++result[key];
- } else {
- baseAssignValue(result, key, 1);
- }
- });
-
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * Iteration is stopped once `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * **Note:** This method returns `true` for
- * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
- * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
- * elements of empty collections.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.every(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, guard) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * **Note:** Unlike `_.remove`, this method returns a new array.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.reject
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, { 'age': 36, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.filter(users, 'active');
- * // => objects for ['barney']
- */
- function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is invoked with three
- * arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.find(users, function(o) { return o.age < 40; });
- * // => object for 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.find(users, { 'age': 1, 'active': true });
- * // => object for 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.find(users, ['active', false]);
- * // => object for 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.find(users, 'active');
- * // => object for 'barney'
- */
- var find = createFind(findIndex);
-
- /**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param {number} [fromIndex=collection.length-1] The index to search from.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
- var findLast = createFind(findLastIndex);
-
- /**
- * Creates a flattened array of values by running each element in `collection`
- * thru `iteratee` and flattening the mapped results. The iteratee is invoked
- * with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [n, n];
- * }
- *
- * _.flatMap([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMap(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), 1);
- }
-
- /**
- * This method is like `_.flatMap` except that it recursively flattens the
- * mapped results.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [[[n, n]]];
- * }
- *
- * _.flatMapDeep([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMapDeep(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), INFINITY);
- }
-
- /**
- * This method is like `_.flatMap` except that it recursively flattens the
- * mapped results up to `depth` times.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {number} [depth=1] The maximum recursion depth.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [[[n, n]]];
- * }
- *
- * _.flatMapDepth([1, 2], duplicate, 2);
- * // => [[1, 1], [2, 2]]
- */
- function flatMapDepth(collection, iteratee, depth) {
- depth = depth === undefined ? 1 : toInteger(depth);
- return baseFlatten(map(collection, iteratee), depth);
- }
-
- /**
- * Iterates over elements of `collection` and invokes `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length"
- * property are iterated like arrays. To avoid this behavior use `_.forIn`
- * or `_.forOwn` for object iteration.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEachRight
- * @example
- *
- * _.forEach([1, 2], function(value) {
- * console.log(value);
- * });
- * // => Logs `1` then `2`.
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
- function forEach(collection, iteratee) {
- var func = isArray(collection) ? arrayEach : baseEach;
- return func(collection, getIteratee(iteratee, 3));
- }
-
- /**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @alias eachRight
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @see _.forEach
- * @example
- *
- * _.forEachRight([1, 2], function(value) {
- * console.log(value);
- * });
- * // => Logs `2` then `1`.
- */
- function forEachRight(collection, iteratee) {
- var func = isArray(collection) ? arrayEachRight : baseEachRight;
- return func(collection, getIteratee(iteratee, 3));
- }
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The order of grouped values
- * is determined by the order they occur in `collection`. The corresponding
- * value of each key is an array of elements responsible for generating the
- * key. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': [4.2], '6': [6.1, 6.3] }
- *
- * // The `_.property` iteratee shorthand.
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- baseAssignValue(result, key, [value]);
- }
- });
-
- /**
- * Checks if `value` is in `collection`. If `collection` is a string, it's
- * checked for a substring of `value`, otherwise
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * is used for equality comparisons. If `fromIndex` is negative, it's used as
- * the offset from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'a': 1, 'b': 2 }, 1);
- * // => true
- *
- * _.includes('abcd', 'bc');
- * // => true
- */
- function includes(collection, value, fromIndex, guard) {
- collection = isArrayLike(collection) ? collection : values(collection);
- fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
-
- var length = collection.length;
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
- return isString(collection)
- ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
- : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
- }
-
- /**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `path` is a function, it's invoked
- * for, and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke each method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invokeMap([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- var invokeMap = baseRest(function(collection, path, args) {
- var index = -1,
- isFunc = typeof path == 'function',
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value) {
- result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
- });
- return result;
- });
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` thru `iteratee`. The corresponding value of
- * each key is the last element responsible for generating the key. The
- * iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var array = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.keyBy(array, function(o) {
- * return String.fromCharCode(o.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.keyBy(array, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- */
- var keyBy = createAggregator(function(result, value, key) {
- baseAssignValue(result, key, value);
- });
-
- /**
- * Creates an array of values by running each element in `collection` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * _.map([4, 8], square);
- * // => [16, 64]
- *
- * _.map({ 'a': 4, 'b': 8 }, square);
- * // => [16, 64] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee) {
- var func = isArray(collection) ? arrayMap : baseMap;
- return func(collection, getIteratee(iteratee, 3));
- }
-
- /**
- * This method is like `_.sortBy` except that it allows specifying the sort
- * orders of the iteratees to sort by. If `orders` is unspecified, all values
- * are sorted in ascending order. Otherwise, specify an order of "desc" for
- * descending or "asc" for ascending sort order of corresponding values.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @param {string[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // Sort by `user` in ascending order and by `age` in descending order.
- * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- */
- function orderBy(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- orders = guard ? undefined : orders;
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseOrderBy(collection, iteratees, orders);
- }
-
- /**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, the second of which
- * contains elements `predicate` returns falsey for. The predicate is
- * invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * _.partition(users, function(o) { return o.active; });
- * // => objects for [['fred'], ['barney', 'pebbles']]
- *
- * // The `_.matches` iteratee shorthand.
- * _.partition(users, { 'age': 1, 'active': false });
- * // => objects for [['pebbles'], ['barney', 'fred']]
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.partition(users, ['active', false]);
- * // => objects for [['barney', 'pebbles'], ['fred']]
- *
- * // The `_.property` iteratee shorthand.
- * _.partition(users, 'active');
- * // => objects for [['fred'], ['barney', 'pebbles']]
- */
- var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function() { return [[], []]; });
-
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` thru `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not given, the first element of `collection` is used as the initial
- * value. The iteratee is invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
- * and `sortBy`
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduceRight
- * @example
- *
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
- * }, 0);
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * return result;
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
- */
- function reduce(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduce : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
- }
-
- /**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @see _.reduce
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
- function reduceRight(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduceRight : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
- }
-
- /**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @see _.filter
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * _.reject(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.reject(users, { 'age': 40, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.reject(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.reject(users, 'active');
- * // => objects for ['barney']
- */
- function reject(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, negate(getIteratee(predicate, 3)));
- }
-
- /**
- * Gets a random element from `collection`.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @returns {*} Returns the random element.
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- */
- function sample(collection) {
- var func = isArray(collection) ? arraySample : baseSample;
- return func(collection);
- }
-
- /**
- * Gets `n` random elements at unique keys from `collection` up to the
- * size of `collection`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @param {number} [n=1] The number of elements to sample.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the random elements.
- * @example
- *
- * _.sampleSize([1, 2, 3], 2);
- * // => [3, 1]
- *
- * _.sampleSize([1, 2, 3], 4);
- * // => [2, 3, 1]
- */
- function sampleSize(collection, n, guard) {
- if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
- n = 1;
- } else {
- n = toInteger(n);
- }
- var func = isArray(collection) ? arraySampleSize : baseSampleSize;
- return func(collection, n);
- }
-
- /**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
- function shuffle(collection) {
- var func = isArray(collection) ? arrayShuffle : baseShuffle;
- return func(collection);
- }
-
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable string keyed properties for objects.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @returns {number} Returns the collection size.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- if (collection == null) {
- return 0;
- }
- if (isArrayLike(collection)) {
- return isString(collection) ? stringSize(collection) : collection.length;
- }
- var tag = getTag(collection);
- if (tag == mapTag || tag == setTag) {
- return collection.size;
- }
- return baseKeys(collection).length;
- }
-
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * Iteration is stopped once `predicate` returns truthy. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.some(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, guard) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection thru each iteratee. This method
- * performs a stable sort, that is, it preserves the original sort order of
- * equal elements. The iteratees are invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.sortBy(users, [function(o) { return o.user; }]);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- *
- * _.sortBy(users, ['user', 'age']);
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- */
- var sortBy = baseRest(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var length = iteratees.length;
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
- iteratees = [];
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
- iteratees = [iteratees[0]];
- }
- return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
- var now = ctxNow || function() {
- return root.Date.now();
- };
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it's called `n` or more times.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => Logs 'done saving!' after the two async saves have completed.
- */
- function after(n, func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
- }
-
- /**
- * Creates a function that invokes `func`, with up to `n` arguments,
- * ignoring any additional arguments.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new capped function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
- function ary(func, n, guard) {
- n = guard ? undefined : n;
- n = (func && n == null) ? func.length : n;
- return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
- }
-
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery(element).on('click', _.before(5, addContactToList));
- * // => Allows adding up to 4 contacts to the list.
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and `partials` prepended to the arguments it receives.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * function greet(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = baseRest(function(func, thisArg, partials) {
- var bitmask = WRAP_BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getHolder(bind));
- bitmask |= WRAP_PARTIAL_FLAG;
- }
- return createWrap(func, bitmask, thisArg, partials, holders);
- });
-
- /**
- * Creates a function that invokes the method at `object[key]` with `partials`
- * prepended to the arguments it receives.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist. See
- * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @since 0.10.0
- * @category Function
- * @param {Object} object The object to invoke the method on.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
- var bindKey = baseRest(function(object, key, partials) {
- var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getHolder(bindKey));
- bitmask |= WRAP_PARTIAL_FLAG;
- }
- return createWrap(key, bitmask, object, partials, holders);
- });
-
- /**
- * Creates a function that accepts arguments of `func` and either invokes
- * `func` returning its result, if at least `arity` number of arguments have
- * been provided, or returns a function that accepts the remaining `func`
- * arguments, and so on. The arity of `func` may be specified if `func.length`
- * is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
- function curry(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curry.placeholder;
- return result;
- }
-
- /**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
- function curryRight(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryRight.placeholder;
- return result;
- }
-
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
-
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
-
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
-
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- timeWaiting = wait - timeSinceLastCall;
-
- return maxing
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
- : timeWaiting;
- }
-
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
-
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
-
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
- }
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
- }
-
- function trailingEdge(time) {
- timerId = undefined;
-
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
- }
- lastArgs = lastThis = undefined;
- return result;
- }
-
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
- }
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
-
- function flush() {
- return timerId === undefined ? result : trailingEdge(now());
- }
-
- function debounced() {
- var time = now(),
- isInvoking = shouldInvoke(time);
-
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
-
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- clearTimeout(timerId);
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
-
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // => Logs 'deferred' after one millisecond.
- */
- var defer = baseRest(function(func, args) {
- return baseDelay(func, 1, args);
- });
-
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => Logs 'later' after one second.
- */
- var delay = baseRest(function(func, wait, args) {
- return baseDelay(func, toNumber(wait) || 0, args);
- });
-
- /**
- * Creates a function that invokes `func` with arguments reversed.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to flip arguments for.
- * @returns {Function} Returns the new flipped function.
- * @example
- *
- * var flipped = _.flip(function() {
- * return _.toArray(arguments);
- * });
- *
- * flipped('a', 'b', 'c', 'd');
- * // => ['d', 'c', 'b', 'a']
- */
- function flip(func) {
- return createWrap(func, WRAP_FLIP_FLAG);
- }
-
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided, it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoized function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
-
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result) || cache;
- return result;
- };
- memoized.cache = new (memoize.Cache || MapCache);
- return memoized;
- }
-
- // Expose `MapCache`.
- memoize.Cache = MapCache;
-
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new negated function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- var args = arguments;
- switch (args.length) {
- case 0: return !predicate.call(this);
- case 1: return !predicate.call(this, args[0]);
- case 2: return !predicate.call(this, args[0], args[1]);
- case 3: return !predicate.call(this, args[0], args[1], args[2]);
- }
- return !predicate.apply(this, args);
- };
- }
-
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first invocation. The `func` is
- * invoked with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // => `createApplication` is invoked once
- */
- function once(func) {
- return before(2, func);
- }
-
- /**
- * Creates a function that invokes `func` with its arguments transformed.
- *
- * @static
- * @since 4.0.0
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Function|Function[])} [transforms=[_.identity]]
- * The argument transforms.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var func = _.overArgs(function(x, y) {
- * return [x, y];
- * }, [square, doubled]);
- *
- * func(9, 3);
- * // => [81, 6]
- *
- * func(10, 5);
- * // => [100, 10]
- */
- var overArgs = castRest(function(func, transforms) {
- transforms = (transforms.length == 1 && isArray(transforms[0]))
- ? arrayMap(transforms[0], baseUnary(getIteratee()))
- : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
-
- var funcsLength = transforms.length;
- return baseRest(function(args) {
- var index = -1,
- length = nativeMin(args.length, funcsLength);
-
- while (++index < length) {
- args[index] = transforms[index].call(this, args[index]);
- }
- return apply(func, this, args);
- });
- });
-
- /**
- * Creates a function that invokes `func` with `partials` prepended to the
- * arguments it receives. This method is like `_.bind` except it does **not**
- * alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @since 0.2.0
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * function greet(greeting, name) {
- * return greeting + ' ' + name;
- * }
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // Partially applied with placeholders.
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
- var partial = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partial));
- return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
- });
-
- /**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to the arguments it receives.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * function greet(greeting, name) {
- * return greeting + ' ' + name;
- * }
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // Partially applied with placeholders.
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
- var partialRight = baseRest(function(func, partials) {
- var holders = replaceHolders(partials, getHolder(partialRight));
- return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
- });
-
- /**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified `indexes` where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, [2, 0, 1]);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- */
- var rearg = flatRest(function(func, indexes) {
- return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
- });
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as
- * an array.
- *
- * **Note:** This method is based on the
- * [rest parameter](https://mdn.io/rest_parameters).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.rest(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
- function rest(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = start === undefined ? start : toInteger(start);
- return baseRest(func, start);
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * create function and an array of arguments much like
- * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
- *
- * **Note:** This method is based on the
- * [spread operator](https://mdn.io/spread_operator).
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @param {number} [start=0] The start position of the spread.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
- function spread(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = start == null ? 0 : nativeMax(toInteger(start), 0);
- return baseRest(function(args) {
- var array = args[start],
- otherArgs = castSlice(args, 0, start);
-
- if (array) {
- arrayPush(otherArgs, array);
- }
- return apply(func, this, otherArgs);
- });
- }
-
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
- }
-
- /**
- * Creates a function that accepts up to one argument, ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- * @example
- *
- * _.map(['6', '8', '10'], _.unary(parseInt));
- * // => [6, 8, 10]
- */
- function unary(func) {
- return ary(func, 1);
- }
-
- /**
- * Creates a function that provides `value` to `wrapper` as its first
- * argument. Any additional arguments provided to the function are appended
- * to those provided to the `wrapper`. The wrapper is invoked with the `this`
- * binding of the created function.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} [wrapper=identity] The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '<p>' + func(text) + '</p>';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => '<p>fred, barney, &amp; pebbles</p>'
- */
- function wrap(value, wrapper) {
- return partial(castFunction(wrapper), value);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Casts `value` as an array if it's not one.
- *
- * @static
- * @memberOf _
- * @since 4.4.0
- * @category Lang
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast array.
- * @example
- *
- * _.castArray(1);
- * // => [1]
- *
- * _.castArray({ 'a': 1 });
- * // => [{ 'a': 1 }]
- *
- * _.castArray('abc');
- * // => ['abc']
- *
- * _.castArray(null);
- * // => [null]
- *
- * _.castArray(undefined);
- * // => [undefined]
- *
- * _.castArray();
- * // => []
- *
- * var array = [1, 2, 3];
- * console.log(_.castArray(array) === array);
- * // => true
- */
- function castArray() {
- if (!arguments.length) {
- return [];
- }
- var value = arguments[0];
- return isArray(value) ? value : [value];
- }
-
- /**
- * Creates a shallow clone of `value`.
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
- * arrays. The own enumerable properties of `arguments` objects are cloned
- * as plain objects. An empty object is returned for uncloneable values such
- * as error objects, functions, DOM nodes, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to clone.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeep
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var shallow = _.clone(objects);
- * console.log(shallow[0] === objects[0]);
- * // => true
- */
- function clone(value) {
- return baseClone(value, CLONE_SYMBOLS_FLAG);
- }
-
- /**
- * This method is like `_.clone` except that it accepts `customizer` which
- * is invoked to produce the cloned value. If `customizer` returns `undefined`,
- * cloning is handled by the method instead. The `customizer` is invoked with
- * up to four arguments; (value [, index|key, object, stack]).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the cloned value.
- * @see _.cloneDeepWith
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * }
- *
- * var el = _.cloneWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 0
- */
- function cloneWith(value, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
- }
-
- /**
- * This method is like `_.clone` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @returns {*} Returns the deep cloned value.
- * @see _.clone
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var deep = _.cloneDeep(objects);
- * console.log(deep[0] === objects[0]);
- * // => false
- */
- function cloneDeep(value) {
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
- }
-
- /**
- * This method is like `_.cloneWith` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the deep cloned value.
- * @see _.cloneWith
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * }
- *
- * var el = _.cloneDeepWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 20
- */
- function cloneDeepWith(value, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
- }
-
- /**
- * Checks if `object` conforms to `source` by invoking the predicate
- * properties of `source` with the corresponding property values of `object`.
- *
- * **Note:** This method is equivalent to `_.conforms` when `source` is
- * partially applied.
- *
- * @static
- * @memberOf _
- * @since 4.14.0
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property predicates to conform to.
- * @returns {boolean} Returns `true` if `object` conforms, else `false`.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- *
- * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
- * // => true
- *
- * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
- * // => false
- */
- function conformsTo(object, source) {
- return source == null || baseConformsTo(object, source, keys(source));
- }
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- /**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`,
- * else `false`.
- * @see _.lt
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
- var gt = createRelationalOperation(baseGt);
-
- /**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to
- * `other`, else `false`.
- * @see _.lte
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
- var gte = createRelationalOperation(function(value, other) {
- return value >= other;
- });
-
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
- !propertyIsEnumerable.call(value, 'callee');
- };
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- /**
- * Checks if `value` is classified as an `ArrayBuffer` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
- * @example
- *
- * _.isArrayBuffer(new ArrayBuffer(2));
- * // => true
- *
- * _.isArrayBuffer(new Array(2));
- * // => false
- */
- var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
-
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
-
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
-
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false ||
- (isObjectLike(value) && baseGetTag(value) == boolTag);
- }
-
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = nativeIsBuffer || stubFalse;
-
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
-
- /**
- * Checks if `value` is likely a DOM element.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('<body>');
- * // => false
- */
- function isElement(value) {
- return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
- }
-
- /**
- * Checks if `value` is an empty object, collection, map, or set.
- *
- * Objects are considered empty if they have no own enumerable string keyed
- * properties.
- *
- * Array-like values such as `arguments` objects, arrays, buffers, strings, or
- * jQuery-like collections are considered empty if they have a `length` of `0`.
- * Similarly, maps and sets are considered empty if they have a `size` of `0`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (value == null) {
- return true;
- }
- if (isArrayLike(value) &&
- (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
- isBuffer(value) || isTypedArray(value) || isArguments(value))) {
- return !value.length;
- }
- var tag = getTag(value);
- if (tag == mapTag || tag == setTag) {
- return !value.size;
- }
- if (isPrototype(value)) {
- return !baseKeys(value).length;
- }
- for (var key in value) {
- if (hasOwnProperty.call(value, key)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are compared by strict equality, i.e. `===`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
-
- /**
- * This method is like `_.isEqual` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
- * are handled by the method instead. The `customizer` is invoked with up to
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, othValue) {
- * if (isGreeting(objValue) && isGreeting(othValue)) {
- * return true;
- * }
- * }
- *
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqualWith(array, other, customizer);
- * // => true
- */
- function isEqualWith(value, other, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
- }
-
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- if (!isObjectLike(value)) {
- return false;
- }
- var tag = baseGetTag(value);
- return tag == errorTag || tag == domExcTag ||
- (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
- }
-
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on
- * [`Number.isFinite`](https://mdn.io/Number/isFinite).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(3);
- * // => true
- *
- * _.isFinite(Number.MIN_VALUE);
- * // => true
- *
- * _.isFinite(Infinity);
- * // => false
- *
- * _.isFinite('3');
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
-
- /**
- * Checks if `value` is an integer.
- *
- * **Note:** This method is based on
- * [`Number.isInteger`](https://mdn.io/Number/isInteger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
- * @example
- *
- * _.isInteger(3);
- * // => true
- *
- * _.isInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isInteger(Infinity);
- * // => false
- *
- * _.isInteger('3');
- * // => false
- */
- function isInteger(value) {
- return typeof value == 'number' && value == toInteger(value);
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
-
- /**
- * Checks if `value` is classified as a `Map` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
- * @example
- *
- * _.isMap(new Map);
- * // => true
- *
- * _.isMap(new WeakMap);
- * // => false
- */
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
-
- /**
- * Performs a partial deep comparison between `object` and `source` to
- * determine if `object` contains equivalent property values.
- *
- * **Note:** This method is equivalent to `_.matches` when `source` is
- * partially applied.
- *
- * Partial comparisons will match empty array and empty object `source`
- * values against any array or object value, respectively. See `_.isEqual`
- * for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- *
- * _.isMatch(object, { 'b': 2 });
- * // => true
- *
- * _.isMatch(object, { 'b': 1 });
- * // => false
- */
- function isMatch(object, source) {
- return object === source || baseIsMatch(object, source, getMatchData(source));
- }
-
- /**
- * This method is like `_.isMatch` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
- * are handled by the method instead. The `customizer` is invoked with five
- * arguments: (objValue, srcValue, index|key, object, source).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, srcValue) {
- * if (isGreeting(objValue) && isGreeting(srcValue)) {
- * return true;
- * }
- * }
- *
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatchWith(object, source, customizer);
- * // => true
- */
- function isMatchWith(object, source, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return baseIsMatch(object, source, getMatchData(source), customizer);
- }
-
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is based on
- * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
- * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
- * `undefined` and other non-number values.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some
- // ActiveX objects in IE.
- return isNumber(value) && value != +value;
- }
-
- /**
- * Checks if `value` is a pristine native function.
- *
- * **Note:** This method can't reliably detect native functions in the presence
- * of the core-js package because core-js circumvents this kind of detection.
- * Despite multiple requests, the core-js maintainer has made it clear: any
- * attempt to fix the detection will be obstructed. As a result, we're left
- * with little choice but to throw an error. Unfortunately, this also affects
- * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
- * which rely on core-js.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (isMaskable(value)) {
- throw new Error(CORE_ERROR_TEXT);
- }
- return baseIsNative(value);
- }
-
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
-
- /**
- * Checks if `value` is `null` or `undefined`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
- * @example
- *
- * _.isNil(null);
- * // => true
- *
- * _.isNil(void 0);
- * // => true
- *
- * _.isNil(NaN);
- * // => false
- */
- function isNil(value) {
- return value == null;
- }
-
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
- * classified as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a number, else `false`.
- * @example
- *
- * _.isNumber(3);
- * // => true
- *
- * _.isNumber(Number.MIN_VALUE);
- * // => true
- *
- * _.isNumber(Infinity);
- * // => true
- *
- * _.isNumber('3');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' ||
- (isObjectLike(value) && baseGetTag(value) == numberTag);
- }
-
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
- return false;
- }
- var proto = getPrototype(value);
- if (proto === null) {
- return true;
- }
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
- funcToString.call(Ctor) == objectCtorString;
- }
-
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
-
- /**
- * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
- * double precision number which isn't the result of a rounded unsafe integer.
- *
- * **Note:** This method is based on
- * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
- * @example
- *
- * _.isSafeInteger(3);
- * // => true
- *
- * _.isSafeInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isSafeInteger(Infinity);
- * // => false
- *
- * _.isSafeInteger('3');
- * // => false
- */
- function isSafeInteger(value) {
- return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is classified as a `Set` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
- * @example
- *
- * _.isSet(new Set);
- * // => true
- *
- * _.isSet(new WeakSet);
- * // => false
- */
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
-
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
- }
-
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
- }
-
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
-
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
-
- /**
- * Checks if `value` is classified as a `WeakMap` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
- * @example
- *
- * _.isWeakMap(new WeakMap);
- * // => true
- *
- * _.isWeakMap(new Map);
- * // => false
- */
- function isWeakMap(value) {
- return isObjectLike(value) && getTag(value) == weakMapTag;
- }
-
- /**
- * Checks if `value` is classified as a `WeakSet` object.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
- * @example
- *
- * _.isWeakSet(new WeakSet);
- * // => true
- *
- * _.isWeakSet(new Set);
- * // => false
- */
- function isWeakSet(value) {
- return isObjectLike(value) && baseGetTag(value) == weakSetTag;
- }
-
- /**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`,
- * else `false`.
- * @see _.gt
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
- var lt = createRelationalOperation(baseLt);
-
- /**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @since 3.9.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to
- * `other`, else `false`.
- * @see _.gte
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
- var lte = createRelationalOperation(function(value, other) {
- return value <= other;
- });
-
- /**
- * Converts `value` to an array.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * _.toArray({ 'a': 1, 'b': 2 });
- * // => [1, 2]
- *
- * _.toArray('abc');
- * // => ['a', 'b', 'c']
- *
- * _.toArray(1);
- * // => []
- *
- * _.toArray(null);
- * // => []
- */
- function toArray(value) {
- if (!value) {
- return [];
- }
- if (isArrayLike(value)) {
- return isString(value) ? stringToArray(value) : copyArray(value);
- }
- if (symIterator && value[symIterator]) {
- return iteratorToArray(value[symIterator]());
- }
- var tag = getTag(value),
- func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
-
- return func(value);
- }
-
- /**
- * Converts `value` to a finite number.
- *
- * @static
- * @memberOf _
- * @since 4.12.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted number.
- * @example
- *
- * _.toFinite(3.2);
- * // => 3.2
- *
- * _.toFinite(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toFinite(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toFinite('3.2');
- * // => 3.2
- */
- function toFinite(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- return value === value ? value : 0;
- }
-
- /**
- * Converts `value` to an integer.
- *
- * **Note:** This method is loosely based on
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toInteger(3.2);
- * // => 3
- *
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toInteger('3.2');
- * // => 3
- */
- function toInteger(value) {
- var result = toFinite(value),
- remainder = result % 1;
-
- return result === result ? (remainder ? result - remainder : result) : 0;
- }
-
- /**
- * Converts `value` to an integer suitable for use as the length of an
- * array-like object.
- *
- * **Note:** This method is based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toLength(3.2);
- * // => 3
- *
- * _.toLength(Number.MIN_VALUE);
- * // => 0
- *
- * _.toLength(Infinity);
- * // => 4294967295
- *
- * _.toLength('3.2');
- * // => 3
- */
- function toLength(value) {
- return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
- }
-
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
- function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
-
- /**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return copyObject(value, keysIn(value));
- }
-
- /**
- * Converts `value` to a safe integer. A safe integer can be compared and
- * represented correctly.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toSafeInteger(3.2);
- * // => 3
- *
- * _.toSafeInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toSafeInteger(Infinity);
- * // => 9007199254740991
- *
- * _.toSafeInteger('3.2');
- * // => 3
- */
- function toSafeInteger(value) {
- return value
- ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
- : (value === 0 ? value : 0);
- }
-
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- return value == null ? '' : baseToString(value);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Assigns own enumerable string keyed properties of source objects to the
- * destination object. Source objects are applied from left to right.
- * Subsequent sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object` and is loosely based on
- * [`Object.assign`](https://mdn.io/Object/assign).
- *
- * @static
- * @memberOf _
- * @since 0.10.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assignIn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * function Bar() {
- * this.c = 3;
- * }
- *
- * Foo.prototype.b = 2;
- * Bar.prototype.d = 4;
- *
- * _.assign({ 'a': 0 }, new Foo, new Bar);
- * // => { 'a': 1, 'c': 3 }
- */
- var assign = createAssigner(function(object, source) {
- if (isPrototype(source) || isArrayLike(source)) {
- copyObject(source, keys(source), object);
- return;
- }
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- assignValue(object, key, source[key]);
- }
- }
- });
-
- /**
- * This method is like `_.assign` except that it iterates over own and
- * inherited source properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.assign
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * function Bar() {
- * this.c = 3;
- * }
- *
- * Foo.prototype.b = 2;
- * Bar.prototype.d = 4;
- *
- * _.assignIn({ 'a': 0 }, new Foo, new Bar);
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
- */
- var assignIn = createAssigner(function(object, source) {
- copyObject(source, keysIn(source), object);
- });
-
- /**
- * This method is like `_.assignIn` except that it accepts `customizer`
- * which is invoked to produce the assigned values. If `customizer` returns
- * `undefined`, assignment is handled by the method instead. The `customizer`
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias extendWith
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @see _.assignWith
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignInWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObject(source, keysIn(source), object, customizer);
- });
-
- /**
- * This method is like `_.assign` except that it accepts `customizer`
- * which is invoked to produce the assigned values. If `customizer` returns
- * `undefined`, assignment is handled by the method instead. The `customizer`
- * is invoked with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @see _.assignInWith
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObject(source, keys(source), object, customizer);
- });
-
- /**
- * Creates an array of values corresponding to `paths` of `object`.
- *
- * @static
- * @memberOf _
- * @since 1.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {...(string|string[])} [paths] The property paths to pick.
- * @returns {Array} Returns the picked values.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _.at(object, ['a[0].b.c', 'a[1]']);
- * // => [3, 4]
- */
- var at = flatRest(baseAt);
-
- /**
- * Creates an object that inherits from the `prototype` object. If a
- * `properties` object is given, its own enumerable string keyed properties
- * are assigned to the created object.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties) {
- var result = baseCreate(prototype);
- return properties == null ? result : baseAssign(result, properties);
- }
-
- /**
- * Assigns own and inherited enumerable string keyed properties of source
- * objects to the destination object for all destination properties that
- * resolve to `undefined`. Source objects are applied from left to right.
- * Once a property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.defaultsDeep
- * @example
- *
- * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var defaults = baseRest(function(object, sources) {
- object = Object(object);
-
- var index = -1;
- var length = sources.length;
- var guard = length > 2 ? sources[2] : undefined;
-
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- length = 1;
- }
-
- while (++index < length) {
- var source = sources[index];
- var props = keysIn(source);
- var propsIndex = -1;
- var propsLength = props.length;
-
- while (++propsIndex < propsLength) {
- var key = props[propsIndex];
- var value = object[key];
-
- if (value === undefined ||
- (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- object[key] = source[key];
- }
- }
- }
-
- return object;
- });
-
- /**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.10.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @see _.defaults
- * @example
- *
- * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
- * // => { 'a': { 'b': 2, 'c': 3 } }
- */
- var defaultsDeep = baseRest(function(args) {
- args.push(undefined, customDefaultsMerge);
- return apply(mergeWith, undefined, args);
- });
-
- /**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category Object
- * @param {Object} object The object to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element,
- * else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(o) { return o.age < 40; });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // The `_.matches` iteratee shorthand.
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findKey(users, 'active');
- * // => 'barney'
- */
- function findKey(object, predicate) {
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
- }
-
- /**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to inspect.
- * @param {Function} [predicate=_.identity] The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element,
- * else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(o) { return o.age < 40; });
- * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
- function findLastKey(object, predicate) {
- return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
- }
-
- /**
- * Iterates over own and inherited enumerable string keyed properties of an
- * object and invokes `iteratee` for each property. The iteratee is invoked
- * with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 0.3.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forInRight
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
- */
- function forIn(object, iteratee) {
- return object == null
- ? object
- : baseFor(object, getIteratee(iteratee, 3), keysIn);
- }
-
- /**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forIn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
- */
- function forInRight(object, iteratee) {
- return object == null
- ? object
- : baseForRight(object, getIteratee(iteratee, 3), keysIn);
- }
-
- /**
- * Iterates over own enumerable string keyed properties of an object and
- * invokes `iteratee` for each property. The iteratee is invoked with three
- * arguments: (value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 0.3.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forOwnRight
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'a' then 'b' (iteration order is not guaranteed).
- */
- function forOwn(object, iteratee) {
- return object && baseForOwn(object, getIteratee(iteratee, 3));
- }
-
- /**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @since 2.0.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @see _.forOwn
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
- */
- function forOwnRight(object, iteratee) {
- return object && baseForOwnRight(object, getIteratee(iteratee, 3));
- }
-
- /**
- * Creates an array of function property names from own enumerable properties
- * of `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the function names.
- * @see _.functionsIn
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functions(new Foo);
- * // => ['a', 'b']
- */
- function functions(object) {
- return object == null ? [] : baseFunctions(object, keys(object));
- }
-
- /**
- * Creates an array of function property names from own and inherited
- * enumerable properties of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the function names.
- * @see _.functions
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functionsIn(new Foo);
- * // => ['a', 'b', 'c']
- */
- function functionsIn(object) {
- return object == null ? [] : baseFunctions(object, keysIn(object));
- }
-
- /**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is returned in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, path);
- return result === undefined ? defaultValue : result;
- }
-
- /**
- * Checks if `path` is a direct property of `object`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': 2 } };
- * var other = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b');
- * // => true
- *
- * _.has(object, ['a', 'b']);
- * // => true
- *
- * _.has(other, 'a');
- * // => false
- */
- function has(object, path) {
- return object != null && hasPath(object, path, baseHas);
- }
-
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b');
- * // => true
- *
- * _.hasIn(object, ['a', 'b']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- function hasIn(object, path) {
- return object != null && hasPath(object, path, baseHasIn);
- }
-
- /**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite
- * property assignments of previous values.
- *
- * @static
- * @memberOf _
- * @since 0.7.0
- * @category Object
- * @param {Object} object The object to invert.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- */
- var invert = createInverter(function(result, value, key) {
- if (value != null &&
- typeof value.toString != 'function') {
- value = nativeObjectToString.call(value);
- }
-
- result[value] = key;
- }, constant(identity));
-
- /**
- * This method is like `_.invert` except that the inverted object is generated
- * from the results of running each element of `object` thru `iteratee`. The
- * corresponding inverted value of each inverted key is an array of keys
- * responsible for generating the inverted value. The iteratee is invoked
- * with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.1.0
- * @category Object
- * @param {Object} object The object to invert.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invertBy(object);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- *
- * _.invertBy(object, function(value) {
- * return 'group' + value;
- * });
- * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
- */
- var invertBy = createInverter(function(result, value, key) {
- if (value != null &&
- typeof value.toString != 'function') {
- value = nativeObjectToString.call(value);
- }
-
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }, getIteratee);
-
- /**
- * Invokes the method at `path` of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
- *
- * _.invoke(object, 'a[0].b.c.slice', 1, 3);
- * // => [2, 3]
- */
- var invoke = baseRest(baseInvoke);
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
-
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
- }
-
- /**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * string keyed property of `object` thru `iteratee`. The iteratee is invoked
- * with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @since 3.8.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @see _.mapValues
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
- function mapKeys(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- baseAssignValue(result, iteratee(value, key, object), value);
- });
- return result;
- }
-
- /**
- * Creates an object with the same keys as `object` and values generated
- * by running each own enumerable string keyed property of `object` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, key, object).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @see _.mapKeys
- * @example
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * _.mapValues(users, function(o) { return o.age; });
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- *
- * // The `_.property` iteratee shorthand.
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
- function mapValues(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- baseAssignValue(result, key, iteratee(value, key, object));
- });
- return result;
- }
-
- /**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
- * };
- *
- * var other = {
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
- * };
- *
- * _.merge(object, other);
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
- */
- var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
- });
-
- /**
- * This method is like `_.merge` except that it accepts `customizer` which
- * is invoked to produce the merged values of the destination and source
- * properties. If `customizer` returns `undefined`, merging is handled by the
- * method instead. The `customizer` is invoked with six arguments:
- * (objValue, srcValue, key, object, source, stack).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * if (_.isArray(objValue)) {
- * return objValue.concat(srcValue);
- * }
- * }
- *
- * var object = { 'a': [1], 'b': [2] };
- * var other = { 'a': [3], 'b': [4] };
- *
- * _.mergeWith(object, other, customizer);
- * // => { 'a': [1, 3], 'b': [2, 4] }
- */
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
- baseMerge(object, source, srcIndex, customizer);
- });
-
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable property paths of `object` that are not omitted.
- *
- * **Note:** This method is considerably slower than `_.pick`.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [paths] The property paths to omit.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- var omit = flatRest(function(object, paths) {
- var result = {};
- if (object == null) {
- return result;
- }
- var isDeep = false;
- paths = arrayMap(paths, function(path) {
- path = castPath(path, object);
- isDeep || (isDeep = path.length > 1);
- return path;
- });
- copyObject(object, getAllKeysIn(object), result);
- if (isDeep) {
- result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
- }
- var length = paths.length;
- while (length--) {
- baseUnset(result, paths[length]);
- }
- return result;
- });
-
- /**
- * The opposite of `_.pickBy`; this method creates an object composed of
- * the own and inherited enumerable string keyed properties of `object` that
- * `predicate` doesn't return truthy for. The predicate is invoked with two
- * arguments: (value, key).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The source object.
- * @param {Function} [predicate=_.identity] The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omitBy(object, _.isNumber);
- * // => { 'b': '2' }
- */
- function omitBy(object, predicate) {
- return pickBy(object, negate(getIteratee(predicate)));
- }
-
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [paths] The property paths to pick.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- var pick = flatRest(function(object, paths) {
- return object == null ? {} : basePick(object, paths);
- });
-
- /**
- * Creates an object composed of the `object` properties `predicate` returns
- * truthy for. The predicate is invoked with two arguments: (value, key).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The source object.
- * @param {Function} [predicate=_.identity] The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pickBy(object, _.isNumber);
- * // => { 'a': 1, 'c': 3 }
- */
- function pickBy(object, predicate) {
- if (object == null) {
- return {};
- }
- var props = arrayMap(getAllKeysIn(object), function(prop) {
- return [prop];
- });
- predicate = getIteratee(predicate);
- return basePickBy(object, props, function(value, path) {
- return predicate(value, path[0]);
- });
- }
-
- /**
- * This method is like `_.get` except that if the resolved value is a
- * function it's invoked with the `this` binding of its parent object and
- * its result is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a[0].b.c3', 'default');
- * // => 'default'
- *
- * _.result(object, 'a[0].b.c3', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- path = castPath(path, object);
-
- var index = -1,
- length = path.length;
-
- // Ensure the loop is entered when path is empty.
- if (!length) {
- length = 1;
- object = undefined;
- }
- while (++index < length) {
- var value = object == null ? undefined : object[toKey(path[index])];
- if (value === undefined) {
- index = length;
- value = defaultValue;
- }
- object = isFunction(value) ? value.call(object) : value;
- }
- return object;
- }
-
- /**
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
- * it's created. Arrays are created for missing index properties while objects
- * are created for all other missing properties. Use `_.setWith` to customize
- * `path` creation.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, ['x', '0', 'y', 'z'], 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value);
- }
-
- /**
- * This method is like `_.set` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {};
- *
- * _.setWith(object, '[0][1]', 'a', Object);
- * // => { '0': { '1': 'a' } }
- */
- function setWith(object, path, value, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return object == null ? object : baseSet(object, path, value, customizer);
- }
-
- /**
- * Creates an array of own enumerable string keyed-value pairs for `object`
- * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
- * entries are returned.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias entries
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairs(new Foo);
- * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
- */
- var toPairs = createToPairs(keys);
-
- /**
- * Creates an array of own and inherited enumerable string keyed-value pairs
- * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
- * or set, its entries are returned.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @alias entriesIn
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairsIn(new Foo);
- * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
- */
- var toPairsIn = createToPairs(keysIn);
-
- /**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own
- * enumerable string keyed properties thru `iteratee`, with each invocation
- * potentially mutating the `accumulator` object. If `accumulator` is not
- * provided, a new object with the same `[[Prototype]]` will be used. The
- * iteratee is invoked with four arguments: (accumulator, value, key, object).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @since 1.3.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * }, []);
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
- function transform(object, iteratee, accumulator) {
- var isArr = isArray(object),
- isArrLike = isArr || isBuffer(object) || isTypedArray(object);
-
- iteratee = getIteratee(iteratee, 4);
- if (accumulator == null) {
- var Ctor = object && object.constructor;
- if (isArrLike) {
- accumulator = isArr ? new Ctor : [];
- }
- else if (isObject(object)) {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
- }
- else {
- accumulator = {};
- }
- }
- (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
- }
-
- /**
- * Removes the property at `path` of `object`.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 7 } }] };
- * _.unset(object, 'a[0].b.c');
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- *
- * _.unset(object, ['a', '0', 'b', 'c']);
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- */
- function unset(object, path) {
- return object == null ? true : baseUnset(object, path);
- }
-
- /**
- * This method is like `_.set` except that accepts `updater` to produce the
- * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
- * is invoked with one argument: (value).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {Function} updater The function to produce the updated value.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.update(object, 'a[0].b.c', function(n) { return n * n; });
- * console.log(object.a[0].b.c);
- * // => 9
- *
- * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
- * console.log(object.x[0].y.z);
- * // => 0
- */
- function update(object, path, updater) {
- return object == null ? object : baseUpdate(object, path, castFunction(updater));
- }
-
- /**
- * This method is like `_.update` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 4.6.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {Function} updater The function to produce the updated value.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {};
- *
- * _.updateWith(object, '[0][1]', _.constant('a'), Object);
- * // => { '0': { '1': 'a' } }
- */
- function updateWith(object, path, updater, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
- }
-
- /**
- * Creates an array of the own enumerable string keyed property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return object == null ? [] : baseValues(object, keys(object));
- }
-
- /**
- * Creates an array of the own and inherited enumerable string keyed property
- * values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
- function valuesIn(object) {
- return object == null ? [] : baseValues(object, keysIn(object));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Clamps `number` within the inclusive `lower` and `upper` bounds.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Number
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- * @example
- *
- * _.clamp(-10, -5, 5);
- * // => -5
- *
- * _.clamp(10, -5, 5);
- * // => 5
- */
- function clamp(number, lower, upper) {
- if (upper === undefined) {
- upper = lower;
- lower = undefined;
- }
- if (upper !== undefined) {
- upper = toNumber(upper);
- upper = upper === upper ? upper : 0;
- }
- if (lower !== undefined) {
- lower = toNumber(lower);
- lower = lower === lower ? lower : 0;
- }
- return baseClamp(toNumber(number), lower, upper);
- }
-
- /**
- * Checks if `n` is between `start` and up to, but not including, `end`. If
- * `end` is not specified, it's set to `start` with `start` then set to `0`.
- * If `start` is greater than `end` the params are swapped to support
- * negative ranges.
- *
- * @static
- * @memberOf _
- * @since 3.3.0
- * @category Number
- * @param {number} number The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- * @see _.range, _.rangeRight
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- *
- * _.inRange(-3, -2, -6);
- * // => true
- */
- function inRange(number, start, end) {
- start = toFinite(start);
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toFinite(end);
- }
- number = toNumber(number);
- return baseInRange(number, start, end);
- }
-
- /**
- * Produces a random number between the inclusive `lower` and `upper` bounds.
- * If only one argument is provided a number between `0` and the given number
- * is returned. If `floating` is `true`, or either `lower` or `upper` are
- * floats, a floating-point number is returned instead of an integer.
- *
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
- * floating-point values which can produce unexpected results.
- *
- * @static
- * @memberOf _
- * @since 0.7.0
- * @category Number
- * @param {number} [lower=0] The lower bound.
- * @param {number} [upper=1] The upper bound.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
- function random(lower, upper, floating) {
- if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
- upper = floating = undefined;
- }
- if (floating === undefined) {
- if (typeof upper == 'boolean') {
- floating = upper;
- upper = undefined;
- }
- else if (typeof lower == 'boolean') {
- floating = lower;
- lower = undefined;
- }
- }
- if (lower === undefined && upper === undefined) {
- lower = 0;
- upper = 1;
- }
- else {
- lower = toFinite(lower);
- if (upper === undefined) {
- upper = lower;
- lower = 0;
- } else {
- upper = toFinite(upper);
- }
- }
- if (lower > upper) {
- var temp = lower;
- lower = upper;
- upper = temp;
- }
- if (floating || lower % 1 || upper % 1) {
- var rand = nativeRandom();
- return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
- }
- return baseRandom(lower, upper);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar--');
- * // => 'fooBar'
- *
- * _.camelCase('__FOO_BAR__');
- * // => 'fooBar'
- */
- var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? capitalize(word) : word);
- });
-
- /**
- * Converts the first character of `string` to upper case and the remaining
- * to lower case.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('FRED');
- * // => 'Fred'
- */
- function capitalize(string) {
- return upperFirst(toString(string).toLowerCase());
- }
-
- /**
- * Deburrs `string` by converting
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
- * letters to basic Latin letters and removing
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
- function deburr(string) {
- string = toString(string);
- return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
- }
-
- /**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search up to.
- * @returns {boolean} Returns `true` if `string` ends with `target`,
- * else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
- function endsWith(string, target, position) {
- string = toString(string);
- target = baseToString(target);
-
- var length = string.length;
- position = position === undefined
- ? length
- : baseClamp(toInteger(position), 0, length);
-
- var end = position;
- position -= target.length;
- return position >= 0 && string.slice(position, end) == target;
- }
-
- /**
- * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
- * corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value. See
- * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * When working with HTML you should always
- * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
- * XSS vectors.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
- */
- function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /**
- * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
- * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https://lodash\.com/\)'
- */
- function escapeRegExp(string) {
- string = toString(string);
- return (string && reHasRegExpChar.test(string))
- ? string.replace(reRegExpChar, '\\$&')
- : string;
- }
-
- /**
- * Converts `string` to
- * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__FOO_BAR__');
- * // => 'foo-bar'
- */
- var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
- });
-
- /**
- * Converts `string`, as space separated words, to lower case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the lower cased string.
- * @example
- *
- * _.lowerCase('--Foo-Bar--');
- * // => 'foo bar'
- *
- * _.lowerCase('fooBar');
- * // => 'foo bar'
- *
- * _.lowerCase('__FOO_BAR__');
- * // => 'foo bar'
- */
- var lowerCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + word.toLowerCase();
- });
-
- /**
- * Converts the first character of `string` to lower case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.lowerFirst('Fred');
- * // => 'fred'
- *
- * _.lowerFirst('FRED');
- * // => 'fRED'
- */
- var lowerFirst = createCaseFirst('toLowerCase');
-
- /**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
- function pad(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- if (!length || strLength >= length) {
- return string;
- }
- var mid = (length - strLength) / 2;
- return (
- createPadding(nativeFloor(mid), chars) +
- string +
- createPadding(nativeCeil(mid), chars)
- );
- }
-
- /**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padEnd('abc', 6);
- * // => 'abc '
- *
- * _.padEnd('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padEnd('abc', 3);
- * // => 'abc'
- */
- function padEnd(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- return (length && strLength < length)
- ? (string + createPadding(length - strLength, chars))
- : string;
- }
-
- /**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padStart('abc', 6);
- * // => ' abc'
- *
- * _.padStart('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padStart('abc', 3);
- * // => 'abc'
- */
- function padStart(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = length ? stringSize(string) : 0;
- return (length && strLength < length)
- ? (createPadding(length - strLength, chars) + string)
- : string;
- }
-
- /**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
- * hexadecimal, in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the
- * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
- *
- * @static
- * @memberOf _
- * @since 1.1.0
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix=10] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
- function parseInt(string, radix, guard) {
- if (guard || radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
- }
-
- /**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=1] The number of times to repeat the string.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
- function repeat(string, n, guard) {
- if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
- n = 1;
- } else {
- n = toInteger(n);
- }
- return baseRepeat(toString(string), n);
- }
-
- /**
- * Replaces matches for `pattern` in `string` with `replacement`.
- *
- * **Note:** This method is based on
- * [`String#replace`](https://mdn.io/String/replace).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to modify.
- * @param {RegExp|string} pattern The pattern to replace.
- * @param {Function|string} replacement The match replacement.
- * @returns {string} Returns the modified string.
- * @example
- *
- * _.replace('Hi Fred', 'Fred', 'Barney');
- * // => 'Hi Barney'
- */
- function replace() {
- var args = arguments,
- string = toString(args[0]);
-
- return args.length < 3 ? string : string.replace(args[1], args[2]);
- }
-
- /**
- * Converts `string` to
- * [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--FOO-BAR--');
- * // => 'foo_bar'
- */
- var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
- });
-
- /**
- * Splits `string` by `separator`.
- *
- * **Note:** This method is based on
- * [`String#split`](https://mdn.io/String/split).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to split.
- * @param {RegExp|string} separator The separator pattern to split by.
- * @param {number} [limit] The length to truncate results to.
- * @returns {Array} Returns the string segments.
- * @example
- *
- * _.split('a-b-c', '-', 2);
- * // => ['a', 'b']
- */
- function split(string, separator, limit) {
- if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
- separator = limit = undefined;
- }
- limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
- if (!limit) {
- return [];
- }
- string = toString(string);
- if (string && (
- typeof separator == 'string' ||
- (separator != null && !isRegExp(separator))
- )) {
- separator = baseToString(separator);
- if (!separator && hasUnicode(string)) {
- return castSlice(stringToArray(string), 0, limit);
- }
- }
- return string.split(separator, limit);
- }
-
- /**
- * Converts `string` to
- * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @since 3.1.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar--');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__FOO_BAR__');
- * // => 'FOO BAR'
- */
- var startCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + upperFirst(word);
- });
-
- /**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`,
- * else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
- function startsWith(string, target, position) {
- string = toString(string);
- position = position == null
- ? 0
- : baseClamp(toInteger(position), 0, string.length);
-
- target = baseToString(target);
- return string.slice(position, position + target.length) == target;
- }
-
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is given, it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options={}] The options object.
- * @param {RegExp} [options.escape=_.templateSettings.escape]
- * The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
- * The "evaluate" delimiter.
- * @param {Object} [options.imports=_.templateSettings.imports]
- * An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
- * The "interpolate" delimiter.
- * @param {string} [options.sourceURL='lodash.templateSources[n]']
- * The sourceURL of the compiled template.
- * @param {string} [options.variable='obj']
- * The data object variable name.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // Use the "interpolate" delimiter to create a compiled template.
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // Use the HTML "escape" delimiter to escape data property values.
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the internal `print` function in "evaluate" delimiters.
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // Use the ES template literal delimiter as an "interpolate" delimiter.
- * // Disable support by replacing the "interpolate" delimiter.
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // Use backslashes to treat delimiters as plain text.
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // Use the `imports` option to import `jQuery` as `jq`.
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the `sourceURL` option to specify a custom sourceURL for the template.
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
- *
- * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // Use custom template delimiters.
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // Use the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and stack traces.
- * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
- function template(string, options, guard) {
- // Based on John Resig's `tmpl` implementation
- // (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = lodash.templateSettings;
-
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- string = toString(string);
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
-
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- // The sourceURL gets injected into the source that's eval-ed, so be careful
- // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
- // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
- var sourceURL = '//# sourceURL=' +
- (hasOwnProperty.call(options, 'sourceURL')
- ? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
- : ('lodash.templateSources[' + (++templateCounter) + ']')
- ) + '\n';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products needs `match` returned in
- // order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- // Like with sourceURL, we take care to not check the option's prototype,
- // as this configuration is a code injection vector.
- var variable = hasOwnProperty.call(options, 'variable') && options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source)
- .apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
- }
-
- /**
- * Converts `string`, as a whole, to lower case just like
- * [String#toLowerCase](https://mdn.io/toLowerCase).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the lower cased string.
- * @example
- *
- * _.toLower('--Foo-Bar--');
- * // => '--foo-bar--'
- *
- * _.toLower('fooBar');
- * // => 'foobar'
- *
- * _.toLower('__FOO_BAR__');
- * // => '__foo_bar__'
- */
- function toLower(value) {
- return toString(value).toLowerCase();
- }
-
- /**
- * Converts `string`, as a whole, to upper case just like
- * [String#toUpperCase](https://mdn.io/toUpperCase).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the upper cased string.
- * @example
- *
- * _.toUpper('--foo-bar--');
- * // => '--FOO-BAR--'
- *
- * _.toUpper('fooBar');
- * // => 'FOOBAR'
- *
- * _.toUpper('__foo_bar__');
- * // => '__FOO_BAR__'
- */
- function toUpper(value) {
- return toString(value).toUpperCase();
- }
-
- /**
- * Removes leading and trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trim(' abc ');
- * // => 'abc'
- *
- * _.trim('-_-abc-_-', '_-');
- * // => 'abc'
- *
- * _.map([' foo ', ' bar '], _.trim);
- * // => ['foo', 'bar']
- */
- function trim(string, chars, guard) {
- string = toString(string);
- if (string && (guard || chars === undefined)) {
- return string.replace(reTrim, '');
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string),
- chrSymbols = stringToArray(chars),
- start = charsStartIndex(strSymbols, chrSymbols),
- end = charsEndIndex(strSymbols, chrSymbols) + 1;
-
- return castSlice(strSymbols, start, end).join('');
- }
-
- /**
- * Removes trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimEnd(' abc ');
- * // => ' abc'
- *
- * _.trimEnd('-_-abc-_-', '_-');
- * // => '-_-abc'
- */
- function trimEnd(string, chars, guard) {
- string = toString(string);
- if (string && (guard || chars === undefined)) {
- return string.replace(reTrimEnd, '');
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string),
- end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
-
- return castSlice(strSymbols, 0, end).join('');
- }
-
- /**
- * Removes leading whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimStart(' abc ');
- * // => 'abc '
- *
- * _.trimStart('-_-abc-_-', '_-');
- * // => 'abc-_-'
- */
- function trimStart(string, chars, guard) {
- string = toString(string);
- if (string && (guard || chars === undefined)) {
- return string.replace(reTrimStart, '');
- }
- if (!string || !(chars = baseToString(chars))) {
- return string;
- }
- var strSymbols = stringToArray(string),
- start = charsStartIndex(strSymbols, stringToArray(chars));
-
- return castSlice(strSymbols, start).join('');
- }
-
- /**
- * Truncates `string` if it's longer than the given maximum string length.
- * The last characters of the truncated string are replaced with the omission
- * string which defaults to "...".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to truncate.
- * @param {Object} [options={}] The options object.
- * @param {number} [options.length=30] The maximum string length.
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
- * @returns {string} Returns the truncated string.
- * @example
- *
- * _.truncate('hi-diddly-ho there, neighborino');
- * // => 'hi-diddly-ho there, neighbo...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': ' '
- * });
- * // => 'hi-diddly-ho there,...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': /,? +/
- * });
- * // => 'hi-diddly-ho there...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'omission': ' [...]'
- * });
- * // => 'hi-diddly-ho there, neig [...]'
- */
- function truncate(string, options) {
- var length = DEFAULT_TRUNC_LENGTH,
- omission = DEFAULT_TRUNC_OMISSION;
-
- if (isObject(options)) {
- var separator = 'separator' in options ? options.separator : separator;
- length = 'length' in options ? toInteger(options.length) : length;
- omission = 'omission' in options ? baseToString(options.omission) : omission;
- }
- string = toString(string);
-
- var strLength = string.length;
- if (hasUnicode(string)) {
- var strSymbols = stringToArray(string);
- strLength = strSymbols.length;
- }
- if (length >= strLength) {
- return string;
- }
- var end = length - stringSize(omission);
- if (end < 1) {
- return omission;
- }
- var result = strSymbols
- ? castSlice(strSymbols, 0, end).join('')
- : string.slice(0, end);
-
- if (separator === undefined) {
- return result + omission;
- }
- if (strSymbols) {
- end += (result.length - end);
- }
- if (isRegExp(separator)) {
- if (string.slice(end).search(separator)) {
- var match,
- substring = result;
-
- if (!separator.global) {
- separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
- }
- separator.lastIndex = 0;
- while ((match = separator.exec(substring))) {
- var newEnd = match.index;
- }
- result = result.slice(0, newEnd === undefined ? end : newEnd);
- }
- } else if (string.indexOf(baseToString(separator), end) != end) {
- var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
- }
- return result + omission;
- }
-
- /**
- * The inverse of `_.escape`; this method converts the HTML entities
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
- * their corresponding characters.
- *
- * **Note:** No other HTML entities are unescaped. To unescape additional
- * HTML entities use a third-party library like [_he_](https://mths.be/he).
- *
- * @static
- * @memberOf _
- * @since 0.6.0
- * @category String
- * @param {string} [string=''] The string to unescape.
- * @returns {string} Returns the unescaped string.
- * @example
- *
- * _.unescape('fred, barney, &amp; pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function unescape(string) {
- string = toString(string);
- return (string && reHasEscapedHtml.test(string))
- ? string.replace(reEscapedHtml, unescapeHtmlChar)
- : string;
- }
-
- /**
- * Converts `string`, as space separated words, to upper case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the upper cased string.
- * @example
- *
- * _.upperCase('--foo-bar');
- * // => 'FOO BAR'
- *
- * _.upperCase('fooBar');
- * // => 'FOO BAR'
- *
- * _.upperCase('__foo_bar__');
- * // => 'FOO BAR'
- */
- var upperCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + word.toUpperCase();
- });
-
- /**
- * Converts the first character of `string` to upper case.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.upperFirst('fred');
- * // => 'Fred'
- *
- * _.upperFirst('FRED');
- * // => 'FRED'
- */
- var upperFirst = createCaseFirst('toUpperCase');
-
- /**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
- function words(string, pattern, guard) {
- string = toString(string);
- pattern = guard ? undefined : pattern;
-
- if (pattern === undefined) {
- return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
- }
- return string.match(pattern) || [];
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {Function} func The function to attempt.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // Avoid throwing errors for invalid selectors.
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
- var attempt = baseRest(function(func, args) {
- try {
- return apply(func, undefined, args);
- } catch (e) {
- return isError(e) ? e : new Error(e);
- }
- });
-
- /**
- * Binds methods of an object to the object itself, overwriting the existing
- * method.
- *
- * **Note:** This method doesn't set the "length" property of bound functions.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {...(string|string[])} methodNames The object method names to bind.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var view = {
- * 'label': 'docs',
- * 'click': function() {
- * console.log('clicked ' + this.label);
- * }
- * };
- *
- * _.bindAll(view, ['click']);
- * jQuery(element).on('click', view.click);
- * // => Logs 'clicked docs' when clicked.
- */
- var bindAll = flatRest(function(object, methodNames) {
- arrayEach(methodNames, function(key) {
- key = toKey(key);
- baseAssignValue(object, key, bind(object[key], object));
- });
- return object;
- });
-
- /**
- * Creates a function that iterates over `pairs` and invokes the corresponding
- * function of the first predicate to return truthy. The predicate-function
- * pairs are invoked with the `this` binding and arguments of the created
- * function.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {Array} pairs The predicate-function pairs.
- * @returns {Function} Returns the new composite function.
- * @example
- *
- * var func = _.cond([
- * [_.matches({ 'a': 1 }), _.constant('matches A')],
- * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
- * [_.stubTrue, _.constant('no match')]
- * ]);
- *
- * func({ 'a': 1, 'b': 2 });
- * // => 'matches A'
- *
- * func({ 'a': 0, 'b': 1 });
- * // => 'matches B'
- *
- * func({ 'a': '1', 'b': '2' });
- * // => 'no match'
- */
- function cond(pairs) {
- var length = pairs == null ? 0 : pairs.length,
- toIteratee = getIteratee();
-
- pairs = !length ? [] : arrayMap(pairs, function(pair) {
- if (typeof pair[1] != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return [toIteratee(pair[0]), pair[1]];
- });
-
- return baseRest(function(args) {
- var index = -1;
- while (++index < length) {
- var pair = pairs[index];
- if (apply(pair[0], this, args)) {
- return apply(pair[1], this, args);
- }
- }
- });
- }
-
- /**
- * Creates a function that invokes the predicate properties of `source` with
- * the corresponding property values of a given object, returning `true` if
- * all predicates return truthy, else `false`.
- *
- * **Note:** The created function is equivalent to `_.conformsTo` with
- * `source` partially applied.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {Object} source The object of property predicates to conform to.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 2, 'b': 1 },
- * { 'a': 1, 'b': 2 }
- * ];
- *
- * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
- * // => [{ 'a': 1, 'b': 2 }]
- */
- function conforms(source) {
- return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
- }
-
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new constant function.
- * @example
- *
- * var objects = _.times(2, _.constant({ 'a': 1 }));
- *
- * console.log(objects);
- * // => [{ 'a': 1 }, { 'a': 1 }]
- *
- * console.log(objects[0] === objects[1]);
- * // => true
- */
- function constant(value) {
- return function() {
- return value;
- };
- }
-
- /**
- * Checks `value` to determine whether a default value should be returned in
- * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
- * or `undefined`.
- *
- * @static
- * @memberOf _
- * @since 4.14.0
- * @category Util
- * @param {*} value The value to check.
- * @param {*} defaultValue The default value.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * _.defaultTo(1, 10);
- * // => 1
- *
- * _.defaultTo(undefined, 10);
- * // => 10
- */
- function defaultTo(value, defaultValue) {
- return (value == null || value !== value) ? defaultValue : value;
- }
-
- /**
- * Creates a function that returns the result of invoking the given functions
- * with the `this` binding of the created function, where each successive
- * invocation is supplied the return value of the previous.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {...(Function|Function[])} [funcs] The functions to invoke.
- * @returns {Function} Returns the new composite function.
- * @see _.flowRight
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flow([_.add, square]);
- * addSquare(1, 2);
- * // => 9
- */
- var flow = createFlow();
-
- /**
- * This method is like `_.flow` except that it creates a function that
- * invokes the given functions from right to left.
- *
- * @static
- * @since 3.0.0
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} [funcs] The functions to invoke.
- * @returns {Function} Returns the new composite function.
- * @see _.flow
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flowRight([square, _.add]);
- * addSquare(1, 2);
- * // => 9
- */
- var flowRight = createFlow(true);
-
- /**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
- function identity(value) {
- return value;
- }
-
- /**
- * Creates a function that invokes `func` with the arguments of the created
- * function. If `func` is a property name, the created function returns the
- * property value for a given element. If `func` is an array or object, the
- * created function returns `true` for elements that contain the equivalent
- * source properties, otherwise it returns `false`.
- *
- * @static
- * @since 4.0.0
- * @memberOf _
- * @category Util
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
- * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, _.iteratee(['user', 'fred']));
- * // => [{ 'user': 'fred', 'age': 40 }]
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, _.iteratee('user'));
- * // => ['barney', 'fred']
- *
- * // Create custom iteratee shorthands.
- * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
- * return !_.isRegExp(func) ? iteratee(func) : function(string) {
- * return func.test(string);
- * };
- * });
- *
- * _.filter(['abc', 'def'], /ef/);
- * // => ['def']
- */
- function iteratee(func) {
- return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
- }
-
- /**
- * Creates a function that performs a partial deep comparison between a given
- * object and `source`, returning `true` if the given object has equivalent
- * property values, else `false`.
- *
- * **Note:** The created function is equivalent to `_.isMatch` with `source`
- * partially applied.
- *
- * Partial comparisons will match empty array and empty object `source`
- * values against any array or object value, respectively. See `_.isEqual`
- * for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 1, 'b': 2, 'c': 3 },
- * { 'a': 4, 'b': 5, 'c': 6 }
- * ];
- *
- * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
- * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
- */
- function matches(source) {
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
- }
-
- /**
- * Creates a function that performs a partial deep comparison between the
- * value at `path` of a given object to `srcValue`, returning `true` if the
- * object value is equivalent, else `false`.
- *
- * **Note:** Partial comparisons will match empty array and empty object
- * `srcValue` values against any array or object value, respectively. See
- * `_.isEqual` for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 1, 'b': 2, 'c': 3 },
- * { 'a': 4, 'b': 5, 'c': 6 }
- * ];
- *
- * _.find(objects, _.matchesProperty('a', 4));
- * // => { 'a': 4, 'b': 5, 'c': 6 }
- */
- function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
- }
-
- /**
- * Creates a function that invokes the method at `path` of a given object.
- * Any additional arguments are provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Util
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new invoker function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': _.constant(2) } },
- * { 'a': { 'b': _.constant(1) } }
- * ];
- *
- * _.map(objects, _.method('a.b'));
- * // => [2, 1]
- *
- * _.map(objects, _.method(['a', 'b']));
- * // => [2, 1]
- */
- var method = baseRest(function(path, args) {
- return function(object) {
- return baseInvoke(object, path, args);
- };
- });
-
- /**
- * The opposite of `_.method`; this method creates a function that invokes
- * the method at a given path of `object`. Any additional arguments are
- * provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Util
- * @param {Object} object The object to query.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new invoker function.
- * @example
- *
- * var array = _.times(3, _.constant),
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
- * // => [2, 0]
- */
- var methodOf = baseRest(function(object, args) {
- return function(path) {
- return baseInvoke(object, path, args);
- };
- });
-
- /**
- * Adds all own enumerable string keyed function properties of a source
- * object to the destination object. If `object` is a function, then methods
- * are added to its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
- function mixin(object, source, options) {
- var props = keys(source),
- methodNames = baseFunctions(source, props);
-
- if (options == null &&
- !(isObject(source) && (methodNames.length || !props.length))) {
- options = source;
- source = object;
- object = this;
- methodNames = baseFunctions(source, keys(source));
- }
- var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
- isFunc = isFunction(object);
-
- arrayEach(methodNames, function(methodName) {
- var func = source[methodName];
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__),
- actions = result.__actions__ = copyArray(this.__actions__);
-
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }
- });
-
- return object;
- }
-
- /**
- * Reverts the `_` variable to its previous value and returns a reference to
- * the `lodash` function.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @returns {Function} Returns the `lodash` function.
- * @example
- *
- * var lodash = _.noConflict();
- */
- function noConflict() {
- if (root._ === this) {
- root._ = oldDash;
- }
- return this;
- }
-
- /**
- * This method returns `undefined`.
- *
- * @static
- * @memberOf _
- * @since 2.3.0
- * @category Util
- * @example
- *
- * _.times(2, _.noop);
- * // => [undefined, undefined]
- */
- function noop() {
- // No operation performed.
- }
-
- /**
- * Creates a function that gets the argument at index `n`. If `n` is negative,
- * the nth argument from the end is returned.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {number} [n=0] The index of the argument to return.
- * @returns {Function} Returns the new pass-thru function.
- * @example
- *
- * var func = _.nthArg(1);
- * func('a', 'b', 'c', 'd');
- * // => 'b'
- *
- * var func = _.nthArg(-2);
- * func('a', 'b', 'c', 'd');
- * // => 'c'
- */
- function nthArg(n) {
- n = toInteger(n);
- return baseRest(function(args) {
- return baseNth(args, n);
- });
- }
-
- /**
- * Creates a function that invokes `iteratees` with the arguments it receives
- * and returns their results.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
- * The iteratees to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.over([Math.max, Math.min]);
- *
- * func(1, 2, 3, 4);
- * // => [4, 1]
- */
- var over = createOver(arrayMap);
-
- /**
- * Creates a function that checks if **all** of the `predicates` return
- * truthy when invoked with the arguments it receives.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {...(Function|Function[])} [predicates=[_.identity]]
- * The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overEvery([Boolean, isFinite]);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => false
- *
- * func(NaN);
- * // => false
- */
- var overEvery = createOver(arrayEvery);
-
- /**
- * Creates a function that checks if **any** of the `predicates` return
- * truthy when invoked with the arguments it receives.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {...(Function|Function[])} [predicates=[_.identity]]
- * The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overSome([Boolean, isFinite]);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => true
- *
- * func(NaN);
- * // => false
- */
- var overSome = createOver(arraySome);
-
- /**
- * Creates a function that returns the value at `path` of a given object.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': 2 } },
- * { 'a': { 'b': 1 } }
- * ];
- *
- * _.map(objects, _.property('a.b'));
- * // => [2, 1]
- *
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
- }
-
- /**
- * The opposite of `_.property`; this method creates a function that returns
- * the value at a given path of `object`.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new accessor function.
- * @example
- *
- * var array = [0, 1, 2],
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
- * // => [2, 0]
- */
- function propertyOf(object) {
- return function(path) {
- return object == null ? undefined : baseGet(object, path);
- };
- }
-
- /**
- * Creates an array of numbers (positive and/or negative) progressing from
- * `start` up to, but not including, `end`. A step of `-1` is used if a negative
- * `start` is specified without an `end` or `step`. If `end` is not specified,
- * it's set to `start` with `start` then set to `0`.
- *
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
- * floating-point values which can produce unexpected results.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the range of numbers.
- * @see _.inRange, _.rangeRight
- * @example
- *
- * _.range(4);
- * // => [0, 1, 2, 3]
- *
- * _.range(-4);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 5);
- * // => [1, 2, 3, 4]
- *
- * _.range(0, 20, 5);
- * // => [0, 5, 10, 15]
- *
- * _.range(0, -4, -1);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.range(0);
- * // => []
- */
- var range = createRange();
-
- /**
- * This method is like `_.range` except that it populates values in
- * descending order.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the range of numbers.
- * @see _.inRange, _.range
- * @example
- *
- * _.rangeRight(4);
- * // => [3, 2, 1, 0]
- *
- * _.rangeRight(-4);
- * // => [-3, -2, -1, 0]
- *
- * _.rangeRight(1, 5);
- * // => [4, 3, 2, 1]
- *
- * _.rangeRight(0, 20, 5);
- * // => [15, 10, 5, 0]
- *
- * _.rangeRight(0, -4, -1);
- * // => [-3, -2, -1, 0]
- *
- * _.rangeRight(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.rangeRight(0);
- * // => []
- */
- var rangeRight = createRange(true);
-
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
- }
-
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
-
- /**
- * This method returns a new empty object.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Object} Returns the new empty object.
- * @example
- *
- * var objects = _.times(2, _.stubObject);
- *
- * console.log(objects);
- * // => [{}, {}]
- *
- * console.log(objects[0] === objects[1]);
- * // => false
- */
- function stubObject() {
- return {};
- }
-
- /**
- * This method returns an empty string.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {string} Returns the empty string.
- * @example
- *
- * _.times(2, _.stubString);
- * // => ['', '']
- */
- function stubString() {
- return '';
- }
-
- /**
- * This method returns `true`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `true`.
- * @example
- *
- * _.times(2, _.stubTrue);
- * // => [true, true]
- */
- function stubTrue() {
- return true;
- }
-
- /**
- * Invokes the iteratee `n` times, returning an array of the results of
- * each invocation. The iteratee is invoked with one argument; (index).
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.times(3, String);
- * // => ['0', '1', '2']
- *
- * _.times(4, _.constant(0));
- * // => [0, 0, 0, 0]
- */
- function times(n, iteratee) {
- n = toInteger(n);
- if (n < 1 || n > MAX_SAFE_INTEGER) {
- return [];
- }
- var index = MAX_ARRAY_LENGTH,
- length = nativeMin(n, MAX_ARRAY_LENGTH);
-
- iteratee = getIteratee(iteratee);
- n -= MAX_ARRAY_LENGTH;
-
- var result = baseTimes(length, iteratee);
- while (++index < n) {
- iteratee(index);
- }
- return result;
- }
-
- /**
- * Converts `value` to a property path array.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {*} value The value to convert.
- * @returns {Array} Returns the new property path array.
- * @example
- *
- * _.toPath('a.b.c');
- * // => ['a', 'b', 'c']
- *
- * _.toPath('a[0].b.c');
- * // => ['a', '0', 'b', 'c']
- */
- function toPath(value) {
- if (isArray(value)) {
- return arrayMap(value, toKey);
- }
- return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
- }
-
- /**
- * Generates a unique ID. If `prefix` is given, the ID is appended to it.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {string} [prefix=''] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return toString(prefix) + id;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Adds two numbers.
- *
- * @static
- * @memberOf _
- * @since 3.4.0
- * @category Math
- * @param {number} augend The first number in an addition.
- * @param {number} addend The second number in an addition.
- * @returns {number} Returns the total.
- * @example
- *
- * _.add(6, 4);
- * // => 10
- */
- var add = createMathOperation(function(augend, addend) {
- return augend + addend;
- }, 0);
-
- /**
- * Computes `number` rounded up to `precision`.
- *
- * @static
- * @memberOf _
- * @since 3.10.0
- * @category Math
- * @param {number} number The number to round up.
- * @param {number} [precision=0] The precision to round up to.
- * @returns {number} Returns the rounded up number.
- * @example
- *
- * _.ceil(4.006);
- * // => 5
- *
- * _.ceil(6.004, 2);
- * // => 6.01
- *
- * _.ceil(6040, -2);
- * // => 6100
- */
- var ceil = createRound('ceil');
-
- /**
- * Divide two numbers.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Math
- * @param {number} dividend The first number in a division.
- * @param {number} divisor The second number in a division.
- * @returns {number} Returns the quotient.
- * @example
- *
- * _.divide(6, 4);
- * // => 1.5
- */
- var divide = createMathOperation(function(dividend, divisor) {
- return dividend / divisor;
- }, 1);
-
- /**
- * Computes `number` rounded down to `precision`.
- *
- * @static
- * @memberOf _
- * @since 3.10.0
- * @category Math
- * @param {number} number The number to round down.
- * @param {number} [precision=0] The precision to round down to.
- * @returns {number} Returns the rounded down number.
- * @example
- *
- * _.floor(4.006);
- * // => 4
- *
- * _.floor(0.046, 2);
- * // => 0.04
- *
- * _.floor(4060, -2);
- * // => 4000
- */
- var floor = createRound('floor');
-
- /**
- * Computes the maximum value of `array`. If `array` is empty or falsey,
- * `undefined` is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => undefined
- */
- function max(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, baseGt)
- : undefined;
- }
-
- /**
- * This method is like `_.max` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * the value is ranked. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
- *
- * _.maxBy(objects, function(o) { return o.n; });
- * // => { 'n': 2 }
- *
- * // The `_.property` iteratee shorthand.
- * _.maxBy(objects, 'n');
- * // => { 'n': 2 }
- */
- function maxBy(array, iteratee) {
- return (array && array.length)
- ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
- : undefined;
- }
-
- /**
- * Computes the mean of the values in `array`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {number} Returns the mean.
- * @example
- *
- * _.mean([4, 2, 8, 6]);
- * // => 5
- */
- function mean(array) {
- return baseMean(array, identity);
- }
-
- /**
- * This method is like `_.mean` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the value to be averaged.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the mean.
- * @example
- *
- * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
- *
- * _.meanBy(objects, function(o) { return o.n; });
- * // => 5
- *
- * // The `_.property` iteratee shorthand.
- * _.meanBy(objects, 'n');
- * // => 5
- */
- function meanBy(array, iteratee) {
- return baseMean(array, getIteratee(iteratee, 2));
- }
-
- /**
- * Computes the minimum value of `array`. If `array` is empty or falsey,
- * `undefined` is returned.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => undefined
- */
- function min(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, baseLt)
- : undefined;
- }
-
- /**
- * This method is like `_.min` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * the value is ranked. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
- *
- * _.minBy(objects, function(o) { return o.n; });
- * // => { 'n': 1 }
- *
- * // The `_.property` iteratee shorthand.
- * _.minBy(objects, 'n');
- * // => { 'n': 1 }
- */
- function minBy(array, iteratee) {
- return (array && array.length)
- ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
- : undefined;
- }
-
- /**
- * Multiply two numbers.
- *
- * @static
- * @memberOf _
- * @since 4.7.0
- * @category Math
- * @param {number} multiplier The first number in a multiplication.
- * @param {number} multiplicand The second number in a multiplication.
- * @returns {number} Returns the product.
- * @example
- *
- * _.multiply(6, 4);
- * // => 24
- */
- var multiply = createMathOperation(function(multiplier, multiplicand) {
- return multiplier * multiplicand;
- }, 1);
-
- /**
- * Computes `number` rounded to `precision`.
- *
- * @static
- * @memberOf _
- * @since 3.10.0
- * @category Math
- * @param {number} number The number to round.
- * @param {number} [precision=0] The precision to round to.
- * @returns {number} Returns the rounded number.
- * @example
- *
- * _.round(4.006);
- * // => 4
- *
- * _.round(4.006, 2);
- * // => 4.01
- *
- * _.round(4060, -2);
- * // => 4100
- */
- var round = createRound('round');
-
- /**
- * Subtract two numbers.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Math
- * @param {number} minuend The first number in a subtraction.
- * @param {number} subtrahend The second number in a subtraction.
- * @returns {number} Returns the difference.
- * @example
- *
- * _.subtract(6, 4);
- * // => 2
- */
- var subtract = createMathOperation(function(minuend, subtrahend) {
- return minuend - subtrahend;
- }, 0);
-
- /**
- * Computes the sum of the values in `array`.
- *
- * @static
- * @memberOf _
- * @since 3.4.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.sum([4, 2, 8, 6]);
- * // => 20
- */
- function sum(array) {
- return (array && array.length)
- ? baseSum(array, identity)
- : 0;
- }
-
- /**
- * This method is like `_.sum` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the value to be summed.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the sum.
- * @example
- *
- * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
- *
- * _.sumBy(objects, function(o) { return o.n; });
- * // => 20
- *
- * // The `_.property` iteratee shorthand.
- * _.sumBy(objects, 'n');
- * // => 20
- */
- function sumBy(array, iteratee) {
- return (array && array.length)
- ? baseSum(array, getIteratee(iteratee, 2))
- : 0;
- }
-
- /*------------------------------------------------------------------------*/
-
- // Add methods that return wrapped values in chain sequences.
- lodash.after = after;
- lodash.ary = ary;
- lodash.assign = assign;
- lodash.assignIn = assignIn;
- lodash.assignInWith = assignInWith;
- lodash.assignWith = assignWith;
- lodash.at = at;
- lodash.before = before;
- lodash.bind = bind;
- lodash.bindAll = bindAll;
- lodash.bindKey = bindKey;
- lodash.castArray = castArray;
- lodash.chain = chain;
- lodash.chunk = chunk;
- lodash.compact = compact;
- lodash.concat = concat;
- lodash.cond = cond;
- lodash.conforms = conforms;
- lodash.constant = constant;
- lodash.countBy = countBy;
- lodash.create = create;
- lodash.curry = curry;
- lodash.curryRight = curryRight;
- lodash.debounce = debounce;
- lodash.defaults = defaults;
- lodash.defaultsDeep = defaultsDeep;
- lodash.defer = defer;
- lodash.delay = delay;
- lodash.difference = difference;
- lodash.differenceBy = differenceBy;
- lodash.differenceWith = differenceWith;
- lodash.drop = drop;
- lodash.dropRight = dropRight;
- lodash.dropRightWhile = dropRightWhile;
- lodash.dropWhile = dropWhile;
- lodash.fill = fill;
- lodash.filter = filter;
- lodash.flatMap = flatMap;
- lodash.flatMapDeep = flatMapDeep;
- lodash.flatMapDepth = flatMapDepth;
- lodash.flatten = flatten;
- lodash.flattenDeep = flattenDeep;
- lodash.flattenDepth = flattenDepth;
- lodash.flip = flip;
- lodash.flow = flow;
- lodash.flowRight = flowRight;
- lodash.fromPairs = fromPairs;
- lodash.functions = functions;
- lodash.functionsIn = functionsIn;
- lodash.groupBy = groupBy;
- lodash.initial = initial;
- lodash.intersection = intersection;
- lodash.intersectionBy = intersectionBy;
- lodash.intersectionWith = intersectionWith;
- lodash.invert = invert;
- lodash.invertBy = invertBy;
- lodash.invokeMap = invokeMap;
- lodash.iteratee = iteratee;
- lodash.keyBy = keyBy;
- lodash.keys = keys;
- lodash.keysIn = keysIn;
- lodash.map = map;
- lodash.mapKeys = mapKeys;
- lodash.mapValues = mapValues;
- lodash.matches = matches;
- lodash.matchesProperty = matchesProperty;
- lodash.memoize = memoize;
- lodash.merge = merge;
- lodash.mergeWith = mergeWith;
- lodash.method = method;
- lodash.methodOf = methodOf;
- lodash.mixin = mixin;
- lodash.negate = negate;
- lodash.nthArg = nthArg;
- lodash.omit = omit;
- lodash.omitBy = omitBy;
- lodash.once = once;
- lodash.orderBy = orderBy;
- lodash.over = over;
- lodash.overArgs = overArgs;
- lodash.overEvery = overEvery;
- lodash.overSome = overSome;
- lodash.partial = partial;
- lodash.partialRight = partialRight;
- lodash.partition = partition;
- lodash.pick = pick;
- lodash.pickBy = pickBy;
- lodash.property = property;
- lodash.propertyOf = propertyOf;
- lodash.pull = pull;
- lodash.pullAll = pullAll;
- lodash.pullAllBy = pullAllBy;
- lodash.pullAllWith = pullAllWith;
- lodash.pullAt = pullAt;
- lodash.range = range;
- lodash.rangeRight = rangeRight;
- lodash.rearg = rearg;
- lodash.reject = reject;
- lodash.remove = remove;
- lodash.rest = rest;
- lodash.reverse = reverse;
- lodash.sampleSize = sampleSize;
- lodash.set = set;
- lodash.setWith = setWith;
- lodash.shuffle = shuffle;
- lodash.slice = slice;
- lodash.sortBy = sortBy;
- lodash.sortedUniq = sortedUniq;
- lodash.sortedUniqBy = sortedUniqBy;
- lodash.split = split;
- lodash.spread = spread;
- lodash.tail = tail;
- lodash.take = take;
- lodash.takeRight = takeRight;
- lodash.takeRightWhile = takeRightWhile;
- lodash.takeWhile = takeWhile;
- lodash.tap = tap;
- lodash.throttle = throttle;
- lodash.thru = thru;
- lodash.toArray = toArray;
- lodash.toPairs = toPairs;
- lodash.toPairsIn = toPairsIn;
- lodash.toPath = toPath;
- lodash.toPlainObject = toPlainObject;
- lodash.transform = transform;
- lodash.unary = unary;
- lodash.union = union;
- lodash.unionBy = unionBy;
- lodash.unionWith = unionWith;
- lodash.uniq = uniq;
- lodash.uniqBy = uniqBy;
- lodash.uniqWith = uniqWith;
- lodash.unset = unset;
- lodash.unzip = unzip;
- lodash.unzipWith = unzipWith;
- lodash.update = update;
- lodash.updateWith = updateWith;
- lodash.values = values;
- lodash.valuesIn = valuesIn;
- lodash.without = without;
- lodash.words = words;
- lodash.wrap = wrap;
- lodash.xor = xor;
- lodash.xorBy = xorBy;
- lodash.xorWith = xorWith;
- lodash.zip = zip;
- lodash.zipObject = zipObject;
- lodash.zipObjectDeep = zipObjectDeep;
- lodash.zipWith = zipWith;
-
- // Add aliases.
- lodash.entries = toPairs;
- lodash.entriesIn = toPairsIn;
- lodash.extend = assignIn;
- lodash.extendWith = assignInWith;
-
- // Add methods to `lodash.prototype`.
- mixin(lodash, lodash);
-
- /*------------------------------------------------------------------------*/
-
- // Add methods that return unwrapped values in chain sequences.
- lodash.add = add;
- lodash.attempt = attempt;
- lodash.camelCase = camelCase;
- lodash.capitalize = capitalize;
- lodash.ceil = ceil;
- lodash.clamp = clamp;
- lodash.clone = clone;
- lodash.cloneDeep = cloneDeep;
- lodash.cloneDeepWith = cloneDeepWith;
- lodash.cloneWith = cloneWith;
- lodash.conformsTo = conformsTo;
- lodash.deburr = deburr;
- lodash.defaultTo = defaultTo;
- lodash.divide = divide;
- lodash.endsWith = endsWith;
- lodash.eq = eq;
- lodash.escape = escape;
- lodash.escapeRegExp = escapeRegExp;
- lodash.every = every;
- lodash.find = find;
- lodash.findIndex = findIndex;
- lodash.findKey = findKey;
- lodash.findLast = findLast;
- lodash.findLastIndex = findLastIndex;
- lodash.findLastKey = findLastKey;
- lodash.floor = floor;
- lodash.forEach = forEach;
- lodash.forEachRight = forEachRight;
- lodash.forIn = forIn;
- lodash.forInRight = forInRight;
- lodash.forOwn = forOwn;
- lodash.forOwnRight = forOwnRight;
- lodash.get = get;
- lodash.gt = gt;
- lodash.gte = gte;
- lodash.has = has;
- lodash.hasIn = hasIn;
- lodash.head = head;
- lodash.identity = identity;
- lodash.includes = includes;
- lodash.indexOf = indexOf;
- lodash.inRange = inRange;
- lodash.invoke = invoke;
- lodash.isArguments = isArguments;
- lodash.isArray = isArray;
- lodash.isArrayBuffer = isArrayBuffer;
- lodash.isArrayLike = isArrayLike;
- lodash.isArrayLikeObject = isArrayLikeObject;
- lodash.isBoolean = isBoolean;
- lodash.isBuffer = isBuffer;
- lodash.isDate = isDate;
- lodash.isElement = isElement;
- lodash.isEmpty = isEmpty;
- lodash.isEqual = isEqual;
- lodash.isEqualWith = isEqualWith;
- lodash.isError = isError;
- lodash.isFinite = isFinite;
- lodash.isFunction = isFunction;
- lodash.isInteger = isInteger;
- lodash.isLength = isLength;
- lodash.isMap = isMap;
- lodash.isMatch = isMatch;
- lodash.isMatchWith = isMatchWith;
- lodash.isNaN = isNaN;
- lodash.isNative = isNative;
- lodash.isNil = isNil;
- lodash.isNull = isNull;
- lodash.isNumber = isNumber;
- lodash.isObject = isObject;
- lodash.isObjectLike = isObjectLike;
- lodash.isPlainObject = isPlainObject;
- lodash.isRegExp = isRegExp;
- lodash.isSafeInteger = isSafeInteger;
- lodash.isSet = isSet;
- lodash.isString = isString;
- lodash.isSymbol = isSymbol;
- lodash.isTypedArray = isTypedArray;
- lodash.isUndefined = isUndefined;
- lodash.isWeakMap = isWeakMap;
- lodash.isWeakSet = isWeakSet;
- lodash.join = join;
- lodash.kebabCase = kebabCase;
- lodash.last = last;
- lodash.lastIndexOf = lastIndexOf;
- lodash.lowerCase = lowerCase;
- lodash.lowerFirst = lowerFirst;
- lodash.lt = lt;
- lodash.lte = lte;
- lodash.max = max;
- lodash.maxBy = maxBy;
- lodash.mean = mean;
- lodash.meanBy = meanBy;
- lodash.min = min;
- lodash.minBy = minBy;
- lodash.stubArray = stubArray;
- lodash.stubFalse = stubFalse;
- lodash.stubObject = stubObject;
- lodash.stubString = stubString;
- lodash.stubTrue = stubTrue;
- lodash.multiply = multiply;
- lodash.nth = nth;
- lodash.noConflict = noConflict;
- lodash.noop = noop;
- lodash.now = now;
- lodash.pad = pad;
- lodash.padEnd = padEnd;
- lodash.padStart = padStart;
- lodash.parseInt = parseInt;
- lodash.random = random;
- lodash.reduce = reduce;
- lodash.reduceRight = reduceRight;
- lodash.repeat = repeat;
- lodash.replace = replace;
- lodash.result = result;
- lodash.round = round;
- lodash.runInContext = runInContext;
- lodash.sample = sample;
- lodash.size = size;
- lodash.snakeCase = snakeCase;
- lodash.some = some;
- lodash.sortedIndex = sortedIndex;
- lodash.sortedIndexBy = sortedIndexBy;
- lodash.sortedIndexOf = sortedIndexOf;
- lodash.sortedLastIndex = sortedLastIndex;
- lodash.sortedLastIndexBy = sortedLastIndexBy;
- lodash.sortedLastIndexOf = sortedLastIndexOf;
- lodash.startCase = startCase;
- lodash.startsWith = startsWith;
- lodash.subtract = subtract;
- lodash.sum = sum;
- lodash.sumBy = sumBy;
- lodash.template = template;
- lodash.times = times;
- lodash.toFinite = toFinite;
- lodash.toInteger = toInteger;
- lodash.toLength = toLength;
- lodash.toLower = toLower;
- lodash.toNumber = toNumber;
- lodash.toSafeInteger = toSafeInteger;
- lodash.toString = toString;
- lodash.toUpper = toUpper;
- lodash.trim = trim;
- lodash.trimEnd = trimEnd;
- lodash.trimStart = trimStart;
- lodash.truncate = truncate;
- lodash.unescape = unescape;
- lodash.uniqueId = uniqueId;
- lodash.upperCase = upperCase;
- lodash.upperFirst = upperFirst;
-
- // Add aliases.
- lodash.each = forEach;
- lodash.eachRight = forEachRight;
- lodash.first = head;
-
- mixin(lodash, (function() {
- var source = {};
- baseForOwn(lodash, function(func, methodName) {
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
- source[methodName] = func;
- }
- });
- return source;
- }()), { 'chain': false });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The semantic version number.
- *
- * @static
- * @memberOf _
- * @type {string}
- */
- lodash.VERSION = VERSION;
-
- // Assign default placeholders.
- arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
- lodash[methodName].placeholder = lodash;
- });
-
- // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
- arrayEach(['drop', 'take'], function(methodName, index) {
- LazyWrapper.prototype[methodName] = function(n) {
- n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
-
- var result = (this.__filtered__ && !index)
- ? new LazyWrapper(this)
- : this.clone();
-
- if (result.__filtered__) {
- result.__takeCount__ = nativeMin(n, result.__takeCount__);
- } else {
- result.__views__.push({
- 'size': nativeMin(n, MAX_ARRAY_LENGTH),
- 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
- });
- }
- return result;
- };
-
- LazyWrapper.prototype[methodName + 'Right'] = function(n) {
- return this.reverse()[methodName](n).reverse();
- };
- });
-
- // Add `LazyWrapper` methods that accept an `iteratee` value.
- arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
- var type = index + 1,
- isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
-
- LazyWrapper.prototype[methodName] = function(iteratee) {
- var result = this.clone();
- result.__iteratees__.push({
- 'iteratee': getIteratee(iteratee, 3),
- 'type': type
- });
- result.__filtered__ = result.__filtered__ || isFilter;
- return result;
- };
- });
-
- // Add `LazyWrapper` methods for `_.head` and `_.last`.
- arrayEach(['head', 'last'], function(methodName, index) {
- var takeName = 'take' + (index ? 'Right' : '');
-
- LazyWrapper.prototype[methodName] = function() {
- return this[takeName](1).value()[0];
- };
- });
-
- // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
- arrayEach(['initial', 'tail'], function(methodName, index) {
- var dropName = 'drop' + (index ? '' : 'Right');
-
- LazyWrapper.prototype[methodName] = function() {
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
- };
- });
-
- LazyWrapper.prototype.compact = function() {
- return this.filter(identity);
- };
-
- LazyWrapper.prototype.find = function(predicate) {
- return this.filter(predicate).head();
- };
-
- LazyWrapper.prototype.findLast = function(predicate) {
- return this.reverse().find(predicate);
- };
-
- LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
- if (typeof path == 'function') {
- return new LazyWrapper(this);
- }
- return this.map(function(value) {
- return baseInvoke(value, path, args);
- });
- });
-
- LazyWrapper.prototype.reject = function(predicate) {
- return this.filter(negate(getIteratee(predicate)));
- };
-
- LazyWrapper.prototype.slice = function(start, end) {
- start = toInteger(start);
-
- var result = this;
- if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result);
- }
- if (start < 0) {
- result = result.takeRight(-start);
- } else if (start) {
- result = result.drop(start);
- }
- if (end !== undefined) {
- end = toInteger(end);
- result = end < 0 ? result.dropRight(-end) : result.take(end - start);
- }
- return result;
- };
-
- LazyWrapper.prototype.takeRightWhile = function(predicate) {
- return this.reverse().takeWhile(predicate).reverse();
- };
-
- LazyWrapper.prototype.toArray = function() {
- return this.take(MAX_ARRAY_LENGTH);
- };
-
- // Add `LazyWrapper` methods to `lodash.prototype`.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
- isTaker = /^(?:head|last)$/.test(methodName),
- lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
- retUnwrapped = isTaker || /^find/.test(methodName);
-
- if (!lodashFunc) {
- return;
- }
- lodash.prototype[methodName] = function() {
- var value = this.__wrapped__,
- args = isTaker ? [1] : arguments,
- isLazy = value instanceof LazyWrapper,
- iteratee = args[0],
- useLazy = isLazy || isArray(value);
-
- var interceptor = function(value) {
- var result = lodashFunc.apply(lodash, arrayPush([value], args));
- return (isTaker && chainAll) ? result[0] : result;
- };
-
- if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
- // Avoid lazy use if the iteratee has a "length" value other than `1`.
- isLazy = useLazy = false;
- }
- var chainAll = this.__chain__,
- isHybrid = !!this.__actions__.length,
- isUnwrapped = retUnwrapped && !chainAll,
- onlyLazy = isLazy && !isHybrid;
-
- if (!retUnwrapped && useLazy) {
- value = onlyLazy ? value : new LazyWrapper(this);
- var result = func.apply(value, args);
- result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
- return new LodashWrapper(result, chainAll);
- }
- if (isUnwrapped && onlyLazy) {
- return func.apply(this, args);
- }
- result = this.thru(interceptor);
- return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
- };
- });
-
- // Add `Array` methods to `lodash.prototype`.
- arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
- var func = arrayProto[methodName],
- chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
- retUnwrapped = /^(?:pop|shift)$/.test(methodName);
-
- lodash.prototype[methodName] = function() {
- var args = arguments;
- if (retUnwrapped && !this.__chain__) {
- var value = this.value();
- return func.apply(isArray(value) ? value : [], args);
- }
- return this[chainName](function(value) {
- return func.apply(isArray(value) ? value : [], args);
- });
- };
- });
-
- // Map minified method names to their real names.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var lodashFunc = lodash[methodName];
- if (lodashFunc) {
- var key = lodashFunc.name + '';
- if (!hasOwnProperty.call(realNames, key)) {
- realNames[key] = [];
- }
- realNames[key].push({ 'name': methodName, 'func': lodashFunc });
- }
- });
-
- realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
- 'name': 'wrapper',
- 'func': undefined
- }];
-
- // Add methods to `LazyWrapper`.
- LazyWrapper.prototype.clone = lazyClone;
- LazyWrapper.prototype.reverse = lazyReverse;
- LazyWrapper.prototype.value = lazyValue;
-
- // Add chain sequence methods to the `lodash` wrapper.
- lodash.prototype.at = wrapperAt;
- lodash.prototype.chain = wrapperChain;
- lodash.prototype.commit = wrapperCommit;
- lodash.prototype.next = wrapperNext;
- lodash.prototype.plant = wrapperPlant;
- lodash.prototype.reverse = wrapperReverse;
- lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
-
- // Add lazy aliases.
- lodash.prototype.first = lodash.prototype.head;
-
- if (symIterator) {
- lodash.prototype[symIterator] = wrapperToIterator;
- }
- return lodash;
- });
-
- /*--------------------------------------------------------------------------*/
-
- // Export lodash.
- var _ = runInContext();
-
- // Some AMD build optimizers, like r.js, check for condition patterns like:
- if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
- // Expose Lodash on the global object to prevent errors when Lodash is
- // loaded by a script tag in the presence of an AMD loader.
- // See http://requirejs.org/docs/errors.html#mismatch for more details.
- // Use `_.noConflict` to remove Lodash from the global object.
- root._ = _;
-
- // Define as an anonymous module so, through path mapping, it can be
- // referenced as the "underscore" module.
- define(function() {
- return _;
- });
- }
- // Check for `exports` after `define` in case a build optimizer adds it.
- else if (freeModule) {
- // Export for Node.js.
- (freeModule.exports = _)._ = _;
- // Export for CommonJS support.
- freeExports._ = _;
- }
- else {
- // Export to the global object.
- root._ = _;
- }
-}.call(this));
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js b/tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js
deleted file mode 100644
index 13ec307dac5..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/lodash.min.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * @license
- * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
- */
-;(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function e(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;
-return true}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!(null==n||!n.length)&&-1<v(n,t,0)}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
-return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function p(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function _(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function v(n,t,r){if(t===t)n:{--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=_(n,d,r);return n}function g(n,t,r,e){
---r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function d(n){return n!==n}function y(n,t){var r=null==n?0:n.length;return r?m(n,t)/r:F}function b(n){return function(t){return null==t?T:t[n]}}function x(n){return function(t){return null==n?T:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function w(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function m(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==T&&(r=r===T?i:r+i)}return r;
-}function A(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function E(n,t){return c(t,function(t){return[t,n[t]]})}function k(n){return function(t){return n(t)}}function S(n,t){return c(t,function(t){return n[t]})}function O(n,t){return n.has(t)}function I(n,t){for(var r=-1,e=n.length;++r<e&&-1<v(t,n[r],0););return r}function R(n,t){for(var r=n.length;r--&&-1<v(t,n[r],0););return r}function z(n){return"\\"+Un[n]}function W(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n];
-}),r}function B(n,t){return function(r){return n(t(r))}}function L(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function U(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function C(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function D(n){if(Rn.test(n)){for(var t=On.lastIndex=0;On.test(n);)++t;n=t}else n=Qn(n);return n}function M(n){return Rn.test(n)?n.match(On)||[]:n.split("");
-}var T,$=1/0,F=NaN,N=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],P=/\b__p\+='';/g,Z=/\b(__p\+=)''\+/g,q=/(__e\(.*?\)|\b__t\))\+'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,G=RegExp(V.source),H=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nn=/^\w*$/,tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,en=RegExp(rn.source),un=/^\s+|\s+$/g,on=/^\s+/,fn=/\s+$/,cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,an=/\{\n\/\* \[wrapped with (.+)\] \*/,ln=/,? & /,sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hn=/\\(\\)?/g,pn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_n=/\w*$/,vn=/^[-+]0x[0-9a-f]+$/i,gn=/^0b[01]+$/i,dn=/^\[object .+?Constructor\]$/,yn=/^0o[0-7]+$/i,bn=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jn=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",An="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,En="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",kn=RegExp("['\u2019]","g"),Sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+En+mn,"g"),In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",An].join("|"),"g"),Rn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),zn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wn="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Bn={};
-Bn["[object Float32Array]"]=Bn["[object Float64Array]"]=Bn["[object Int8Array]"]=Bn["[object Int16Array]"]=Bn["[object Int32Array]"]=Bn["[object Uint8Array]"]=Bn["[object Uint8ClampedArray]"]=Bn["[object Uint16Array]"]=Bn["[object Uint32Array]"]=true,Bn["[object Arguments]"]=Bn["[object Array]"]=Bn["[object ArrayBuffer]"]=Bn["[object Boolean]"]=Bn["[object DataView]"]=Bn["[object Date]"]=Bn["[object Error]"]=Bn["[object Function]"]=Bn["[object Map]"]=Bn["[object Number]"]=Bn["[object Object]"]=Bn["[object RegExp]"]=Bn["[object Set]"]=Bn["[object String]"]=Bn["[object WeakMap]"]=false;
-var Ln={};Ln["[object Arguments]"]=Ln["[object Array]"]=Ln["[object ArrayBuffer]"]=Ln["[object DataView]"]=Ln["[object Boolean]"]=Ln["[object Date]"]=Ln["[object Float32Array]"]=Ln["[object Float64Array]"]=Ln["[object Int8Array]"]=Ln["[object Int16Array]"]=Ln["[object Int32Array]"]=Ln["[object Map]"]=Ln["[object Number]"]=Ln["[object Object]"]=Ln["[object RegExp]"]=Ln["[object Set]"]=Ln["[object String]"]=Ln["[object Symbol]"]=Ln["[object Uint8Array]"]=Ln["[object Uint8ClampedArray]"]=Ln["[object Uint16Array]"]=Ln["[object Uint32Array]"]=true,
-Ln["[object Error]"]=Ln["[object Function]"]=Ln["[object WeakMap]"]=false;var Un={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Cn=parseFloat,Dn=parseInt,Mn=typeof global=="object"&&global&&global.Object===Object&&global,Tn=typeof self=="object"&&self&&self.Object===Object&&self,$n=Mn||Tn||Function("return this")(),Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Pn=Nn&&Nn.exports===Fn,Zn=Pn&&Mn.process,qn=function(){
-try{var n=Nn&&Nn.f&&Nn.f("util").types;return n?n:Zn&&Zn.binding&&Zn.binding("util")}catch(n){}}(),Vn=qn&&qn.isArrayBuffer,Kn=qn&&qn.isDate,Gn=qn&&qn.isMap,Hn=qn&&qn.isRegExp,Jn=qn&&qn.isSet,Yn=qn&&qn.isTypedArray,Qn=b("length"),Xn=x({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I",
-"\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C",
-"\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i",
-"\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r",
-"\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij",
-"\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),nt=x({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),tt=x({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),rt=function x(mn){function An(n){if(yu(n)&&!ff(n)&&!(n instanceof Un)){if(n instanceof On)return n;if(oi.call(n,"__wrapped__"))return Fe(n)}return new On(n)}function En(){}function On(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=T}function Un(n){this.__wrapped__=n,
-this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Fn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Fn;++t<r;)this.add(n[t]);
-}function Zn(n){this.size=(this.__data__=new Tn(n)).size}function qn(n,t){var r,e=ff(n),u=!e&&of(n),i=!e&&!u&&af(n),o=!e&&!u&&!i&&_f(n),u=(e=e||u||i||o)?A(n.length,ni):[],f=u.length;for(r in n)!t&&!oi.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Se(r,f))||u.push(r);return u}function Qn(n){var t=n.length;return t?n[ir(0,t-1)]:T}function et(n,t){return De(Ur(n),pt(t,0,n.length))}function ut(n){return De(Ur(n))}function it(n,t,r){(r===T||lu(n[t],r))&&(r!==T||t in n)||st(n,t,r);
-}function ot(n,t,r){var e=n[t];oi.call(n,t)&&lu(e,r)&&(r!==T||t in n)||st(n,t,r)}function ft(n,t){for(var r=n.length;r--;)if(lu(n[r][0],t))return r;return-1}function ct(n,t,r,e){return uo(n,function(n,u,i){t(e,n,r(n),i)}),e}function at(n,t){return n&&Cr(t,Wu(t),n)}function lt(n,t){return n&&Cr(t,Bu(t),n)}function st(n,t,r){"__proto__"==t&&Ai?Ai(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function ht(n,t){for(var r=-1,e=t.length,u=Ku(e),i=null==n;++r<e;)u[r]=i?T:Ru(n,t[r]);return u;
-}function pt(n,t,r){return n===n&&(r!==T&&(n=n<=r?n:r),t!==T&&(n=n>=t?n:t)),n}function _t(n,t,e,u,i,o){var f,c=1&t,a=2&t,l=4&t;if(e&&(f=i?e(n,u,i,o):e(n)),f!==T)return f;if(!du(n))return n;if(u=ff(n)){if(f=me(n),!c)return Ur(n,f)}else{var s=vo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(af(n))return Ir(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Ae(n),!c)return a?Mr(n,lt(f,n)):Dr(n,at(f,n))}else{if(!Ln[s])return i?n:{};f=Ee(n,s,c)}}if(o||(o=new Zn),
-i=o.get(n))return i;o.set(n,f),pf(n)?n.forEach(function(r){f.add(_t(r,t,e,r,n,o))}):sf(n)&&n.forEach(function(r,u){f.set(u,_t(r,t,e,u,n,o))});var a=l?a?ve:_e:a?Bu:Wu,p=u?T:a(n);return r(p||n,function(r,u){p&&(u=r,r=n[u]),ot(f,u,_t(r,t,e,u,n,o))}),f}function vt(n){var t=Wu(n);return function(r){return gt(r,n,t)}}function gt(n,t,r){var e=r.length;if(null==n)return!e;for(n=Qu(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===T&&!(u in n)||!i(o))return false}return true}function dt(n,t,r){if(typeof n!="function")throw new ti("Expected a function");
-return bo(function(){n.apply(T,r)},t)}function yt(n,t,r,e){var u=-1,i=o,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,k(r))),e?(i=f,a=false):200<=t.length&&(i=O,a=false,t=new Nn(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function bt(n,t){var r=true;return uo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function xt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===T?o===o&&!wu(o):r(o,f)))var f=o,c=i;
-}return c}function jt(n,t){var r=[];return uo(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function wt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=ke),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?wt(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function mt(n,t){return n&&oo(n,t,Wu)}function At(n,t){return n&&fo(n,t,Wu)}function Et(n,t){return i(t,function(t){return _u(n[t])})}function kt(n,t){t=Sr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Me(t[r++])];return r&&r==e?n:T}function St(n,t,r){return t=t(n),
-ff(n)?t:a(t,r(n))}function Ot(n){if(null==n)n=n===T?"[object Undefined]":"[object Null]";else if(mi&&mi in Qu(n)){var t=oi.call(n,mi),r=n[mi];try{n[mi]=T;var e=true}catch(n){}var u=ai.call(n);e&&(t?n[mi]=r:delete n[mi]),n=u}else n=ai.call(n);return n}function It(n,t){return n>t}function Rt(n,t){return null!=n&&oi.call(n,t)}function zt(n,t){return null!=n&&t in Qu(n)}function Wt(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=Ku(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,k(t))),s=Ci(p.length,s),
-l[a]=!r&&(t||120<=u&&120<=p.length)?new Nn(a&&p):T}var p=n[0],_=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;if(v?!O(v,d):!e(h,d,r)){for(a=i;--a;){var y=l[a];if(y?!O(y,d):!e(n[a],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Bt(n,t,r){var e={};return mt(n,function(n,u,i){t(e,r(n),u,i)}),e}function Lt(t,r,e){return r=Sr(r,t),t=2>r.length?t:kt(t,hr(r,0,-1)),r=null==t?t:t[Me(Ve(r))],null==r?T:n(r,t,e)}function Ut(n){return yu(n)&&"[object Arguments]"==Ot(n)}function Ct(n){
-return yu(n)&&"[object ArrayBuffer]"==Ot(n)}function Dt(n){return yu(n)&&"[object Date]"==Ot(n)}function Mt(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!yu(n)&&!yu(t))t=n!==n&&t!==t;else n:{var i=ff(n),o=ff(t),f=i?"[object Array]":vo(n),c=o?"[object Array]":vo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&af(n)){if(!af(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Zn),t=i||_f(n)?se(n,t,r,e,Mt,u):he(n,t,f,r,e,Mt,u);else{
-if(!(1&r)&&(i=a&&oi.call(n,"__wrapped__"),f=o&&oi.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Zn),t=Mt(n,t,r,e,u);break n}if(c)t:if(u||(u=new Zn),i=1&r,f=_e(n),o=f.length,c=_e(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:oi.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===T?h!==p&&!Mt(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l);
-}c&&!s&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Tt(n){return yu(n)&&"[object Map]"==vo(n)}function $t(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=Qu(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===T&&!(c in n))return false;
-}else{if(f=new Zn,e)var s=e(a,l,c,n,t,f);if(s===T?!Mt(l,a,3,e,f):!s)return false}}return true}function Ft(n){return!(!du(n)||ci&&ci in n)&&(_u(n)?hi:dn).test(Te(n))}function Nt(n){return yu(n)&&"[object RegExp]"==Ot(n)}function Pt(n){return yu(n)&&"[object Set]"==vo(n)}function Zt(n){return yu(n)&&gu(n.length)&&!!Bn[Ot(n)]}function qt(n){return typeof n=="function"?n:null==n?$u:typeof n=="object"?ff(n)?Jt(n[0],n[1]):Ht(n):Zu(n)}function Vt(n){if(!ze(n))return Li(n);var t,r=[];for(t in Qu(n))oi.call(n,t)&&"constructor"!=t&&r.push(t);
-return r}function Kt(n,t){return n<t}function Gt(n,t){var r=-1,e=su(n)?Ku(n.length):[];return uo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Ht(n){var t=xe(n);return 1==t.length&&t[0][2]?We(t[0][0],t[0][1]):function(r){return r===n||$t(r,n,t)}}function Jt(n,t){return Ie(n)&&t===t&&!du(t)?We(Me(n),t):function(r){var e=Ru(r,n);return e===T&&e===t?zu(r,n):Mt(t,e,3)}}function Yt(n,t,r,e,u){n!==t&&oo(t,function(i,o){if(u||(u=new Zn),du(i)){var f=u,c=Le(n,o),a=Le(t,o),l=f.get(a);if(l)it(n,o,l);else{
-var l=e?e(c,a,o+"",n,t,f):T,s=l===T;if(s){var h=ff(a),p=!h&&af(a),_=!h&&!p&&_f(a),l=a;h||p||_?ff(c)?l=c:hu(c)?l=Ur(c):p?(s=false,l=Ir(a,true)):_?(s=false,l=zr(a,true)):l=[]:xu(a)||of(a)?(l=c,of(c)?l=Ou(c):du(c)&&!_u(c)||(l=Ae(a))):s=false}s&&(f.set(a,l),Yt(l,a,r,e,f),f.delete(a)),it(n,o,l)}}else f=e?e(Le(n,o),i,o+"",n,t,u):T,f===T&&(f=i),it(n,o,f)},Bu)}function Qt(n,t){var r=n.length;if(r)return t+=0>t?r:0,Se(t,r)?n[t]:T}function Xt(n,t,r){var e=-1;return t=c(t.length?t:[$u],k(ye())),n=Gt(n,function(n){return{
-a:c(t,function(t){return t(n)}),b:++e,c:n}}),w(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Wr(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break n}}e=n.b-t.b}return e})}function nr(n,t){return tr(n,t,function(t,r){return zu(n,r)})}function tr(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=kt(n,o);r(f,o)&&lr(i,Sr(o,n),f)}return i}function rr(n){return function(t){return kt(t,n)}}function er(n,t,r,e){var u=e?g:v,i=-1,o=t.length,f=n;for(n===t&&(t=Ur(t)),
-r&&(f=c(n,k(r)));++i<o;)for(var a=0,l=t[i],l=r?r(l):l;-1<(a=u(f,l,a,e));)f!==n&&xi.call(f,a,1),xi.call(n,a,1);return n}function ur(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;Se(u)?xi.call(n,u,1):xr(n,u)}}}function ir(n,t){return n+Ii(Ti()*(t-n+1))}function or(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=Ii(t/2))&&(n+=n);while(t);return r}function fr(n,t){return xo(Be(n,t,$u),n+"")}function cr(n){return Qn(Uu(n))}function ar(n,t){var r=Uu(n);
-return De(r,pt(t,0,r.length))}function lr(n,t,r,e){if(!du(n))return n;t=Sr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Me(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=du(l)?l:Se(t[u+1])?[]:{})}ot(f,c,a),f=f[c]}return n}function sr(n){return De(Uu(n))}function hr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ku(u);++e<u;)r[e]=n[e+t];return r}function pr(n,t){var r;return uo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}
-function _r(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!wu(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return vr(n,t,$u,r)}function vr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=wu(t),a=t===T;u<i;){var l=Ii((u+i)/2),s=r(n[l]),h=s!==T,p=null===s,_=s===s,v=wu(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Ci(i,4294967294)}function gr(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
-var o=n[r],f=t?t(o):o;if(!r||!lu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function dr(n){return typeof n=="number"?n:wu(n)?F:+n}function yr(n){if(typeof n=="string")return n;if(ff(n))return c(n,yr)+"";if(wu(n))return ro?ro.call(n):"";var t=n+"";return"0"==t&&1/n==-$?"-0":t}function br(n,t,r){var e=-1,u=o,i=n.length,c=true,a=[],l=a;if(r)c=false,u=f;else if(200<=i){if(u=t?null:so(n))return U(u);c=false,u=O,l=new Nn}else l=t?[]:a;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(c&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;
-t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function xr(n,t){return t=Sr(t,n),n=2>t.length?n:kt(n,hr(t,0,-1)),null==n||delete n[Me(Ve(t))]}function jr(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?hr(n,e?0:i,e?i+1:u):hr(n,e?i+1:0,e?u:i)}function wr(n,t){var r=n;return r instanceof Un&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mr(n,t,r){var e=n.length;if(2>e)return e?br(n[0]):[];for(var u=-1,i=Ku(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=yt(i[u]||o,n[f],t,r));
-return br(wt(i,1),t,r)}function Ar(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:T);return o}function Er(n){return hu(n)?n:[]}function kr(n){return typeof n=="function"?n:$u}function Sr(n,t){return ff(n)?n:Ie(n,t)?[n]:jo(Iu(n))}function Or(n,t,r){var e=n.length;return r=r===T?e:r,!t&&r>=e?n:hr(n,t,r)}function Ir(n,t){if(t)return n.slice();var r=n.length,r=gi?gi(r):new n.constructor(r);return n.copy(r),r}function Rr(n){var t=new n.constructor(n.byteLength);return new vi(t).set(new vi(n)),
-t}function zr(n,t){return new n.constructor(t?Rr(n.buffer):n.buffer,n.byteOffset,n.length)}function Wr(n,t){if(n!==t){var r=n!==T,e=null===n,u=n===n,i=wu(n),o=t!==T,f=null===t,c=t===t,a=wu(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Br(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Ui(i-o,0),l=Ku(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];
-return l}function Lr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Ui(i-f,0),s=Ku(l+a);for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Ur(n,t){var r=-1,e=n.length;for(t||(t=Ku(e));++r<e;)t[r]=n[r];return t}function Cr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):T;c===T&&(c=n[f]),u?st(r,f,c):ot(r,f,c)}return r}function Dr(n,t){return Cr(n,po(n),t)}function Mr(n,t){return Cr(n,_o(n),t);
-}function Tr(n,r){return function(e,u){var i=ff(e)?t:ct,o=r?r():{};return i(e,n,ye(u,2),o)}}function $r(n){return fr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:T,o=2<u?r[2]:T,i=3<n.length&&typeof i=="function"?(u--,i):T;for(o&&Oe(r[0],r[1],o)&&(i=3>u?T:i,u=1),t=Qu(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Fr(n,t){return function(r,e){if(null==r)return r;if(!su(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=Qu(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Nr(n){return function(t,r,e){
-var u=-1,i=Qu(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break}return t}}function Pr(n,t,r){function e(){return(this&&this!==$n&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Vr(n);return e}function Zr(n){return function(t){t=Iu(t);var r=Rn.test(t)?M(t):T,e=r?r[0]:t.charAt(0);return t=r?Or(r,1).join(""):t.slice(1),e[n]()+t}}function qr(n){return function(t){return l(Mu(Du(t).replace(kn,"")),n,"")}}function Vr(n){return function(){var t=arguments;switch(t.length){
-case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=eo(n.prototype),t=n.apply(r,t);return du(t)?t:r}}function Kr(t,r,e){function u(){for(var o=arguments.length,f=Ku(o),c=o,a=de(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:L(f,a),
-o-=c.length,o<e?ue(t,r,Jr,u.placeholder,T,f,c,T,T,e-o):n(this&&this!==$n&&this instanceof u?i:t,this,f)}var i=Vr(t);return u}function Gr(n){return function(t,r,e){var u=Qu(t);if(!su(t)){var i=ye(r,3);t=Wu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:T}}function Hr(n){return pe(function(t){var r=t.length,e=r,u=On.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ti("Expected a function");if(u&&!o&&"wrapper"==ge(i))var o=new On([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=ge(i),f="wrapper"==u?ho(i):T,o=f&&Re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[ge(f[0])].apply(o,f[3]):1==i.length&&Re(i)?o[u]():o.thru(i);
-return function(){var n=arguments,e=n[0];if(o&&1==n.length&&ff(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Jr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Ku(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=de(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Br(y,e,u,_)),i&&(y=Lr(y,i,o,_)),d-=x,_&&d<a)return j=L(y,j),ue(n,t,Jr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Ci(f.length,x),m=Ur(y);w--;){
-var A=f[w];y[w]=Se(A,x)?m[A]:T}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==$n&&this instanceof l&&(b=g||Vr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?T:Vr(n);return l}function Yr(n,t){return function(r,e){return Bt(r,n,t(e))}}function Qr(n,t){return function(r,e){var u;if(r===T&&e===T)return t;if(r!==T&&(u=r),e!==T){if(u===T)return e;typeof r=="string"||typeof e=="string"?(r=yr(r),e=yr(e)):(r=dr(r),e=dr(e)),u=n(r,e)}return u}}function Xr(t){return pe(function(r){
-return r=c(r,k(ye())),fr(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ne(n,t){t=t===T?" ":yr(t);var r=t.length;return 2>r?r?or(t,n):t:(r=or(t,Oi(n/D(t))),Rn.test(t)?Or(M(r),0,n).join(""):r.slice(0,n))}function te(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=Ku(l+c),h=this&&this!==$n&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];return n(h,o?e:this,s)}var o=1&r,f=Vr(t);return i}function re(n){return function(t,r,e){
-e&&typeof e!="number"&&Oe(t,r,e)&&(r=e=T),t=Au(t),r===T?(r=t,t=0):r=Au(r),e=e===T?t<r?1:-1:Au(e);var u=-1;r=Ui(Oi((r-t)/(e||1)),0);for(var i=Ku(r);r--;)i[n?r:++u]=t,t+=e;return i}}function ee(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Su(t),r=Su(r)),n(t,r)}}function ue(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:T;o=l?T:o;var h=l?i:T;return i=l?T:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(T,u),Re(n)&&yo(r,u),r.placeholder=e,Ue(r,n,t)}function ie(n){
-var t=Yu[n];return function(n,r){if(n=Su(n),(r=null==r?0:Ci(Eu(r),292))&&Wi(n)){var e=(Iu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Iu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oe(n){return function(t){var r=vo(t);return"[object Map]"==r?W(t):"[object Set]"==r?C(t):E(t,n(t))}}function fe(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ti("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=T),o=o===T?o:Ui(Eu(o),0),f=f===T?f:Eu(f),a-=u?u.length:0,
-64&t){var l=e,s=u;e=u=T}var h=c?T:ho(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Br(e,r,h[4]):r,i[4]=e?L(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Lr(e,r,h[6]):r,i[6]=e?L(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Ci(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],
-t=i[1],r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===T?c?0:n.length:Ui(i[9]-a,0),!f&&24&t&&(t&=-25),Ue((h?co:yo)(t&&1!=t?8==t||16==t?Kr(n,t,f):32!=t&&33!=t||u.length?Jr.apply(T,i):te(n,t,r,e):Pr(n,t,r),i),n,t)}function ce(n,t,r,e){return n===T||lu(n,ei[r])&&!oi.call(e,r)?t:n}function ae(n,t,r,e,u,i){return du(n)&&du(t)&&(i.set(t,n),Yt(n,t,T,ae,i),i.delete(t)),n}function le(n){return xu(n)?T:n}function se(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;
-var c=-1,a=true,l=2&r?new Nn:T;for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],p=t[c];if(e)var _=o?e(p,s,c,t,n,i):e(s,p,c,n,t,i);if(_!==T){if(_)continue;a=false;break}if(l){if(!h(t,function(n,t){if(!O(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==p&&!u(s,p,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function he(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":
-if(n.byteLength!=t.byteLength||!i(new vi(n),new vi(t)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return lu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=W;case"[object Set]":if(f||(f=U),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=se(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(to)return to.call(n)==to.call(t)}
-return false}function pe(n){return xo(Be(n,T,Ze),n+"")}function _e(n){return St(n,Wu,po)}function ve(n){return St(n,Bu,_o)}function ge(n){for(var t=n.name+"",r=Gi[t],e=oi.call(Gi,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function de(n){return(oi.call(An,"placeholder")?An:n).placeholder}function ye(){var n=An.iteratee||Fu,n=n===Fu?qt:n;return arguments.length?n(arguments[0],arguments[1]):n}function be(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
-}function xe(n){for(var t=Wu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!du(u)]}return t}function je(n,t){var r=null==n?T:n[t];return Ft(r)?r:T}function we(n,t,r){t=Sr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=Me(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&gu(u)&&Se(o,u)&&(ff(n)||of(n)))}function me(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&oi.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ae(n){
-return typeof n.constructor!="function"||ze(n)?{}:eo(di(n))}function Ee(n,t,r){var e=n.constructor;switch(t){case"[object ArrayBuffer]":return Rr(n);case"[object Boolean]":case"[object Date]":return new e(+n);case"[object DataView]":return t=r?Rr(n.buffer):n.buffer,new n.constructor(t,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
-case"[object Uint16Array]":case"[object Uint32Array]":return zr(n,r);case"[object Map]":return new e;case"[object Number]":case"[object String]":return new e(n);case"[object RegExp]":return t=new n.constructor(n.source,_n.exec(n)),t.lastIndex=n.lastIndex,t;case"[object Set]":return new e;case"[object Symbol]":return to?Qu(to.call(n)):{}}}function ke(n){return ff(n)||of(n)||!!(ji&&n&&n[ji])}function Se(n,t){var r=typeof n;return t=null==t?9007199254740991:t,!!t&&("number"==r||"symbol"!=r&&bn.test(n))&&-1<n&&0==n%1&&n<t;
-}function Oe(n,t,r){if(!du(r))return false;var e=typeof t;return!!("number"==e?su(r)&&Se(t,r.length):"string"==e&&t in r)&&lu(r[t],n)}function Ie(n,t){if(ff(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!wu(n))||(nn.test(n)||!X.test(n)||null!=t&&n in Qu(t))}function Re(n){var t=ge(n),r=An[t];return typeof r=="function"&&t in Un.prototype&&(n===r||(t=ho(r),!!t&&n===t[0]))}function ze(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||ei)}function We(n,t){
-return function(r){return null!=r&&(r[n]===t&&(t!==T||n in Qu(r)))}}function Be(t,r,e){return r=Ui(r===T?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Ui(u.length-r,0),f=Ku(o);++i<o;)f[i]=u[r+i];for(i=-1,o=Ku(r+1);++i<r;)o[i]=u[i];return o[r]=e(f),n(t,this,o)}}function Le(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Ue(n,t,r){var e=t+"";t=xo;var u,i=$e;return u=(u=e.match(an))?u[1].split(ln):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],
-r=r.join(2<i?", ":" "),e=e.replace(cn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Ce(n){var t=0,r=0;return function(){var e=Di(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(T,arguments)}}function De(n,t){var r=-1,e=n.length,u=e-1;for(t=t===T?e:t;++r<t;){var e=ir(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function Me(n){if(typeof n=="string"||wu(n))return n;var t=n+"";return"0"==t&&1/n==-$?"-0":t}function Te(n){if(null!=n){try{return ii.call(n)}catch(n){}
-return n+""}return""}function $e(n,t){return r(N,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function Fe(n){if(n instanceof Un)return n.clone();var t=new On(n.__wrapped__,n.__chain__);return t.__actions__=Ur(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ne(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ui(e+r,0)),_(n,ye(t,3),r)):-1}function Pe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==T&&(u=Eu(r),u=0>r?Ui(e+u,0):Ci(u,e-1)),
-_(n,ye(t,3),u,true)}function Ze(n){return(null==n?0:n.length)?wt(n,1):[]}function qe(n){return n&&n.length?n[0]:T}function Ve(n){var t=null==n?0:n.length;return t?n[t-1]:T}function Ke(n,t){return n&&n.length&&t&&t.length?er(n,t):n}function Ge(n){return null==n?n:$i.call(n)}function He(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(hu(n))return t=Ui(n.length,t),true}),A(t,function(t){return c(n,b(t))})}function Je(t,r){if(!t||!t.length)return[];var e=He(t);return null==r?e:c(e,function(t){
-return n(r,T,t)})}function Ye(n){return n=An(n),n.__chain__=true,n}function Qe(n,t){return t(n)}function Xe(){return this}function nu(n,t){return(ff(n)?r:uo)(n,ye(t,3))}function tu(n,t){return(ff(n)?e:io)(n,ye(t,3))}function ru(n,t){return(ff(n)?c:Gt)(n,ye(t,3))}function eu(n,t,r){return t=r?T:t,t=n&&null==t?n.length:t,fe(n,128,T,T,T,T,t)}function uu(n,t){var r;if(typeof t!="function")throw new ti("Expected a function");return n=Eu(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=T),
-r}}function iu(n,t,r){return t=r?T:t,n=fe(n,8,T,T,T,T,T,t),n.placeholder=iu.placeholder,n}function ou(n,t,r){return t=r?T:t,n=fe(n,16,T,T,T,T,T,t),n.placeholder=ou.placeholder,n}function fu(n,t,r){function e(t){var r=c,e=a;return c=a=T,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===T||r>=t||0>r||g&&n>=l}function i(){var n=Go();if(u(n))return o(n);var r,e=bo;r=n-_,n=t-(n-p),r=g?Ci(n,l-r):n,h=e(i,r)}function o(n){return h=T,d&&c?e(n):(c=a=T,s)}function f(){var n=Go(),r=u(n);if(c=arguments,
-a=this,p=n,r){if(h===T)return _=n=p,h=bo(i,t),v?e(n):s;if(g)return lo(h),h=bo(i,t),e(p)}return h===T&&(h=bo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ti("Expected a function");return t=Su(t)||0,du(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ui(Su(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==T&&lo(h),_=0,c=p=a=h=T},f.flush=function(){return h===T?s:o(Go())},f}function cu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;
-return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ti("Expected a function");return r.cache=new(cu.Cache||Fn),r}function au(n){if(typeof n!="function")throw new ti("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function lu(n,t){return n===t||n!==n&&t!==t;
-}function su(n){return null!=n&&gu(n.length)&&!_u(n)}function hu(n){return yu(n)&&su(n)}function pu(n){if(!yu(n))return false;var t=Ot(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!xu(n)}function _u(n){return!!du(n)&&(n=Ot(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function vu(n){return typeof n=="number"&&n==Eu(n)}function gu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n;
-}function du(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function yu(n){return null!=n&&typeof n=="object"}function bu(n){return typeof n=="number"||yu(n)&&"[object Number]"==Ot(n)}function xu(n){return!(!yu(n)||"[object Object]"!=Ot(n))&&(n=di(n),null===n||(n=oi.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&ii.call(n)==li))}function ju(n){return typeof n=="string"||!ff(n)&&yu(n)&&"[object String]"==Ot(n)}function wu(n){return typeof n=="symbol"||yu(n)&&"[object Symbol]"==Ot(n);
-}function mu(n){if(!n)return[];if(su(n))return ju(n)?M(n):Ur(n);if(wi&&n[wi]){n=n[wi]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=vo(n),("[object Map]"==t?W:"[object Set]"==t?U:Uu)(n)}function Au(n){return n?(n=Su(n),n===$||n===-$?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Eu(n){n=Au(n);var t=n%1;return n===n?t?n-t:n:0}function ku(n){return n?pt(Eu(n),0,4294967295):0}function Su(n){if(typeof n=="number")return n;if(wu(n))return F;if(du(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,
-n=du(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(un,"");var t=gn.test(n);return t||yn.test(n)?Dn(n.slice(2),t?2:8):vn.test(n)?F:+n}function Ou(n){return Cr(n,Bu(n))}function Iu(n){return null==n?"":yr(n)}function Ru(n,t,r){return n=null==n?T:kt(n,t),n===T?r:n}function zu(n,t){return null!=n&&we(n,t,zt)}function Wu(n){return su(n)?qn(n):Vt(n)}function Bu(n){if(su(n))n=qn(n,true);else if(du(n)){var t,r=ze(n),e=[];for(t in n)("constructor"!=t||!r&&oi.call(n,t))&&e.push(t);n=e}else{if(t=[],
-null!=n)for(r in Qu(n))t.push(r);n=t}return n}function Lu(n,t){if(null==n)return{};var r=c(ve(n),function(n){return[n]});return t=ye(t),tr(n,r,function(n,r){return t(n,r[0])})}function Uu(n){return null==n?[]:S(n,Wu(n))}function Cu(n){return $f(Iu(n).toLowerCase())}function Du(n){return(n=Iu(n))&&n.replace(xn,Xn).replace(Sn,"")}function Mu(n,t,r){return n=Iu(n),t=r?T:t,t===T?zn.test(n)?n.match(In)||[]:n.match(sn)||[]:n.match(t)||[]}function Tu(n){return function(){return n}}function $u(n){return n;
-}function Fu(n){return qt(typeof n=="function"?n:_t(n,1))}function Nu(n,t,e){var u=Wu(t),i=Et(t,u);null!=e||du(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=Et(t,Wu(t)));var o=!(du(e)&&"chain"in e&&!e.chain),f=_u(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Ur(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pu(){}
-function Zu(n){return Ie(n)?b(Me(n)):rr(n)}function qu(){return[]}function Vu(){return false}mn=null==mn?$n:rt.defaults($n.Object(),mn,rt.pick($n,Wn));var Ku=mn.Array,Gu=mn.Date,Hu=mn.Error,Ju=mn.Function,Yu=mn.Math,Qu=mn.Object,Xu=mn.RegExp,ni=mn.String,ti=mn.TypeError,ri=Ku.prototype,ei=Qu.prototype,ui=mn["__core-js_shared__"],ii=Ju.prototype.toString,oi=ei.hasOwnProperty,fi=0,ci=function(){var n=/[^.]+$/.exec(ui&&ui.keys&&ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),ai=ei.toString,li=ii.call(Qu),si=$n._,hi=Xu("^"+ii.call(oi).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=Pn?mn.Buffer:T,_i=mn.Symbol,vi=mn.Uint8Array,gi=pi?pi.g:T,di=B(Qu.getPrototypeOf,Qu),yi=Qu.create,bi=ei.propertyIsEnumerable,xi=ri.splice,ji=_i?_i.isConcatSpreadable:T,wi=_i?_i.iterator:T,mi=_i?_i.toStringTag:T,Ai=function(){
-try{var n=je(Qu,"defineProperty");return n({},"",{}),n}catch(n){}}(),Ei=mn.clearTimeout!==$n.clearTimeout&&mn.clearTimeout,ki=Gu&&Gu.now!==$n.Date.now&&Gu.now,Si=mn.setTimeout!==$n.setTimeout&&mn.setTimeout,Oi=Yu.ceil,Ii=Yu.floor,Ri=Qu.getOwnPropertySymbols,zi=pi?pi.isBuffer:T,Wi=mn.isFinite,Bi=ri.join,Li=B(Qu.keys,Qu),Ui=Yu.max,Ci=Yu.min,Di=Gu.now,Mi=mn.parseInt,Ti=Yu.random,$i=ri.reverse,Fi=je(mn,"DataView"),Ni=je(mn,"Map"),Pi=je(mn,"Promise"),Zi=je(mn,"Set"),qi=je(mn,"WeakMap"),Vi=je(Qu,"create"),Ki=qi&&new qi,Gi={},Hi=Te(Fi),Ji=Te(Ni),Yi=Te(Pi),Qi=Te(Zi),Xi=Te(qi),no=_i?_i.prototype:T,to=no?no.valueOf:T,ro=no?no.toString:T,eo=function(){
-function n(){}return function(t){return du(t)?yi?yi(t):(n.prototype=t,t=new n,n.prototype=T,t):{}}}();An.templateSettings={escape:J,evaluate:Y,interpolate:Q,variable:"",imports:{_:An}},An.prototype=En.prototype,An.prototype.constructor=An,On.prototype=eo(En.prototype),On.prototype.constructor=On,Un.prototype=eo(En.prototype),Un.prototype.constructor=Un,Mn.prototype.clear=function(){this.__data__=Vi?Vi(null):{},this.size=0},Mn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
-this.size-=n?1:0,n},Mn.prototype.get=function(n){var t=this.__data__;return Vi?(n=t[n],"__lodash_hash_undefined__"===n?T:n):oi.call(t,n)?t[n]:T},Mn.prototype.has=function(n){var t=this.__data__;return Vi?t[n]!==T:oi.call(t,n)},Mn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Vi&&t===T?"__lodash_hash_undefined__":t,this},Tn.prototype.clear=function(){this.__data__=[],this.size=0},Tn.prototype.delete=function(n){var t=this.__data__;return n=ft(t,n),!(0>n)&&(n==t.length-1?t.pop():xi.call(t,n,1),
---this.size,true)},Tn.prototype.get=function(n){var t=this.__data__;return n=ft(t,n),0>n?T:t[n][1]},Tn.prototype.has=function(n){return-1<ft(this.__data__,n)},Tn.prototype.set=function(n,t){var r=this.__data__,e=ft(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(Ni||Tn),string:new Mn}},Fn.prototype.delete=function(n){return n=be(this,n).delete(n),this.size-=n?1:0,n},Fn.prototype.get=function(n){return be(this,n).get(n);
-},Fn.prototype.has=function(n){return be(this,n).has(n)},Fn.prototype.set=function(n,t){var r=be(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Nn.prototype.add=Nn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.clear=function(){this.__data__=new Tn,this.size=0},Zn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Zn.prototype.get=function(n){
-return this.__data__.get(n)},Zn.prototype.has=function(n){return this.__data__.has(n)},Zn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Tn){var e=r.__data__;if(!Ni||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Fn(e)}return r.set(n,t),this.size=r.size,this};var uo=Fr(mt),io=Fr(At,true),oo=Nr(),fo=Nr(true),co=Ki?function(n,t){return Ki.set(n,t),n}:$u,ao=Ai?function(n,t){return Ai(n,"toString",{configurable:true,enumerable:false,value:Tu(t),writable:true})}:$u,lo=Ei||function(n){
-return $n.clearTimeout(n)},so=Zi&&1/U(new Zi([,-0]))[1]==$?function(n){return new Zi(n)}:Pu,ho=Ki?function(n){return Ki.get(n)}:Pu,po=Ri?function(n){return null==n?[]:(n=Qu(n),i(Ri(n),function(t){return bi.call(n,t)}))}:qu,_o=Ri?function(n){for(var t=[];n;)a(t,po(n)),n=di(n);return t}:qu,vo=Ot;(Fi&&"[object DataView]"!=vo(new Fi(new ArrayBuffer(1)))||Ni&&"[object Map]"!=vo(new Ni)||Pi&&"[object Promise]"!=vo(Pi.resolve())||Zi&&"[object Set]"!=vo(new Zi)||qi&&"[object WeakMap]"!=vo(new qi))&&(vo=function(n){
-var t=Ot(n);if(n=(n="[object Object]"==t?n.constructor:T)?Te(n):"")switch(n){case Hi:return"[object DataView]";case Ji:return"[object Map]";case Yi:return"[object Promise]";case Qi:return"[object Set]";case Xi:return"[object WeakMap]"}return t});var go=ui?_u:Vu,yo=Ce(co),bo=Si||function(n,t){return $n.setTimeout(n,t)},xo=Ce(ao),jo=function(n){n=cu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(tn,function(n,r,e,u){
-t.push(e?u.replace(hn,"$1"):r||n)}),t}),wo=fr(function(n,t){return hu(n)?yt(n,wt(t,1,hu,true)):[]}),mo=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),ye(r,2)):[]}),Ao=fr(function(n,t){var r=Ve(t);return hu(r)&&(r=T),hu(n)?yt(n,wt(t,1,hu,true),T,r):[]}),Eo=fr(function(n){var t=c(n,Er);return t.length&&t[0]===n[0]?Wt(t):[]}),ko=fr(function(n){var t=Ve(n),r=c(n,Er);return t===Ve(r)?t=T:r.pop(),r.length&&r[0]===n[0]?Wt(r,ye(t,2)):[]}),So=fr(function(n){var t=Ve(n),r=c(n,Er);return(t=typeof t=="function"?t:T)&&r.pop(),
-r.length&&r[0]===n[0]?Wt(r,T,t):[]}),Oo=fr(Ke),Io=pe(function(n,t){var r=null==n?0:n.length,e=ht(n,t);return ur(n,c(t,function(n){return Se(n,r)?+n:n}).sort(Wr)),e}),Ro=fr(function(n){return br(wt(n,1,hu,true))}),zo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),br(wt(n,1,hu,true),ye(t,2))}),Wo=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return br(wt(n,1,hu,true),T,t)}),Bo=fr(function(n,t){return hu(n)?yt(n,t):[]}),Lo=fr(function(n){return mr(i(n,hu))}),Uo=fr(function(n){var t=Ve(n);return hu(t)&&(t=T),
-mr(i(n,hu),ye(t,2))}),Co=fr(function(n){var t=Ve(n),t=typeof t=="function"?t:T;return mr(i(n,hu),T,t)}),Do=fr(He),Mo=fr(function(n){var t=n.length,t=1<t?n[t-1]:T,t=typeof t=="function"?(n.pop(),t):T;return Je(n,t)}),To=pe(function(n){function t(t){return ht(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Un&&Se(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(T),
-n})):this.thru(t)}),$o=Tr(function(n,t,r){oi.call(n,r)?++n[r]:st(n,r,1)}),Fo=Gr(Ne),No=Gr(Pe),Po=Tr(function(n,t,r){oi.call(n,r)?n[r].push(t):st(n,r,[t])}),Zo=fr(function(t,r,e){var u=-1,i=typeof r=="function",o=su(t)?Ku(t.length):[];return uo(t,function(t){o[++u]=i?n(r,t,e):Lt(t,r,e)}),o}),qo=Tr(function(n,t,r){st(n,r,t)}),Vo=Tr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ko=fr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&Oe(n,t[0],t[1])?t=[]:2<r&&Oe(t[0],t[1],t[2])&&(t=[t[0]]),
-Xt(n,wt(t,1),[])}),Go=ki||function(){return $n.Date.now()},Ho=fr(function(n,t,r){var e=1;if(r.length)var u=L(r,de(Ho)),e=32|e;return fe(n,e,t,r,u)}),Jo=fr(function(n,t,r){var e=3;if(r.length)var u=L(r,de(Jo)),e=32|e;return fe(t,e,n,r,u)}),Yo=fr(function(n,t){return dt(n,1,t)}),Qo=fr(function(n,t,r){return dt(n,Su(t)||0,r)});cu.Cache=Fn;var Xo=fr(function(t,r){r=1==r.length&&ff(r[0])?c(r[0],k(ye())):c(wt(r,1),k(ye()));var e=r.length;return fr(function(u){for(var i=-1,o=Ci(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);
-return n(t,this,u)})}),nf=fr(function(n,t){return fe(n,32,T,t,L(t,de(nf)))}),tf=fr(function(n,t){return fe(n,64,T,t,L(t,de(tf)))}),rf=pe(function(n,t){return fe(n,256,T,T,T,t)}),ef=ee(It),uf=ee(function(n,t){return n>=t}),of=Ut(function(){return arguments}())?Ut:function(n){return yu(n)&&oi.call(n,"callee")&&!bi.call(n,"callee")},ff=Ku.isArray,cf=Vn?k(Vn):Ct,af=zi||Vu,lf=Kn?k(Kn):Dt,sf=Gn?k(Gn):Tt,hf=Hn?k(Hn):Nt,pf=Jn?k(Jn):Pt,_f=Yn?k(Yn):Zt,vf=ee(Kt),gf=ee(function(n,t){return n<=t}),df=$r(function(n,t){
-if(ze(t)||su(t))Cr(t,Wu(t),n);else for(var r in t)oi.call(t,r)&&ot(n,r,t[r])}),yf=$r(function(n,t){Cr(t,Bu(t),n)}),bf=$r(function(n,t,r,e){Cr(t,Bu(t),n,e)}),xf=$r(function(n,t,r,e){Cr(t,Wu(t),n,e)}),jf=pe(ht),wf=fr(function(n,t){n=Qu(n);var r=-1,e=t.length,u=2<e?t[2]:T;for(u&&Oe(t[0],t[1],u)&&(e=1);++r<e;)for(var u=t[r],i=Bu(u),o=-1,f=i.length;++o<f;){var c=i[o],a=n[c];(a===T||lu(a,ei[c])&&!oi.call(n,c))&&(n[c]=u[c])}return n}),mf=fr(function(t){return t.push(T,ae),n(Of,T,t)}),Af=Yr(function(n,t,r){
-null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),n[t]=r},Tu($u)),Ef=Yr(function(n,t,r){null!=t&&typeof t.toString!="function"&&(t=ai.call(t)),oi.call(n,t)?n[t].push(r):n[t]=[r]},ye),kf=fr(Lt),Sf=$r(function(n,t,r){Yt(n,t,r)}),Of=$r(function(n,t,r,e){Yt(n,t,r,e)}),If=pe(function(n,t){var r={};if(null==n)return r;var e=false;t=c(t,function(t){return t=Sr(t,n),e||(e=1<t.length),t}),Cr(n,ve(n),r),e&&(r=_t(r,7,le));for(var u=t.length;u--;)xr(r,t[u]);return r}),Rf=pe(function(n,t){return null==n?{}:nr(n,t);
-}),zf=oe(Wu),Wf=oe(Bu),Bf=qr(function(n,t,r){return t=t.toLowerCase(),n+(r?Cu(t):t)}),Lf=qr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Uf=qr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Cf=Zr("toLowerCase"),Df=qr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Mf=qr(function(n,t,r){return n+(r?" ":"")+$f(t)}),Tf=qr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),$f=Zr("toUpperCase"),Ff=fr(function(t,r){try{return n(t,T,r)}catch(n){return pu(n)?n:new Hu(n)}}),Nf=pe(function(n,t){
-return r(t,function(t){t=Me(t),st(n,t,Ho(n[t],n))}),n}),Pf=Hr(),Zf=Hr(true),qf=fr(function(n,t){return function(r){return Lt(r,n,t)}}),Vf=fr(function(n,t){return function(r){return Lt(n,r,t)}}),Kf=Xr(c),Gf=Xr(u),Hf=Xr(h),Jf=re(),Yf=re(true),Qf=Qr(function(n,t){return n+t},0),Xf=ie("ceil"),nc=Qr(function(n,t){return n/t},1),tc=ie("floor"),rc=Qr(function(n,t){return n*t},1),ec=ie("round"),uc=Qr(function(n,t){return n-t},0);return An.after=function(n,t){if(typeof t!="function")throw new ti("Expected a function");
-return n=Eu(n),function(){if(1>--n)return t.apply(this,arguments)}},An.ary=eu,An.assign=df,An.assignIn=yf,An.assignInWith=bf,An.assignWith=xf,An.at=jf,An.before=uu,An.bind=Ho,An.bindAll=Nf,An.bindKey=Jo,An.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return ff(n)?n:[n]},An.chain=Ye,An.chunk=function(n,t,r){if(t=(r?Oe(n,t,r):t===T)?1:Ui(Eu(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Ku(Oi(r/t));e<r;)i[u++]=hr(n,e,e+=t);return i},An.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){
-var i=n[t];i&&(u[e++]=i)}return u},An.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Ku(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return a(ff(r)?Ur(r):[r],wt(t,1))},An.cond=function(t){var r=null==t?0:t.length,e=ye();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new ti("Expected a function");return[e(n[0]),n[1]]}):[],fr(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})},An.conforms=function(n){return vt(_t(n,1))},An.constant=Tu,
-An.countBy=$o,An.create=function(n,t){var r=eo(n);return null==t?r:at(r,t)},An.curry=iu,An.curryRight=ou,An.debounce=fu,An.defaults=wf,An.defaultsDeep=mf,An.defer=Yo,An.delay=Qo,An.difference=wo,An.differenceBy=mo,An.differenceWith=Ao,An.drop=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),hr(n,0>t?0:t,e)):[]},An.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0,0>t?0:t)):[]},An.dropRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true,true):[];
-},An.dropWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),true):[]},An.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&Oe(n,t,r)&&(r=0,e=u),u=n.length,r=Eu(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Eu(e),0>e&&(e+=u),e=r>e?0:ku(e);r<e;)n[r++]=t;return n},An.filter=function(n,t){return(ff(n)?i:jt)(n,ye(t,3))},An.flatMap=function(n,t){return wt(ru(n,t),1)},An.flatMapDeep=function(n,t){return wt(ru(n,t),$)},An.flatMapDepth=function(n,t,r){return r=r===T?1:Eu(r),
-wt(ru(n,t),r)},An.flatten=Ze,An.flattenDeep=function(n){return(null==n?0:n.length)?wt(n,$):[]},An.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===T?1:Eu(t),wt(n,t)):[]},An.flip=function(n){return fe(n,512)},An.flow=Pf,An.flowRight=Zf,An.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},An.functions=function(n){return null==n?[]:Et(n,Wu(n))},An.functionsIn=function(n){return null==n?[]:Et(n,Bu(n))},An.groupBy=Po,An.initial=function(n){
-return(null==n?0:n.length)?hr(n,0,-1):[]},An.intersection=Eo,An.intersectionBy=ko,An.intersectionWith=So,An.invert=Af,An.invertBy=Ef,An.invokeMap=Zo,An.iteratee=Fu,An.keyBy=qo,An.keys=Wu,An.keysIn=Bu,An.map=ru,An.mapKeys=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,t(n,e,u),n)}),r},An.mapValues=function(n,t){var r={};return t=ye(t,3),mt(n,function(n,e,u){st(r,e,t(n,e,u))}),r},An.matches=function(n){return Ht(_t(n,1))},An.matchesProperty=function(n,t){return Jt(n,_t(t,1))},An.memoize=cu,
-An.merge=Sf,An.mergeWith=Of,An.method=qf,An.methodOf=Vf,An.mixin=Nu,An.negate=au,An.nthArg=function(n){return n=Eu(n),fr(function(t){return Qt(t,n)})},An.omit=If,An.omitBy=function(n,t){return Lu(n,au(ye(t)))},An.once=function(n){return uu(2,n)},An.orderBy=function(n,t,r,e){return null==n?[]:(ff(t)||(t=null==t?[]:[t]),r=e?T:r,ff(r)||(r=null==r?[]:[r]),Xt(n,t,r))},An.over=Kf,An.overArgs=Xo,An.overEvery=Gf,An.overSome=Hf,An.partial=nf,An.partialRight=tf,An.partition=Vo,An.pick=Rf,An.pickBy=Lu,An.property=Zu,
-An.propertyOf=function(n){return function(t){return null==n?T:kt(n,t)}},An.pull=Oo,An.pullAll=Ke,An.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,ye(r,2)):n},An.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?er(n,t,T,r):n},An.pullAt=Io,An.range=Jf,An.rangeRight=Yf,An.rearg=rf,An.reject=function(n,t){return(ff(n)?i:jt)(n,au(ye(t,3)))},An.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=ye(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),
-u.push(e))}return ur(n,u),r},An.rest=function(n,t){if(typeof n!="function")throw new ti("Expected a function");return t=t===T?t:Eu(t),fr(n,t)},An.reverse=Ge,An.sampleSize=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),(ff(n)?et:ar)(n,t)},An.set=function(n,t,r){return null==n?n:lr(n,t,r)},An.setWith=function(n,t,r,e){return e=typeof e=="function"?e:T,null==n?n:lr(n,t,r,e)},An.shuffle=function(n){return(ff(n)?ut:sr)(n)},An.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&Oe(n,t,r)?(t=0,
-r=e):(t=null==t?0:Eu(t),r=r===T?e:Eu(r)),hr(n,t,r)):[]},An.sortBy=Ko,An.sortedUniq=function(n){return n&&n.length?gr(n):[]},An.sortedUniqBy=function(n,t){return n&&n.length?gr(n,ye(t,2)):[]},An.split=function(n,t,r){return r&&typeof r!="number"&&Oe(n,t,r)&&(t=r=T),r=r===T?4294967295:r>>>0,r?(n=Iu(n))&&(typeof t=="string"||null!=t&&!hf(t))&&(t=yr(t),!t&&Rn.test(n))?Or(M(n),0,r):n.split(t,r):[]},An.spread=function(t,r){if(typeof t!="function")throw new ti("Expected a function");return r=null==r?0:Ui(Eu(r),0),
-fr(function(e){var u=e[r];return e=Or(e,0,r),u&&a(e,u),n(t,this,e)})},An.tail=function(n){var t=null==n?0:n.length;return t?hr(n,1,t):[]},An.take=function(n,t,r){return n&&n.length?(t=r||t===T?1:Eu(t),hr(n,0,0>t?0:t)):[]},An.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===T?1:Eu(t),t=e-t,hr(n,0>t?0:t,e)):[]},An.takeRightWhile=function(n,t){return n&&n.length?jr(n,ye(t,3),false,true):[]},An.takeWhile=function(n,t){return n&&n.length?jr(n,ye(t,3)):[]},An.tap=function(n,t){return t(n),
-n},An.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ti("Expected a function");return du(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),fu(n,t,{leading:e,maxWait:t,trailing:u})},An.thru=Qe,An.toArray=mu,An.toPairs=zf,An.toPairsIn=Wf,An.toPath=function(n){return ff(n)?c(n,Me):wu(n)?[n]:Ur(jo(Iu(n)))},An.toPlainObject=Ou,An.transform=function(n,t,e){var u=ff(n),i=u||af(n)||_f(n);if(t=ye(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:du(n)&&_u(o)?eo(di(n)):{};
-}return(i?r:mt)(n,function(n,r,u){return t(e,n,r,u)}),e},An.unary=function(n){return eu(n,1)},An.union=Ro,An.unionBy=zo,An.unionWith=Wo,An.uniq=function(n){return n&&n.length?br(n):[]},An.uniqBy=function(n,t){return n&&n.length?br(n,ye(t,2)):[]},An.uniqWith=function(n,t){return t=typeof t=="function"?t:T,n&&n.length?br(n,T,t):[]},An.unset=function(n,t){return null==n||xr(n,t)},An.unzip=He,An.unzipWith=Je,An.update=function(n,t,r){return null==n?n:lr(n,t,kr(r)(kt(n,t)),void 0)},An.updateWith=function(n,t,r,e){
-return e=typeof e=="function"?e:T,null!=n&&(n=lr(n,t,kr(r)(kt(n,t)),e)),n},An.values=Uu,An.valuesIn=function(n){return null==n?[]:S(n,Bu(n))},An.without=Bo,An.words=Mu,An.wrap=function(n,t){return nf(kr(t),n)},An.xor=Lo,An.xorBy=Uo,An.xorWith=Co,An.zip=Do,An.zipObject=function(n,t){return Ar(n||[],t||[],ot)},An.zipObjectDeep=function(n,t){return Ar(n||[],t||[],lr)},An.zipWith=Mo,An.entries=zf,An.entriesIn=Wf,An.extend=yf,An.extendWith=bf,Nu(An,An),An.add=Qf,An.attempt=Ff,An.camelCase=Bf,An.capitalize=Cu,
-An.ceil=Xf,An.clamp=function(n,t,r){return r===T&&(r=t,t=T),r!==T&&(r=Su(r),r=r===r?r:0),t!==T&&(t=Su(t),t=t===t?t:0),pt(Su(n),t,r)},An.clone=function(n){return _t(n,4)},An.cloneDeep=function(n){return _t(n,5)},An.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,5,t)},An.cloneWith=function(n,t){return t=typeof t=="function"?t:T,_t(n,4,t)},An.conformsTo=function(n,t){return null==t||gt(n,t,Wu(t))},An.deburr=Du,An.defaultTo=function(n,t){return null==n||n!==n?t:n},An.divide=nc,An.endsWith=function(n,t,r){
-n=Iu(n),t=yr(t);var e=n.length,e=r=r===T?e:pt(Eu(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},An.eq=lu,An.escape=function(n){return(n=Iu(n))&&H.test(n)?n.replace(K,nt):n},An.escapeRegExp=function(n){return(n=Iu(n))&&en.test(n)?n.replace(rn,"\\$&"):n},An.every=function(n,t,r){var e=ff(n)?u:bt;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.find=Fo,An.findIndex=Ne,An.findKey=function(n,t){return p(n,ye(t,3),mt)},An.findLast=No,An.findLastIndex=Pe,An.findLastKey=function(n,t){return p(n,ye(t,3),At);
-},An.floor=tc,An.forEach=nu,An.forEachRight=tu,An.forIn=function(n,t){return null==n?n:oo(n,ye(t,3),Bu)},An.forInRight=function(n,t){return null==n?n:fo(n,ye(t,3),Bu)},An.forOwn=function(n,t){return n&&mt(n,ye(t,3))},An.forOwnRight=function(n,t){return n&&At(n,ye(t,3))},An.get=Ru,An.gt=ef,An.gte=uf,An.has=function(n,t){return null!=n&&we(n,t,Rt)},An.hasIn=zu,An.head=qe,An.identity=$u,An.includes=function(n,t,r,e){return n=su(n)?n:Uu(n),r=r&&!e?Eu(r):0,e=n.length,0>r&&(r=Ui(e+r,0)),ju(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<v(n,t,r);
-},An.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Eu(r),0>r&&(r=Ui(e+r,0)),v(n,t,r)):-1},An.inRange=function(n,t,r){return t=Au(t),r===T?(r=t,t=0):r=Au(r),n=Su(n),n>=Ci(t,r)&&n<Ui(t,r)},An.invoke=kf,An.isArguments=of,An.isArray=ff,An.isArrayBuffer=cf,An.isArrayLike=su,An.isArrayLikeObject=hu,An.isBoolean=function(n){return true===n||false===n||yu(n)&&"[object Boolean]"==Ot(n)},An.isBuffer=af,An.isDate=lf,An.isElement=function(n){return yu(n)&&1===n.nodeType&&!xu(n)},An.isEmpty=function(n){
-if(null==n)return true;if(su(n)&&(ff(n)||typeof n=="string"||typeof n.splice=="function"||af(n)||_f(n)||of(n)))return!n.length;var t=vo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(ze(n))return!Vt(n).length;for(var r in n)if(oi.call(n,r))return false;return true},An.isEqual=function(n,t){return Mt(n,t)},An.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:T)?r(n,t):T;return e===T?Mt(n,t,T,r):!!e},An.isError=pu,An.isFinite=function(n){return typeof n=="number"&&Wi(n)},An.isFunction=_u,
-An.isInteger=vu,An.isLength=gu,An.isMap=sf,An.isMatch=function(n,t){return n===t||$t(n,t,xe(t))},An.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:T,$t(n,t,xe(t),r)},An.isNaN=function(n){return bu(n)&&n!=+n},An.isNative=function(n){if(go(n))throw new Hu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ft(n)},An.isNil=function(n){return null==n},An.isNull=function(n){return null===n},An.isNumber=bu,An.isObject=du,An.isObjectLike=yu,An.isPlainObject=xu,An.isRegExp=hf,
-An.isSafeInteger=function(n){return vu(n)&&-9007199254740991<=n&&9007199254740991>=n},An.isSet=pf,An.isString=ju,An.isSymbol=wu,An.isTypedArray=_f,An.isUndefined=function(n){return n===T},An.isWeakMap=function(n){return yu(n)&&"[object WeakMap]"==vo(n)},An.isWeakSet=function(n){return yu(n)&&"[object WeakSet]"==Ot(n)},An.join=function(n,t){return null==n?"":Bi.call(n,t)},An.kebabCase=Lf,An.last=Ve,An.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==T&&(u=Eu(r),u=0>u?Ui(e+u,0):Ci(u,e-1)),
-t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=_(n,d,u,true);return n},An.lowerCase=Uf,An.lowerFirst=Cf,An.lt=vf,An.lte=gf,An.max=function(n){return n&&n.length?xt(n,$u,It):T},An.maxBy=function(n,t){return n&&n.length?xt(n,ye(t,2),It):T},An.mean=function(n){return y(n,$u)},An.meanBy=function(n,t){return y(n,ye(t,2))},An.min=function(n){return n&&n.length?xt(n,$u,Kt):T},An.minBy=function(n,t){return n&&n.length?xt(n,ye(t,2),Kt):T},An.stubArray=qu,An.stubFalse=Vu,An.stubObject=function(){return{}},An.stubString=function(){
-return""},An.stubTrue=function(){return true},An.multiply=rc,An.nth=function(n,t){return n&&n.length?Qt(n,Eu(t)):T},An.noConflict=function(){return $n._===this&&($n._=si),this},An.noop=Pu,An.now=Go,An.pad=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return!t||e>=t?n:(t=(t-e)/2,ne(Ii(t),r)+n+ne(Oi(t),r))},An.padEnd=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&e<t?n+ne(t-e,r):n},An.padStart=function(n,t,r){n=Iu(n);var e=(t=Eu(t))?D(n):0;return t&&e<t?ne(t-e,r)+n:n},An.parseInt=function(n,t,r){
-return r||null==t?t=0:t&&(t=+t),Mi(Iu(n).replace(on,""),t||0)},An.random=function(n,t,r){if(r&&typeof r!="boolean"&&Oe(n,t,r)&&(t=r=T),r===T&&(typeof t=="boolean"?(r=t,t=T):typeof n=="boolean"&&(r=n,n=T)),n===T&&t===T?(n=0,t=1):(n=Au(n),t===T?(t=n,n=0):t=Au(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Ti(),Ci(n+r*(t-n+Cn("1e-"+((r+"").length-1))),t)):ir(n,t)},An.reduce=function(n,t,r){var e=ff(n)?l:j,u=3>arguments.length;return e(n,ye(t,4),r,u,uo)},An.reduceRight=function(n,t,r){var e=ff(n)?s:j,u=3>arguments.length;
-return e(n,ye(t,4),r,u,io)},An.repeat=function(n,t,r){return t=(r?Oe(n,t,r):t===T)?1:Eu(t),or(Iu(n),t)},An.replace=function(){var n=arguments,t=Iu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},An.result=function(n,t,r){t=Sr(t,n);var e=-1,u=t.length;for(u||(u=1,n=T);++e<u;){var i=null==n?T:n[Me(t[e])];i===T&&(e=u,i=r),n=_u(i)?i.call(n):i}return n},An.round=ec,An.runInContext=x,An.sample=function(n){return(ff(n)?Qn:cr)(n)},An.size=function(n){if(null==n)return 0;if(su(n))return ju(n)?D(n):n.length;
-var t=vo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Vt(n).length},An.snakeCase=Df,An.some=function(n,t,r){var e=ff(n)?h:pr;return r&&Oe(n,t,r)&&(t=T),e(n,ye(t,3))},An.sortedIndex=function(n,t){return _r(n,t)},An.sortedIndexBy=function(n,t,r){return vr(n,t,ye(r,2))},An.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){var e=_r(n,t);if(e<r&&lu(n[e],t))return e}return-1},An.sortedLastIndex=function(n,t){return _r(n,t,true)},An.sortedLastIndexBy=function(n,t,r){return vr(n,t,ye(r,2),true);
-},An.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=_r(n,t,true)-1;if(lu(n[r],t))return r}return-1},An.startCase=Mf,An.startsWith=function(n,t,r){return n=Iu(n),r=null==r?0:pt(Eu(r),0,n.length),t=yr(t),n.slice(r,r+t.length)==t},An.subtract=uc,An.sum=function(n){return n&&n.length?m(n,$u):0},An.sumBy=function(n,t){return n&&n.length?m(n,ye(t,2)):0},An.template=function(n,t,r){var e=An.templateSettings;r&&Oe(n,t,r)&&(t=T),n=Iu(n),t=bf({},t,e,ce),r=bf({},t.imports,e.imports,ce);var u,i,o=Wu(r),f=S(r,o),c=0;
-r=t.interpolate||jn;var a="__p+='";r=Xu((t.escape||jn).source+"|"+r.source+"|"+(r===Q?pn:jn).source+"|"+(t.evaluate||jn).source+"|$","g");var l=oi.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(wn,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=oi.call(t,"variable")&&t.variable)||(a="with(obj){"+a+"}"),
-a=(i?a.replace(P,""):a).replace(Z,"$1").replace(q,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Ff(function(){return Ju(o,l+"return "+a).apply(T,f)}),t.source=a,pu(t))throw t;return t},An.times=function(n,t){if(n=Eu(n),1>n||9007199254740991<n)return[];var r=4294967295,e=Ci(n,4294967295);for(t=ye(t),n-=4294967295,e=A(e,t);++r<n;)t(r);return e},An.toFinite=Au,
-An.toInteger=Eu,An.toLength=ku,An.toLower=function(n){return Iu(n).toLowerCase()},An.toNumber=Su,An.toSafeInteger=function(n){return n?pt(Eu(n),-9007199254740991,9007199254740991):0===n?n:0},An.toString=Iu,An.toUpper=function(n){return Iu(n).toUpperCase()},An.trim=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(un,""):n&&(t=yr(t))?(n=M(n),r=M(t),t=I(n,r),r=R(n,r)+1,Or(n,t,r).join("")):n},An.trimEnd=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(fn,""):n&&(t=yr(t))?(n=M(n),t=R(n,M(t))+1,
-Or(n,0,t).join("")):n},An.trimStart=function(n,t,r){return(n=Iu(n))&&(r||t===T)?n.replace(on,""):n&&(t=yr(t))?(n=M(n),t=I(n,M(t)),Or(n,t).join("")):n},An.truncate=function(n,t){var r=30,e="...";if(du(t))var u="separator"in t?t.separator:u,r="length"in t?Eu(t.length):r,e="omission"in t?yr(t.omission):e;n=Iu(n);var i=n.length;if(Rn.test(n))var o=M(n),i=o.length;if(r>=i)return n;if(i=r-D(e),1>i)return e;if(r=o?Or(o,0,i).join(""):n.slice(0,i),u===T)return r+e;if(o&&(i+=r.length-i),hf(u)){if(n.slice(i).search(u)){
-var f=r;for(u.global||(u=Xu(u.source,Iu(_n.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===T?i:c)}}else n.indexOf(yr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},An.unescape=function(n){return(n=Iu(n))&&G.test(n)?n.replace(V,tt):n},An.uniqueId=function(n){var t=++fi;return Iu(n)+t},An.upperCase=Tf,An.upperFirst=$f,An.each=nu,An.eachRight=tu,An.first=qe,Nu(An,function(){var n={};return mt(An,function(t,r){oi.call(An.prototype,r)||(n[r]=t)}),n}(),{chain:false
-}),An.VERSION="4.17.15",r("bind bindKey curry curryRight partial partialRight".split(" "),function(n){An[n].placeholder=An}),r(["drop","take"],function(n,t){Un.prototype[n]=function(r){r=r===T?1:Ui(Eu(r),0);var e=this.__filtered__&&!t?new Un(this):this.clone();return e.__filtered__?e.__takeCount__=Ci(r,e.__takeCount__):e.__views__.push({size:Ci(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Un.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){
-var r=t+1,e=1==r||3==r;Un.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:ye(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){var r="take"+(t?"Right":"");Un.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Un.prototype[n]=function(){return this.__filtered__?new Un(this):this[r](1)}}),Un.prototype.compact=function(){return this.filter($u)},Un.prototype.find=function(n){
-return this.filter(n).head()},Un.prototype.findLast=function(n){return this.reverse().find(n)},Un.prototype.invokeMap=fr(function(n,t){return typeof n=="function"?new Un(this):this.map(function(r){return Lt(r,n,t)})}),Un.prototype.reject=function(n){return this.filter(au(ye(n)))},Un.prototype.slice=function(n,t){n=Eu(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Un(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==T&&(t=Eu(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Un.prototype.takeRightWhile=function(n){
-return this.reverse().takeWhile(n).reverse()},Un.prototype.toArray=function(){return this.take(4294967295)},mt(Un.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=An[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(An.prototype[t]=function(){function t(n){return n=u.apply(An,a([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Un,l=f[0],s=c||ff(o);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=i&&!h,c=c&&!p;
-return!i&&s?(o=c?o:new Un(this),o=n.apply(o,f),o.__actions__.push({func:Qe,args:[t],thisArg:T}),new On(o,h)):l&&c?n.apply(this,f):(o=this.thru(t),l?e?o.value()[0]:o.value():o)})}),r("pop push shift sort splice unshift".split(" "),function(n){var t=ri[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);An.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(ff(u)?u:[],n)}return this[r](function(r){return t.apply(ff(r)?r:[],n)});
-}}),mt(Un.prototype,function(n,t){var r=An[t];if(r){var e=r.name+"";oi.call(Gi,e)||(Gi[e]=[]),Gi[e].push({name:t,func:r})}}),Gi[Jr(T,2).name]=[{name:"wrapper",func:T}],Un.prototype.clone=function(){var n=new Un(this.__wrapped__);return n.__actions__=Ur(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Ur(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Ur(this.__views__),n},Un.prototype.reverse=function(){if(this.__filtered__){var n=new Un(this);
-n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Un.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=ff(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Ci(n,f+s);break;case"takeRight":f=Ui(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Ci(n,this.__takeCount__),!e||!u&&i==n&&l==n)return wr(t,this.__actions__);
-e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},An.prototype.at=To,An.prototype.chain=function(){return Ye(this)},An.prototype.commit=function(){return new On(this.value(),this.__chain__)},An.prototype.next=function(){this.__values__===T&&(this.__values__=mu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?T:this.__values__[this.__index__++]}},An.prototype.plant=function(n){
-for(var t,r=this;r instanceof En;){var e=Fe(r);e.__index__=0,e.__values__=T,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},An.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Un?(this.__actions__.length&&(n=new Un(this)),n=n.reverse(),n.__actions__.push({func:Qe,args:[Ge],thisArg:T}),new On(n,this.__chain__)):this.thru(Ge)},An.prototype.toJSON=An.prototype.valueOf=An.prototype.value=function(){return wr(this.__wrapped__,this.__actions__)},An.prototype.first=An.prototype.head,
-wi&&(An.prototype[wi]=Xe),An}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($n._=rt, define(function(){return rt})):Nn?((Nn.exports=rt)._=rt,Fn._=rt):$n._=rt}).call(this); \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/matches.js b/tools/node_modules/babel-eslint/node_modules/lodash/matches.js
deleted file mode 100644
index 11145db37f4..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/matches.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var baseClone = require('./_baseClone'),
- baseMatches = require('./_baseMatches');
-
-/** Used to compose bitmasks for cloning. */
-var CLONE_DEEP_FLAG = 1;
-
-/**
- * Creates a function that performs a partial deep comparison between a given
- * object and `source`, returning `true` if the given object has equivalent
- * property values, else `false`.
- *
- * **Note:** The created function is equivalent to `_.isMatch` with `source`
- * partially applied.
- *
- * Partial comparisons will match empty array and empty object `source`
- * values against any array or object value, respectively. See `_.isEqual`
- * for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Util
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 1, 'b': 2, 'c': 3 },
- * { 'a': 4, 'b': 5, 'c': 6 }
- * ];
- *
- * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
- * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
- */
-function matches(source) {
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
-}
-
-module.exports = matches;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js b/tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js
deleted file mode 100644
index cc062ac9937..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/matchesProperty.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var baseClone = require('./_baseClone'),
- baseMatchesProperty = require('./_baseMatchesProperty');
-
-/** Used to compose bitmasks for cloning. */
-var CLONE_DEEP_FLAG = 1;
-
-/**
- * Creates a function that performs a partial deep comparison between the
- * value at `path` of a given object to `srcValue`, returning `true` if the
- * object value is equivalent, else `false`.
- *
- * **Note:** Partial comparisons will match empty array and empty object
- * `srcValue` values against any array or object value, respectively. See
- * `_.isEqual` for a list of supported value comparisons.
- *
- * @static
- * @memberOf _
- * @since 3.2.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- * @example
- *
- * var objects = [
- * { 'a': 1, 'b': 2, 'c': 3 },
- * { 'a': 4, 'b': 5, 'c': 6 }
- * ];
- *
- * _.find(objects, _.matchesProperty('a', 4));
- * // => { 'a': 4, 'b': 5, 'c': 6 }
- */
-function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
-}
-
-module.exports = matchesProperty;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js b/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js
deleted file mode 100644
index c115d15384c..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/overEvery.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var arrayEvery = require('./_arrayEvery'),
- createOver = require('./_createOver');
-
-/**
- * Creates a function that checks if **all** of the `predicates` return
- * truthy when invoked with the arguments it receives.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {...(Function|Function[])} [predicates=[_.identity]]
- * The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overEvery([Boolean, isFinite]);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => false
- *
- * func(NaN);
- * // => false
- */
-var overEvery = createOver(arrayEvery);
-
-module.exports = overEvery;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js b/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js
deleted file mode 100644
index f902907a954..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/overSome.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var arraySome = require('./_arraySome'),
- createOver = require('./_createOver');
-
-/**
- * Creates a function that checks if **any** of the `predicates` return
- * truthy when invoked with the arguments it receives.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Util
- * @param {...(Function|Function[])} [predicates=[_.identity]]
- * The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overSome([Boolean, isFinite]);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => true
- *
- * func(NaN);
- * // => false
- */
-var overSome = createOver(arraySome);
-
-module.exports = overSome;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/package.json b/tools/node_modules/babel-eslint/node_modules/lodash/package.json
deleted file mode 100644
index ccf80be0796..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "author": {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/lodash/lodash/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "John-David Dalton",
- "email": "john.david.dalton@gmail.com"
- },
- {
- "name": "Mathias Bynens",
- "email": "mathias@qiwi.be"
- }
- ],
- "deprecated": false,
- "description": "Lodash modular utilities.",
- "homepage": "https://lodash.com/",
- "icon": "https://lodash.com/icon.svg",
- "keywords": [
- "modules",
- "stdlib",
- "util"
- ],
- "license": "MIT",
- "main": "lodash.js",
- "name": "lodash",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/lodash/lodash.git"
- },
- "scripts": {
- "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\""
- },
- "version": "4.17.15"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js b/tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js
deleted file mode 100644
index 4ba8f7a0ed9..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/sortBy.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var baseFlatten = require('./_baseFlatten'),
- baseOrderBy = require('./_baseOrderBy'),
- baseRest = require('./_baseRest'),
- isIterateeCall = require('./_isIterateeCall');
-
-/**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection thru each iteratee. This method
- * performs a stable sort, that is, it preserves the original sort order of
- * equal elements. The iteratees are invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {...(Function|Function[])} [iteratees=[_.identity]]
- * The iteratees to sort by.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.sortBy(users, [function(o) { return o.user; }]);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
- *
- * _.sortBy(users, ['user', 'age']);
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
- */
-var sortBy = baseRest(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var length = iteratees.length;
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
- iteratees = [];
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
- iteratees = [iteratees[0]];
- }
- return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
-});
-
-module.exports = sortBy;
diff --git a/tools/node_modules/babel-eslint/node_modules/lodash/template.js b/tools/node_modules/babel-eslint/node_modules/lodash/template.js
deleted file mode 100644
index f71d1302498..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/lodash/template.js
+++ /dev/null
@@ -1,253 +0,0 @@
-var assignInWith = require('./assignInWith'),
- attempt = require('./attempt'),
- baseValues = require('./_baseValues'),
- customDefaultsAssignIn = require('./_customDefaultsAssignIn'),
- escapeStringChar = require('./_escapeStringChar'),
- isError = require('./isError'),
- isIterateeCall = require('./_isIterateeCall'),
- keys = require('./keys'),
- reInterpolate = require('./_reInterpolate'),
- templateSettings = require('./templateSettings'),
- toString = require('./toString');
-
-/** Used to match empty string literals in compiled template source. */
-var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
-/**
- * Used to match
- * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
- */
-var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
-/** Used to ensure capturing order of template delimiters. */
-var reNoMatch = /($^)/;
-
-/** Used to match unescaped characters in compiled string literals. */
-var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is given, it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options={}] The options object.
- * @param {RegExp} [options.escape=_.templateSettings.escape]
- * The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
- * The "evaluate" delimiter.
- * @param {Object} [options.imports=_.templateSettings.imports]
- * An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
- * The "interpolate" delimiter.
- * @param {string} [options.sourceURL='templateSources[n]']
- * The sourceURL of the compiled template.
- * @param {string} [options.variable='obj']
- * The data object variable name.
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // Use the "interpolate" delimiter to create a compiled template.
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // Use the HTML "escape" delimiter to escape data property values.
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the internal `print` function in "evaluate" delimiters.
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // Use the ES template literal delimiter as an "interpolate" delimiter.
- * // Disable support by replacing the "interpolate" delimiter.
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // Use backslashes to treat delimiters as plain text.
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // Use the `imports` option to import `jQuery` as `jq`.
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the `sourceURL` option to specify a custom sourceURL for the template.
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
- *
- * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // Use custom template delimiters.
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // Use the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and stack traces.
- * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
-function template(string, options, guard) {
- // Based on John Resig's `tmpl` implementation
- // (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = templateSettings.imports._.templateSettings || templateSettings;
-
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- string = toString(string);
- options = assignInWith({}, options, settings, customDefaultsAssignIn);
-
- var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- // The sourceURL gets injected into the source that's eval-ed, so be careful
- // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
- // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
- var sourceURL = hasOwnProperty.call(options, 'sourceURL')
- ? ('//# sourceURL=' +
- (options.sourceURL + '').replace(/[\r\n]/g, ' ') +
- '\n')
- : '';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products needs `match` returned in
- // order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- // Like with sourceURL, we take care to not check the option's prototype,
- // as this configuration is a code injection vector.
- var variable = hasOwnProperty.call(options, 'variable') && options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source)
- .apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
-}
-
-module.exports = template;
diff --git a/tools/node_modules/babel-eslint/node_modules/ms/package.json b/tools/node_modules/babel-eslint/node_modules/ms/package.json
deleted file mode 100644
index 7192a30c57c..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/ms/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "bugs": {
- "url": "https://github.com/zeit/ms/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Tiny millisecond conversion utility",
- "devDependencies": {
- "eslint": "4.12.1",
- "expect.js": "0.3.1",
- "husky": "0.14.3",
- "lint-staged": "5.0.0",
- "mocha": "4.0.1"
- },
- "eslintConfig": {
- "extends": "eslint:recommended",
- "env": {
- "node": true,
- "es6": true
- }
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/zeit/ms#readme",
- "license": "MIT",
- "lint-staged": {
- "*.js": [
- "npm run lint",
- "prettier --single-quote --write",
- "git add"
- ]
- },
- "main": "./index",
- "name": "ms",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zeit/ms.git"
- },
- "scripts": {
- "lint": "eslint lib/* bin/*",
- "precommit": "lint-staged",
- "test": "mocha tests.js"
- },
- "version": "2.1.2"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/path-parse/package.json b/tools/node_modules/babel-eslint/node_modules/path-parse/package.json
deleted file mode 100644
index 49b06b41427..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/path-parse/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "author": {
- "name": "Javier Blanco",
- "email": "http://jbgutierrez.info"
- },
- "bugs": {
- "url": "https://github.com/jbgutierrez/path-parse/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Node.js path.parse() ponyfill",
- "homepage": "https://github.com/jbgutierrez/path-parse#readme",
- "keywords": [
- "path",
- "paths",
- "file",
- "dir",
- "parse",
- "built-in",
- "util",
- "utils",
- "core",
- "ponyfill",
- "polyfill",
- "shim"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "path-parse",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jbgutierrez/path-parse.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.6"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/index.js b/tools/node_modules/babel-eslint/node_modules/resolve/index.js
deleted file mode 100644
index eb6ba89e6c2..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var core = require('./lib/core');
-var async = require('./lib/async');
-async.core = core;
-async.isCore = function isCore(x) { return core[x]; };
-async.sync = require('./lib/sync');
-
-exports = async;
-module.exports = async;
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js
deleted file mode 100644
index 004b2798baf..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/async.js
+++ /dev/null
@@ -1,271 +0,0 @@
-var core = require('./core');
-var fs = require('fs');
-var path = require('path');
-var caller = require('./caller.js');
-var nodeModulesPaths = require('./node-modules-paths.js');
-var normalizeOptions = require('./normalize-options.js');
-
-var defaultIsFile = function isFile(file, cb) {
- fs.stat(file, function (err, stat) {
- if (!err) {
- return cb(null, stat.isFile() || stat.isFIFO());
- }
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
- return cb(err);
- });
-};
-
-var defaultIsDir = function isDirectory(dir, cb) {
- fs.stat(dir, function (err, stat) {
- if (!err) {
- return cb(null, stat.isDirectory());
- }
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
- return cb(err);
- });
-};
-
-var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
- if (opts && opts.preserveSymlinks === false) {
- fs.realpath(x, function (realPathErr, realPath) {
- if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
- else cb(null, realPathErr ? x : realPath);
- });
- } else {
- cb(null, x);
- }
-};
-
-module.exports = function resolve(x, options, callback) {
- var cb = callback;
- var opts = options;
- if (typeof options === 'function') {
- cb = opts;
- opts = {};
- }
- if (typeof x !== 'string') {
- var err = new TypeError('Path must be a string.');
- return process.nextTick(function () {
- cb(err);
- });
- }
-
- opts = normalizeOptions(x, opts);
-
- var isFile = opts.isFile || defaultIsFile;
- var isDirectory = opts.isDirectory || defaultIsDir;
- var readFile = opts.readFile || fs.readFile;
-
- var extensions = opts.extensions || ['.js'];
- var basedir = opts.basedir || path.dirname(caller());
- var parent = opts.filename || basedir;
-
- opts.paths = opts.paths || [];
-
- // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
- var absoluteStart = path.resolve(basedir);
-
- maybeUnwrapSymlink(
- absoluteStart,
- opts,
- function (err, realStart) {
- if (err) cb(err);
- else init(realStart);
- }
- );
-
- var res;
- function init(basedir) {
- if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
- res = path.resolve(basedir, x);
- if (x === '..' || x.slice(-1) === '/') res += '/';
- if ((/\/$/).test(x) && res === basedir) {
- loadAsDirectory(res, opts.package, onfile);
- } else loadAsFile(res, opts.package, onfile);
- } else loadNodeModules(x, basedir, function (err, n, pkg) {
- if (err) cb(err);
- else if (core[x]) return cb(null, x);
- else if (n) {
- return maybeUnwrapSymlink(n, opts, function (err, realN) {
- if (err) {
- cb(err);
- } else {
- cb(null, realN, pkg);
- }
- });
- } else {
- var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
- moduleError.code = 'MODULE_NOT_FOUND';
- cb(moduleError);
- }
- });
- }
-
- function onfile(err, m, pkg) {
- if (err) cb(err);
- else if (m) cb(null, m, pkg);
- else loadAsDirectory(res, function (err, d, pkg) {
- if (err) cb(err);
- else if (d) {
- maybeUnwrapSymlink(d, opts, function (err, realD) {
- if (err) {
- cb(err);
- } else {
- cb(null, realD, pkg);
- }
- });
- } else {
- var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
- moduleError.code = 'MODULE_NOT_FOUND';
- cb(moduleError);
- }
- });
- }
-
- function loadAsFile(x, thePackage, callback) {
- var loadAsFilePackage = thePackage;
- var cb = callback;
- if (typeof loadAsFilePackage === 'function') {
- cb = loadAsFilePackage;
- loadAsFilePackage = undefined;
- }
-
- var exts = [''].concat(extensions);
- load(exts, x, loadAsFilePackage);
-
- function load(exts, x, loadPackage) {
- if (exts.length === 0) return cb(null, undefined, loadPackage);
- var file = x + exts[0];
-
- var pkg = loadPackage;
- if (pkg) onpkg(null, pkg);
- else loadpkg(path.dirname(file), onpkg);
-
- function onpkg(err, pkg_, dir) {
- pkg = pkg_;
- if (err) return cb(err);
- if (dir && pkg && opts.pathFilter) {
- var rfile = path.relative(dir, file);
- var rel = rfile.slice(0, rfile.length - exts[0].length);
- var r = opts.pathFilter(pkg, x, rel);
- if (r) return load(
- [''].concat(extensions.slice()),
- path.resolve(dir, r),
- pkg
- );
- }
- isFile(file, onex);
- }
- function onex(err, ex) {
- if (err) return cb(err);
- if (ex) return cb(null, file, pkg);
- load(exts.slice(1), x, pkg);
- }
- }
- }
-
- function loadpkg(dir, cb) {
- if (dir === '' || dir === '/') return cb(null);
- if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
- return cb(null);
- }
- if ((/[/\\]node_modules[/\\]*$/).test(dir)) return cb(null);
-
- var pkgfile = path.join(dir, 'package.json');
- isFile(pkgfile, function (err, ex) {
- // on err, ex is false
- if (!ex) return loadpkg(path.dirname(dir), cb);
-
- readFile(pkgfile, function (err, body) {
- if (err) cb(err);
- try { var pkg = JSON.parse(body); } catch (jsonErr) {}
-
- if (pkg && opts.packageFilter) {
- pkg = opts.packageFilter(pkg, pkgfile);
- }
- cb(null, pkg, dir);
- });
- });
- }
-
- function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
- var cb = callback;
- var fpkg = loadAsDirectoryPackage;
- if (typeof fpkg === 'function') {
- cb = fpkg;
- fpkg = opts.package;
- }
-
- var pkgfile = path.join(x, 'package.json');
- isFile(pkgfile, function (err, ex) {
- if (err) return cb(err);
- if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
-
- readFile(pkgfile, function (err, body) {
- if (err) return cb(err);
- try {
- var pkg = JSON.parse(body);
- } catch (jsonErr) {}
-
- if (opts.packageFilter) {
- pkg = opts.packageFilter(pkg, pkgfile);
- }
-
- if (pkg.main) {
- if (typeof pkg.main !== 'string') {
- var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
- mainError.code = 'INVALID_PACKAGE_MAIN';
- return cb(mainError);
- }
- if (pkg.main === '.' || pkg.main === './') {
- pkg.main = 'index';
- }
- loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
- if (err) return cb(err);
- if (m) return cb(null, m, pkg);
- if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
-
- var dir = path.resolve(x, pkg.main);
- loadAsDirectory(dir, pkg, function (err, n, pkg) {
- if (err) return cb(err);
- if (n) return cb(null, n, pkg);
- loadAsFile(path.join(x, 'index'), pkg, cb);
- });
- });
- return;
- }
-
- loadAsFile(path.join(x, '/index'), pkg, cb);
- });
- });
- }
-
- function processDirs(cb, dirs) {
- if (dirs.length === 0) return cb(null, undefined);
- var dir = dirs[0];
-
- isDirectory(dir, isdir);
-
- function isdir(err, isdir) {
- if (err) return cb(err);
- if (!isdir) return processDirs(cb, dirs.slice(1));
- var file = path.join(dir, x);
- loadAsFile(file, opts.package, onfile);
- }
-
- function onfile(err, m, pkg) {
- if (err) return cb(err);
- if (m) return cb(null, m, pkg);
- loadAsDirectory(path.join(dir, x), opts.package, ondir);
- }
-
- function ondir(err, n, pkg) {
- if (err) return cb(err);
- if (n) return cb(null, n, pkg);
- processDirs(cb, dirs.slice(1));
- }
- }
- function loadNodeModules(x, start, cb) {
- processDirs(cb, nodeModulesPaths(start, opts, x));
- }
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js
deleted file mode 100644
index 0877650ccad..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];
-
-function specifierIncluded(specifier) {
- var parts = specifier.split(' ');
- var op = parts.length > 1 ? parts[0] : '=';
- var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
-
- for (var i = 0; i < 3; ++i) {
- var cur = Number(current[i] || 0);
- var ver = Number(versionParts[i] || 0);
- if (cur === ver) {
- continue; // eslint-disable-line no-restricted-syntax, no-continue
- }
- if (op === '<') {
- return cur < ver;
- } else if (op === '>=') {
- return cur >= ver;
- } else {
- return false;
- }
- }
- return op === '>=';
-}
-
-function matchesRange(range) {
- var specifiers = range.split(/ ?&& ?/);
- if (specifiers.length === 0) { return false; }
- for (var i = 0; i < specifiers.length; ++i) {
- if (!specifierIncluded(specifiers[i])) { return false; }
- }
- return true;
-}
-
-function versionIncluded(specifierValue) {
- if (typeof specifierValue === 'boolean') { return specifierValue; }
- if (specifierValue && typeof specifierValue === 'object') {
- for (var i = 0; i < specifierValue.length; ++i) {
- if (matchesRange(specifierValue[i])) { return true; }
- }
- return false;
- }
- return matchesRange(specifierValue);
-}
-
-var data = require('./core.json');
-
-var core = {};
-for (var mod in data) { // eslint-disable-line no-restricted-syntax
- if (Object.prototype.hasOwnProperty.call(data, mod)) {
- core[mod] = versionIncluded(data[mod]);
- }
-}
-module.exports = core;
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json b/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json
deleted file mode 100644
index 12a6ac7e6c3..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/core.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "assert": true,
- "async_hooks": ">= 8",
- "buffer_ieee754": "< 0.9.7",
- "buffer": true,
- "child_process": true,
- "cluster": true,
- "console": true,
- "constants": true,
- "crypto": true,
- "_debug_agent": ">= 1 && < 8",
- "_debugger": "< 8",
- "dgram": true,
- "dns": true,
- "domain": true,
- "events": true,
- "freelist": "< 6",
- "fs": true,
- "fs/promises": ">= 10 && < 10.1",
- "_http_agent": ">= 0.11.1",
- "_http_client": ">= 0.11.1",
- "_http_common": ">= 0.11.1",
- "_http_incoming": ">= 0.11.1",
- "_http_outgoing": ">= 0.11.1",
- "_http_server": ">= 0.11.1",
- "http": true,
- "http2": ">= 8.8",
- "https": true,
- "inspector": ">= 8.0.0",
- "_linklist": "< 8",
- "module": true,
- "net": true,
- "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
- "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
- "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
- "os": true,
- "path": true,
- "perf_hooks": ">= 8.5",
- "process": ">= 1",
- "punycode": true,
- "querystring": true,
- "readline": true,
- "repl": true,
- "smalloc": ">= 0.11.5 && < 3",
- "_stream_duplex": ">= 0.9.4",
- "_stream_transform": ">= 0.9.4",
- "_stream_wrap": ">= 1.4.1",
- "_stream_passthrough": ">= 0.9.4",
- "_stream_readable": ">= 0.9.4",
- "_stream_writable": ">= 0.9.4",
- "stream": true,
- "string_decoder": true,
- "sys": true,
- "timers": true,
- "_tls_common": ">= 0.11.13",
- "_tls_legacy": ">= 0.11.3 && < 10",
- "_tls_wrap": ">= 0.11.3",
- "tls": true,
- "trace_events": ">= 10",
- "tty": true,
- "url": true,
- "util": true,
- "v8/tools/arguments": ">= 10 && < 12",
- "v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
- "v8": ">= 1",
- "vm": true,
- "worker_threads": ">= 11.7",
- "zlib": true
-}
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js b/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js
deleted file mode 100644
index e8d83de5b6d..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/lib/sync.js
+++ /dev/null
@@ -1,172 +0,0 @@
-var core = require('./core');
-var fs = require('fs');
-var path = require('path');
-var caller = require('./caller.js');
-var nodeModulesPaths = require('./node-modules-paths.js');
-var normalizeOptions = require('./normalize-options.js');
-
-var defaultIsFile = function isFile(file) {
- try {
- var stat = fs.statSync(file);
- } catch (e) {
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
- throw e;
- }
- return stat.isFile() || stat.isFIFO();
-};
-
-var defaultIsDir = function isDirectory(dir) {
- try {
- var stat = fs.statSync(dir);
- } catch (e) {
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
- throw e;
- }
- return stat.isDirectory();
-};
-
-var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts) {
- if (opts && opts.preserveSymlinks === false) {
- try {
- return fs.realpathSync(x);
- } catch (realPathErr) {
- if (realPathErr.code !== 'ENOENT') {
- throw realPathErr;
- }
- }
- }
- return x;
-};
-
-module.exports = function (x, options) {
- if (typeof x !== 'string') {
- throw new TypeError('Path must be a string.');
- }
- var opts = normalizeOptions(x, options);
-
- var isFile = opts.isFile || defaultIsFile;
- var readFileSync = opts.readFileSync || fs.readFileSync;
- var isDirectory = opts.isDirectory || defaultIsDir;
-
- var extensions = opts.extensions || ['.js'];
- var basedir = opts.basedir || path.dirname(caller());
- var parent = opts.filename || basedir;
-
- opts.paths = opts.paths || [];
-
- // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
- var absoluteStart = maybeUnwrapSymlink(path.resolve(basedir), opts);
-
- if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
- var res = path.resolve(absoluteStart, x);
- if (x === '..' || x.slice(-1) === '/') res += '/';
- var m = loadAsFileSync(res) || loadAsDirectorySync(res);
- if (m) return maybeUnwrapSymlink(m, opts);
- } else if (core[x]) {
- return x;
- } else {
- var n = loadNodeModulesSync(x, absoluteStart);
- if (n) return maybeUnwrapSymlink(n, opts);
- }
-
- if (core[x]) return x;
-
- var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
- err.code = 'MODULE_NOT_FOUND';
- throw err;
-
- function loadAsFileSync(x) {
- var pkg = loadpkg(path.dirname(x));
-
- if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
- var rfile = path.relative(pkg.dir, x);
- var r = opts.pathFilter(pkg.pkg, x, rfile);
- if (r) {
- x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
- }
- }
-
- if (isFile(x)) {
- return x;
- }
-
- for (var i = 0; i < extensions.length; i++) {
- var file = x + extensions[i];
- if (isFile(file)) {
- return file;
- }
- }
- }
-
- function loadpkg(dir) {
- if (dir === '' || dir === '/') return;
- if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) {
- return;
- }
- if ((/[/\\]node_modules[/\\]*$/).test(dir)) return;
-
- var pkgfile = path.join(dir, 'package.json');
-
- if (!isFile(pkgfile)) {
- return loadpkg(path.dirname(dir));
- }
-
- var body = readFileSync(pkgfile);
-
- try {
- var pkg = JSON.parse(body);
- } catch (jsonErr) {}
-
- if (pkg && opts.packageFilter) {
- pkg = opts.packageFilter(pkg, dir);
- }
-
- return { pkg: pkg, dir: dir };
- }
-
- function loadAsDirectorySync(x) {
- var pkgfile = path.join(x, '/package.json');
- if (isFile(pkgfile)) {
- try {
- var body = readFileSync(pkgfile, 'UTF8');
- var pkg = JSON.parse(body);
- } catch (e) {}
-
- if (opts.packageFilter) {
- pkg = opts.packageFilter(pkg, x);
- }
-
- if (pkg.main) {
- if (typeof pkg.main !== 'string') {
- var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
- mainError.code = 'INVALID_PACKAGE_MAIN';
- throw mainError;
- }
- if (pkg.main === '.' || pkg.main === './') {
- pkg.main = 'index';
- }
- try {
- var m = loadAsFileSync(path.resolve(x, pkg.main));
- if (m) return m;
- var n = loadAsDirectorySync(path.resolve(x, pkg.main));
- if (n) return n;
- } catch (e) {}
- }
- }
-
- return loadAsFileSync(path.join(x, '/index'));
- }
-
- function loadNodeModulesSync(x, start) {
- var dirs = nodeModulesPaths(start, opts, x);
- for (var i = 0; i < dirs.length; i++) {
- var dir = dirs[i];
- if (isDirectory(dir)) {
- var m = loadAsFileSync(path.join(dir, '/', x));
- if (m) return m;
- var n = loadAsDirectorySync(path.join(dir, '/', x));
- if (n) return n;
- }
- }
- }
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/package.json b/tools/node_modules/babel-eslint/node_modules/resolve/package.json
deleted file mode 100644
index 95353241e58..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/browserify/resolve/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "path-parse": "^1.0.6"
- },
- "deprecated": false,
- "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
- "devDependencies": {
- "@ljharb/eslint-config": "^13.1.1",
- "eslint": "^5.16.0",
- "object-keys": "^1.1.1",
- "safe-publish-latest": "^1.1.2",
- "tap": "0.4.13",
- "tape": "^4.11.0"
- },
- "homepage": "https://github.com/browserify/resolve#readme",
- "keywords": [
- "resolve",
- "require",
- "node",
- "module"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "resolve",
- "repository": {
- "type": "git",
- "url": "git://github.com/browserify/resolve.git"
- },
- "scripts": {
- "lint": "eslint .",
- "posttest": "npm run test:multirepo",
- "prepublish": "safe-publish-latest",
- "pretest": "npm run lint",
- "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
- "test": "npm run --silent tests-only",
- "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test",
- "tests-only": "tape test/*.js"
- },
- "version": "1.12.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown b/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown
deleted file mode 100644
index f1b27063901..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/resolve/readme.markdown
+++ /dev/null
@@ -1,201 +0,0 @@
-# resolve
-
-implements the [node `require.resolve()`
-algorithm](https://nodejs.org/api/modules.html#modules_all_together)
-such that you can `require.resolve()` on behalf of a file asynchronously and
-synchronously
-
-[![build status](https://secure.travis-ci.org/browserify/node-resolve.png)](http://travis-ci.org/browserify/node-resolve)
-
-# example
-
-asynchronously resolve:
-
-```js
-var resolve = require('resolve');
-resolve('tap', { basedir: __dirname }, function (err, res) {
- if (err) console.error(err);
- else console.log(res);
-});
-```
-
-```
-$ node example/async.js
-/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
-```
-
-synchronously resolve:
-
-```js
-var resolve = require('resolve');
-var res = resolve.sync('tap', { basedir: __dirname });
-console.log(res);
-```
-
-```
-$ node example/sync.js
-/home/substack/projects/node-resolve/node_modules/tap/lib/main.js
-```
-
-# methods
-
-```js
-var resolve = require('resolve');
-```
-
-## resolve(id, opts={}, cb)
-
-Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`.
-
-options are:
-
-* opts.basedir - directory to begin resolving from
-
-* opts.package - `package.json` data applicable to the module being loaded
-
-* opts.extensions - array of file extensions to search in order
-
-* opts.readFile - how to read files asynchronously
-
-* opts.isFile - function to asynchronously test whether a file exists
-
-* opts.isDirectory - function to asynchronously test whether a directory exists
-
-* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json contents before looking at the "main" field
- * pkg - package data
- * pkgfile - path to package.json
-
-* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
- * pkg - package data
- * path - the path being resolved
- * relativePath - the path relative from the package.json location
- * returns - a relative path that will be joined from the package.json location
-
-* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
-
- For advanced users, `paths` can also be a `opts.paths(request, start, opts)` function
- * request - the import specifier being resolved
- * start - lookup path
- * getNodeModulesDirs - a thunk (no-argument function) that returns the paths using standard `node_modules` resolution
- * opts - the resolution options
-
-* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
-
-* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
-This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
-**Note:** this property is currently `true` by default but it will be changed to
-`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
-
-default `opts` values:
-
-```js
-{
- paths: [],
- basedir: __dirname,
- extensions: ['.js'],
- readFile: fs.readFile,
- isFile: function isFile(file, cb) {
- fs.stat(file, function (err, stat) {
- if (!err) {
- return cb(null, stat.isFile() || stat.isFIFO());
- }
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
- return cb(err);
- });
- },
- isDirectory: function isDirectory(dir, cb) {
- fs.stat(dir, function (err, stat) {
- if (!err) {
- return cb(null, stat.isDirectory());
- }
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
- return cb(err);
- });
- },
- moduleDirectory: 'node_modules',
- preserveSymlinks: true
-}
-```
-
-## resolve.sync(id, opts)
-
-Synchronously resolve the module path string `id`, returning the result and
-throwing an error when `id` can't be resolved.
-
-options are:
-
-* opts.basedir - directory to begin resolving from
-
-* opts.extensions - array of file extensions to search in order
-
-* opts.readFile - how to read files synchronously
-
-* opts.isFile - function to synchronously test whether a file exists
-
-* opts.isDirectory - function to synchronously test whether a directory exists
-
-* `opts.packageFilter(pkg, dir)` - transform the parsed package.json contents before looking at the "main" field
- * pkg - package data
- * dir - directory for package.json (Note: the second argument will change to "pkgfile" in v2)
-
-* `opts.pathFilter(pkg, path, relativePath)` - transform a path within a package
- * pkg - package data
- * path - the path being resolved
- * relativePath - the path relative from the package.json location
- * returns - a relative path that will be joined from the package.json location
-
-* opts.paths - require.paths array to use if nothing is found on the normal `node_modules` recursive walk (probably don't use this)
-
-* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"`
-
-* opts.preserveSymlinks - if true, doesn't resolve `basedir` to real path before resolving.
-This is the way Node resolves dependencies when executed with the [--preserve-symlinks](https://nodejs.org/api/all.html#cli_preserve_symlinks) flag.
-**Note:** this property is currently `true` by default but it will be changed to
-`false` in the next major version because *Node's resolution algorithm does not preserve symlinks by default*.
-
-default `opts` values:
-
-```js
-{
- paths: [],
- basedir: __dirname,
- extensions: ['.js'],
- readFileSync: fs.readFileSync,
- isFile: function isFile(file) {
- try {
- var stat = fs.statSync(file);
- } catch (e) {
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
- throw e;
- }
- return stat.isFile() || stat.isFIFO();
- },
- isDirectory: function isDirectory(dir) {
- try {
- var stat = fs.statSync(dir);
- } catch (e) {
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
- throw e;
- }
- return stat.isDirectory();
- },
- moduleDirectory: 'node_modules',
- preserveSymlinks: true
-}
-```
-
-## resolve.isCore(pkg)
-
-Return whether a package is in core.
-
-# install
-
-With [npm](https://npmjs.org) do:
-
-```sh
-npm install resolve
-```
-
-# license
-
-MIT
diff --git a/tools/node_modules/babel-eslint/node_modules/source-map/package.json b/tools/node_modules/babel-eslint/node_modules/source-map/package.json
deleted file mode 100644
index 9e2674cec8b..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/source-map/package.json
+++ /dev/null
@@ -1,188 +0,0 @@
-{
- "author": {
- "name": "Nick Fitzgerald",
- "email": "nfitzgerald@mozilla.com"
- },
- "bugs": {
- "url": "https://github.com/mozilla/source-map/issues"
- },
- "bundleDependencies": false,
- "contributors": [
- {
- "name": "Tobias Koppers",
- "email": "tobias.koppers@googlemail.com"
- },
- {
- "name": "Duncan Beevers",
- "email": "duncan@dweebd.com"
- },
- {
- "name": "Stephen Crane",
- "email": "scrane@mozilla.com"
- },
- {
- "name": "Ryan Seddon",
- "email": "seddon.ryan@gmail.com"
- },
- {
- "name": "Miles Elam",
- "email": "miles.elam@deem.com"
- },
- {
- "name": "Mihai Bazon",
- "email": "mihai.bazon@gmail.com"
- },
- {
- "name": "Michael Ficarra",
- "email": "github.public.email@michael.ficarra.me"
- },
- {
- "name": "Todd Wolfson",
- "email": "todd@twolfson.com"
- },
- {
- "name": "Alexander Solovyov",
- "email": "alexander@solovyov.net"
- },
- {
- "name": "Felix Gnass",
- "email": "fgnass@gmail.com"
- },
- {
- "name": "Conrad Irwin",
- "email": "conrad.irwin@gmail.com"
- },
- {
- "name": "usrbincc",
- "email": "usrbincc@yahoo.com"
- },
- {
- "name": "David Glasser",
- "email": "glasser@davidglasser.net"
- },
- {
- "name": "Chase Douglas",
- "email": "chase@newrelic.com"
- },
- {
- "name": "Evan Wallace",
- "email": "evan.exe@gmail.com"
- },
- {
- "name": "Heather Arthur",
- "email": "fayearthur@gmail.com"
- },
- {
- "name": "Hugh Kennedy",
- "email": "hughskennedy@gmail.com"
- },
- {
- "name": "David Glasser",
- "email": "glasser@davidglasser.net"
- },
- {
- "name": "Simon Lydell",
- "email": "simon.lydell@gmail.com"
- },
- {
- "name": "Jmeas Smith",
- "email": "jellyes2@gmail.com"
- },
- {
- "name": "Michael Z Goddard",
- "email": "mzgoddard@gmail.com"
- },
- {
- "name": "azu",
- "email": "azu@users.noreply.github.com"
- },
- {
- "name": "John Gozde",
- "email": "john@gozde.ca"
- },
- {
- "name": "Adam Kirkton",
- "email": "akirkton@truefitinnovation.com"
- },
- {
- "name": "Chris Montgomery",
- "email": "christopher.montgomery@dowjones.com"
- },
- {
- "name": "J. Ryan Stinnett",
- "email": "jryans@gmail.com"
- },
- {
- "name": "Jack Herrington",
- "email": "jherrington@walmartlabs.com"
- },
- {
- "name": "Chris Truter",
- "email": "jeffpalentine@gmail.com"
- },
- {
- "name": "Daniel Espeset",
- "email": "daniel@danielespeset.com"
- },
- {
- "name": "Jamie Wong",
- "email": "jamie.lf.wong@gmail.com"
- },
- {
- "name": "Eddy Bruël",
- "email": "ejpbruel@mozilla.com"
- },
- {
- "name": "Hawken Rives",
- "email": "hawkrives@gmail.com"
- },
- {
- "name": "Gilad Peleg",
- "email": "giladp007@gmail.com"
- },
- {
- "name": "djchie",
- "email": "djchie.dev@gmail.com"
- },
- {
- "name": "Gary Ye",
- "email": "garysye@gmail.com"
- },
- {
- "name": "Nicolas Lalevée",
- "email": "nicolas.lalevee@hibnet.org"
- }
- ],
- "deprecated": false,
- "description": "Generates and consumes source maps",
- "devDependencies": {
- "doctoc": "^0.15.0",
- "webpack": "^1.12.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "source-map.js",
- "lib/",
- "dist/source-map.debug.js",
- "dist/source-map.js",
- "dist/source-map.min.js",
- "dist/source-map.min.js.map"
- ],
- "homepage": "https://github.com/mozilla/source-map",
- "license": "BSD-3-Clause",
- "main": "./source-map.js",
- "name": "source-map",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/mozilla/source-map.git"
- },
- "scripts": {
- "build": "webpack --color",
- "test": "npm run build && node test/run-tests.js",
- "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
- },
- "typings": "source-map",
- "version": "0.5.7"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/supports-color/package.json b/tools/node_modules/babel-eslint/node_modules/supports-color/package.json
deleted file mode 100644
index 9e4eafa8573..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/supports-color/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "browser": "browser.js",
- "bugs": {
- "url": "https://github.com/chalk/supports-color/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "has-flag": "^3.0.0"
- },
- "deprecated": false,
- "description": "Detect whether a terminal supports color",
- "devDependencies": {
- "ava": "^0.25.0",
- "import-fresh": "^2.0.0",
- "xo": "^0.20.0"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js",
- "browser.js"
- ],
- "homepage": "https://github.com/chalk/supports-color#readme",
- "keywords": [
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "ansi",
- "styles",
- "tty",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "support",
- "supports",
- "capability",
- "detect",
- "truecolor",
- "16m"
- ],
- "license": "MIT",
- "name": "supports-color",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/chalk/supports-color.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "5.5.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json b/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json
deleted file mode 100644
index 2c80c243891..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/to-fast-properties/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/to-fast-properties/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Force V8 to use fast properties for an object",
- "devDependencies": {
- "ava": "0.0.4"
- },
- "engines": {
- "node": ">=4"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/to-fast-properties#readme",
- "keywords": [
- "object",
- "obj",
- "properties",
- "props",
- "v8",
- "optimize",
- "fast",
- "convert",
- "mode"
- ],
- "license": "MIT",
- "name": "to-fast-properties",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/to-fast-properties.git"
- },
- "scripts": {
- "test": "node --allow-natives-syntax test.js"
- },
- "version": "2.0.0"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/index.js b/tools/node_modules/babel-eslint/node_modules/trim-right/index.js
deleted file mode 100644
index 666f4b2f4ee..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/trim-right/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-module.exports = function (str) {
- var tail = str.length;
-
- while (/[\s\uFEFF\u00A0]/.test(str[tail - 1])) {
- tail--;
- }
-
- return str.slice(0, tail);
-};
diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/license b/tools/node_modules/babel-eslint/node_modules/trim-right/license
deleted file mode 100644
index 654d0bfe943..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/trim-right/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/package.json b/tools/node_modules/babel-eslint/node_modules/trim-right/package.json
deleted file mode 100644
index 4ed056783bb..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/trim-right/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/trim-right/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Similar to String#trim() but removes only whitespace on the right",
- "devDependencies": {
- "ava": "0.0.4"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/trim-right#readme",
- "keywords": [
- "trim",
- "right",
- "string",
- "str",
- "util",
- "utils",
- "utility",
- "whitespace",
- "space",
- "remove",
- "delete"
- ],
- "license": "MIT",
- "name": "trim-right",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/trim-right.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.0.1"
-} \ No newline at end of file
diff --git a/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md b/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md
deleted file mode 100644
index 0a4438acd7a..00000000000
--- a/tools/node_modules/babel-eslint/node_modules/trim-right/readme.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# trim-right [![Build Status](https://travis-ci.org/sindresorhus/trim-right.svg?branch=master)](https://travis-ci.org/sindresorhus/trim-right)
-
-> Similar to [`String#trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) but removes only whitespace on the right
-
-
-## Install
-
-```
-$ npm install --save trim-right
-```
-
-
-## Usage
-
-```js
-var trimRight = require('trim-right');
-
-trimRight(' unicorn ');
-//=> ' unicorn'
-```
-
-
-## Related
-
-- [`trim-left`](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/tools/node_modules/babel-eslint/package.json b/tools/node_modules/babel-eslint/package.json
deleted file mode 100644
index fae7c72dbbf..00000000000
--- a/tools/node_modules/babel-eslint/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- "author": {
- "name": "Sebastian McKenzie",
- "email": "sebmck@gmail.com"
- },
- "bugs": {
- "url": "https://github.com/babel/babel-eslint/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "@babel/parser": "^7.0.0",
- "@babel/traverse": "^7.0.0",
- "@babel/types": "^7.0.0",
- "eslint-visitor-keys": "^1.0.0",
- "resolve": "^1.12.0"
- },
- "deprecated": false,
- "description": "Custom parser for ESLint",
- "devDependencies": {
- "babel-eslint": "^8.2.6",
- "dedent": "^0.7.0",
- "eslint": "^5.6.0",
- "eslint-config-babel": "^7.0.1",
- "eslint-plugin-flowtype": "^2.30.3",
- "eslint-plugin-import": "^2.14.0",
- "eslint-plugin-prettier": "^2.1.2",
- "espree": "^3.5.2",
- "husky": "^1.0.0-rc.13",
- "lint-staged": "^7.2.2",
- "mocha": "^5.0.1",
- "prettier": "^1.4.4"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "lib"
- ],
- "homepage": "https://github.com/babel/babel-eslint",
- "license": "MIT",
- "lint-staged": {
- "*.js": [
- "eslint --format=codeframe --fix",
- "git add"
- ]
- },
- "main": "lib/index.js",
- "name": "babel-eslint",
- "peerDependencies": {
- "eslint": ">= 4.12.1"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/babel/babel-eslint.git"
- },
- "scripts": {
- "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'",
- "fix": "eslint lib test --fix",
- "lint": "eslint lib test",
- "precommit": "lint-staged",
- "preversion": "npm test",
- "test": "npm run lint && npm run test-only",
- "test-only": "mocha && mocha --require test/fixtures/preprocess-to-patch.js"
- },
- "version": "10.0.3"
-} \ No newline at end of file
diff --git a/tools/update-babel-eslint.sh b/tools/update-babel-eslint.sh
index 700194da937..d6de6d25e1d 100755
--- a/tools/update-babel-eslint.sh
+++ b/tools/update-babel-eslint.sh
@@ -1,19 +1,19 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Shell script to update babel-eslint in the source tree to the latest release.
# Depends on npm, npx, and node being in $PATH.
# This script must be be in the tools directory when it runs because it uses
-# $BASH_SOURCE[0] to determine directories to work in.
+# $0 to determine directories to work in.
-cd "$( dirname "${BASH_SOURCE[0]}" )"
-rm -rf node_modules/babel-eslint
+cd "$( dirname "${0}" )" || exit
+rm -rf node_modules/@babel
mkdir babel-eslint-tmp
-cd babel-eslint-tmp
+cd babel-eslint-tmp || exit
npm init --yes
-npm install --global-style --no-bin-links --production --no-package-lock babel-eslint@latest
+npm install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest
# Use dmn to remove some unneeded files.
npx dmn@2.2.2 -f clean
@@ -22,5 +22,5 @@ npx dmn@2.2.2 -f clean
npx removeNPMAbsolutePaths@1.0.4 .
cd ..
-mv babel-eslint-tmp/node_modules/babel-eslint node_modules/babel-eslint
+mv babel-eslint-tmp/node_modules/@babel node_modules/@babel
rm -rf babel-eslint-tmp/